Honor higher authorized priority for queued shared checks #2
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/dedup-priority-promotion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
start_runauthorizes/normalizes the requested priority, but an identical-input follower only subscribes to the in-flight result. Its priority is discarded. An authorized stabilizer can therefore wait behind ordinary traffic for a job still queued at sweep priority, despite explicitly requesting the stabilizer class. This is priority inversion, not evidence that a large measured memory estimate is wrong. Promotion cannot guarantee capacity or preempt running jobs.Change
Regression evidence
Before implementation,
cargo test dedup_priority_promotes_only_the_original_same_input_job -- --nocapturefailed: the original queued job remainedSweepinstead ofStabilizer.After implementation,
CODEX_THREAD_ID=dedup-priority cargo test --bin t dedup_priority -- --nocapture: 8 passed. Covers exact same-input attachment, no new job, unrelated inputs and jobs, grouped checks, attachment before enqueue, monotonicity, unchanged original constraints/principal limits, running/stale handles, adoption loss and retry, denied unauthorized stabilizer requests and Sweep normalization.cargo fmt --checkandgit diff --checkpass. All compilation went through the cargo wrapper to rcargo.Full final suite: 280 passed, 6 failed; rerunning only these six also fails on clean base
a5b0fe3:sandbox::tests::checks_downloading_the_same_crates_at_once_share_cargos_lock: cargo unavailable in sandbox.sandbox::tests::checks_with_a_network_of_their_own_cannot_reach_the_nodes_loopback: pasta PID-file permission denied.server::tests::logs_are_found_by_check_across_runs_by_run_and_by_the_start_of_their_hash: disk warning replaces expected log.sources::tests::a_working_copy_travels_as_its_commit_and_what_differs: commit assertion.sweep::tests::a_check_that_never_finishes_holds_up_no_new_commit: timeout.sweep::tests::a_restarted_server_follows_the_head_run_it_resumed_without_waiting_for_it: timeout.Clippy could not run: remote stable toolchain lacks cargo-clippy.
Rollout: separate approval required
No production deployment, restart, attachment or reprioritization has been performed. Runtime reports
462afb1385; this patch is based on latest maina5b0fe3. Existing uncommitted scheduler/node-placement and queue-reporting work in other checkouts was inspected and left untouched.After approved merge, let the normal main publication produce the image and verify
t main/t log publish-imageidentify the merged commit and immutable image digest. Submit a separate infrastructure change pinning onlyapps/t/statefulset.yamlto that digest; no worker rollout is required for this server-side change. The currentt/tStatefulSet hasOnDelete, so syncing that pin alone does not activate it.After explicit rollout approval and the deployment owner's safe restart window:
Verify the replacement server version includes this merge. Then, under a principal with
runandprioritize, use a verified existing qualification checkout whose complete relevant inputs match the queued job (not an arbitrary newer checkout):Before attachment, establish exact input identity and that these jobs are still queued; stop if identity is uncertain or any selected check is uncached/isolated. Verify the original owner run/job remains, its queued priority alone rises and its memory estimate is unchanged, with no new execution. Follow the returned subscriber run with
t follow <run> --json. Do not use--force, cancel a run, lower memory, relax OOM handling, or pause unrelated sessions. Cached/running work needs no promotion;t followalone is read-only and does not request a new priority. These commands are an approval-gated procedure, not executed actions.Updated head:
931d2185a7.Fixed the adoption fallback bug: enqueue no longer rebinds Frozen demand. The regression attaches a higher-priority follower after fallback queues while capacity remains held. Removing the enqueue guard reproduces its failure; restoring the guard passes.
Added dispatch-before/after/concurrent-attach coverage, follower subscription disconnect coverage, and real engine restart tests covering queued arrival order, original-owner resource accounting, resumed priority and ownership, worker adoption, live follower subscription and exactly-once results without duplicate worker execution. The 12 dedup-priority tests pass; the additions were repeatedly exercised. Formatting and diff checks pass.
Full required PR test workflow #111 passed on this exact head: 290 passed, 0 failed, 0 ignored, 0 filtered. Build/publication jobs are intentionally skipped for pull requests. Previous-head workflow #110 also passed (286 tests), but does not validate this fix.
The six earlier local failures are not evidence of scheduler regressions: they passed in CI. Their original individual causes are not all established. Remote diagnosis proved inherited RUSTUP_HOME outside sandbox mounts can cause the nested-cargo failure; source assertion, disk-warning and sweep-timeout causes remain unproven. Sandbox capability coverage remains environment-dependent (bubblewrap/tun availability); no test skips or relaxed limits were introduced.
No merge, deployment, production restart or runtime reprioritization performed. Awaiting reviewer resolution and separate rollout approval.