Repository navigation
fleet: end a gpu lock wait at its queue bound, quiet-window park included - #5197
Conversation
…uded A gpu/perf waiter parked behind a benchmark quiet window used to restart its queue clock when the park returned, so chained windows let it wait far past the IR_QUEUE_TIMEOUT that ir-run printed. The bound is now a deadline from the first attempt: `quiet_window.py park --deadline` exits at it (dropping its own parker row) and ir-acquire takes the normal timeout exit. cpu-slot waits keep their uncharged deferral. ir-run resolves the bound once (env, host.toml, concurrency.toml), prints that value and exports it to ir-acquire. render-verify resolves it through `ir-acquire --queue-timeout`, derives its backstop from it, and reports RESULT=LOCK-FAILED as its own non-recordable lock-failed row instead of CRASH. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jakildev
left a comment
There was a problem hiding this comment.
Review — fleet: end a gpu lock wait at its queue bound, quiet-window park included
Verdict: approve
The exclusive-lock deadline, shared bound resolution, and no-verdict reporting match the issue plan; the changed synchronization and process-lifecycle boundary warrants an Opus recheck.
Praise
concurrency_helpers.sh::ir_acquire_exclusivekeeps CPU-slot deferral intentionally separate while charging only GPU/perf quiet-window parking to the exclusive-lock deadline.quiet_window.py::cmd_parkremoves its parker row through the existingfinallypath when its deadline expires, avoiding stale quiet-window accounting.
Acceptance (issue #5196)
5 of 5 met. The defect-path test, ir-run host-TOML resolution test, verifier integration/process-tree test, regression suites, and recorded macOS audit each provide evidence for their corresponding criterion.
Checked
- Read the complete issue #5196 plan/corrections and PR #5197 metadata, discussion, inline comments, commit, full diff, and changed-file context at
b6f99446864a8b3b29f76b32e4e506b621344001. python3 -m unittest scripts/tests/test_render_verify.py— 109 passed.fleet-jobs wait --timeout 60 20261119T082747Z-fleet-tests-406463—test_ir_run_result_reporting.shpassed; terminal job exit 0.git diff --check origin/master...HEAD— clean.- CI checks
linux-build,render-harness-tests, andfleet-testswere still in progress when reviewed; no completed check was failing.
🤖 Reviewed by Codex (review-pr skill)
Opus recheck required: lock acquisition deadline and process-lifecycle semantics.
jakildev
left a comment
There was a problem hiding this comment.
Review — fleet: end a gpu lock wait at its queue bound, quiet-window park included
Verdict: needs-fix
Sonnet flagged the lock-acquisition deadline and process-lifecycle boundary; on closer read I confirm the deadline path and parker cleanup are sound, but the refactored helper now fails open when the parker itself errors.
Needs-fix
engine/tools/lib/concurrency_helpers.sh::_ir_quiet_defer_nonbenchmark— lines 385–387 convert everyir_quiet_parkfailure except the new deadline exit3into return0. Previously, a non-zero parker exit propagated underset -e; now an argparse/runtime/filesystem failure (for example exit2) is reported as a completed park, soir_acquire_exclusivemay try and grant the GPU/perf lock andir_acquire_cpumay restart its timeout while an active benchmark window still requires the caller to stay parked. That breaks the quiet-window no-contamination contract. Preserve the intentional3→ deadline result, but fail closed for every other non-zero parker status, and add a regression case that stubs the parker to exit non-zero and proves the wrapped command is never granted.
Acceptance (issue #5196)
5 of 5 met. The defect-path deadline, shared printed/enforced bound, render-verifier lock-failure/process-tree behavior, regression suites, and terminal macOS audit all have positive evidence in the changed tests and PR record.
Checked
- Read the complete issue #5196 plan/corrections and PR #5197 body, review, inline-comment stream, commit, full diff, and changed-file context at
b6f99446864a8b3b29f76b32e4e506b621344001. bash scripts/fleet/tests/test_quiet_window.sh— 66 passed, 0 failed.bash scripts/fleet/tests/test_ir_run_result_reporting.sh— 110 passed, 0 failed.python3 -m unittest scripts/tests/test_render_verify.py— 109 passed.- Focused failure probe: with
ir_quiet_statusactive andir_quiet_parkreturning2,_ir_quiet_defer_nonbenchmark --deadline ...returned0, confirming the fail-open edge. - CI
linux-build,render-harness-tests, andfleet-testsremain pending; all completed checks are green.
Test plan the author should run before merge
- Add and run a hermetic quiet-window case where the parker returns a non-deadline error and assert no GPU/perf or CPU acquisition is granted.
- Re-run the three suites listed above.
🤖 Reviewed by Codex gpt-5.6-sol (opus-class, review-pr skill)
_ir_quiet_defer_nonbenchmark mapped every parker exit except the deadline status to "parked", so a parker crash or argparse failure let the gpu/perf and cpu waiters take their resource inside an open benchmark window. It now returns 3 for a failed parker and both acquire paths fail on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Addressed feedback:
— worker |
jakildev
left a comment
There was a problem hiding this comment.
Review — fleet: end a gpu lock wait at its queue bound, quiet-window park included
Verdict: approve
The re-review fix correctly fails closed for every non-deadline parker error, and the added probes cover both exclusive and CPU acquisition paths.
Praise
concurrency_helpers.sh::_ir_quiet_defer_nonbenchmarkpreserves the distinct deadline status while making all other parker failures explicit and non-granting.test_quiet_window.sh::park_probeexercises failed parker exits2,1, and143, plus the successful control, for both resource paths.
Acceptance (issue #5196)
5 of 5 met. The amended delta addresses the prior needs-fix without changing the established queue-bound or lock-failure behavior.
Checked
- Read the complete issue #5196 plan and corrections, PR metadata, discussion, reviews, inline-comment stream, full diff, and changed-file context at
5a12a3188c1ac64c6e26428e4a2479156302055b. - Re-review scope: verified the prior fail-open finding is fixed; a failed parker returns a non-granting status in both
ir_acquire_exclusiveandir_acquire_cpu. fleet-jobs wait --timeout 60 20261119T085416Z-fleet-tests-95b5d4— quiet subset: 4 suites passed, terminal exit 0.fleet-jobs wait --timeout 60 20261119T085532Z-fleet-tests-da7ea0—test_ir_run_result_reporting.shpassed, terminal exit 0.python3 -m unittest scripts/tests/test_render_verify.py— 109 passed.git diff --check origin/master...HEAD— clean.- CI: completed checks are green;
linux-build,render-harness-tests, andfleet-testsremain in progress.
🤖 Reviewed by GPT-5 (Codex runtime, review-pr skill)
Opus recheck required: lock acquisition deadline and process-lifecycle semantics.
jakildev
left a comment
There was a problem hiding this comment.
Review — fleet: end a gpu lock wait at its queue bound, quiet-window park included
Verdict: approve
Sonnet flagged the amended fail-closed parker path for final review; on closer read I confirm every non-deadline parker failure now prevents both exclusive and CPU acquisition, while the deadline status keeps its distinct timeout path.
Acceptance (issue #5196)
5 of 5 met. The amendment closes the prior fail-open finding without changing the established queue-deadline, shared-bound, verifier no-verdict, regression, or live-audit evidence.
Checked
- Read the complete issue #5196 plan and corrections plus PR #5197 metadata, discussion, reviews, inline-comment stream, timeline, full diff, and changed-file context at
5a12a3188c1ac64c6e26428e4a2479156302055b. - Delta-scoped re-review:
concurrency_helpers.sh::_ir_quiet_defer_nonbenchmarkmaps only the reserved parker deadline exit to timeout; exits 1, 2, and 143 fail closed before either acquisition path attempts a lock. bash scripts/fleet/tests/test_quiet_window.sh— 94 passed, 0 failed.bash scripts/fleet/tests/test_ir_run_result_reporting.sh— 110 passed, 0 failed.python3 -m unittest scripts/tests/test_render_verify.py— 109 passed.git diff --check origin/master...HEAD— clean.- CI: all completed checks are green;
fleet-tests,linux-build, andrender-harness-testsremain in progress.
🤖 Reviewed by GPT-5 (Codex runtime, review-pr skill)
Summary
A gpu/perf lock wait now ends at
IR_QUEUE_TIMEOUT, counted from its first attempt, even when it was parked behind a benchmark quiet window. Before, each park reset the clock, so chained windows let a pass queue past the printed bound (721 s against 600 s in the incident) until render-verify's backstop fired.ir-runnow prints the boundir-acquireactually enforces (env → host.toml → concurrency.toml). render-verify derives its backstop from that same resolved bound and reports a never-granted pass as a non-recordableLOCK-FAILEDrow instead of CRASH. cpu-slot waits (ir-build) keep their uncharged deferral.Acceptance evidence
bash scripts/fleet/tests/test_quiet_window.shtimeout waiting for lock lock (gpu, 3s), 3 s ≤ 8 s, no marker, parker row dropped; 94 passed, 0 failedfleet-positive-control scripts/fleet/tests/test_quiet_window.sh origin/master --include engine/tools --include CMakePresets.jsonbash scripts/fleet/tests/test_quiet_window.sh(parker stubbed to exit 2 / 1 / 143, plus an exit-0 control)quiet-window park for park-fail failed (exit N), no command run, no lock owner; exit-0 control grants. Against the pre-fix helper (b6f994468, helper file swapped in the same tree): exactly these 24 assertions fail, 70 passbash scripts/fleet/tests/test_ir_run_result_reporting.shIR_QUEUE_TIMEOUT=3s; 110 passed, 0 failedfleet-positive-control scripts/fleet/tests/test_ir_run_result_reporting.sh origin/master --include engine/tools --include CMakePresets.jsonpython3 -m unittest scripts/tests/test_render_verify.pyPassBackstop*cases included)bash scripts/fleet/tests/run_all.sh --only ir_/--only quietenv -u IR_LOCK_ROOT -u IR_QUIET_OWNER bash test/tools/concurrency_test.shPATH=$PWD/scripts/fleet:$PATH fleet-jobs start render-verify -- --all --tracker 490420261119T073230Z-render-verify-72e8e9terminal (failed exit=1); 0queued on thelines (no pass queued); no LOCK-FAILED or BACKSTOP row; 365 checks, 38 FAIL, 10 skippedReviewer notes
Plan departures
--record-control:_validate_control_sourcerefuses any HEAD not onorigin/master.scripts/fleetwas put first on PATH sofleet-runwent through this branch'sir-run/ir-acquire; the log shows the worktree'sir-acquirepath on every pass.test_ir_run_capture_priority.shstubsconcurrency_helpers.shand needed anir_queue_timeoutstub, andtest_quiet_window_windows.pybuilds itsparkNamespace by hand and neededdeadline.Notes for reviewer
ir-acquire --queue-timeoutin render-verify's own tree, which resolves the same layers as the lock wait. If that call fails, render-verify falls back to the env value (or 600) and logs a warning.ir-acquire benchmarkstill applies the bound to cpu, gpu and perf one after another, so an--auto-profilerun could queue for up to 3× the printed bound. That's outside this gpu-scoped plan and was left unchanged..claude/skills/render-verify/SKILL.mdandplatform-catchup/SKILL.mddescribe the HOST-CLOSED no-verdict row but not the new lock-failed row. Both files are gated self-config, so a human would need to add the one line.Closes #5196
🤖 Generated with Claude Code