Repository navigation
Conversation
jakildev
left a comment
There was a problem hiding this comment.
Review — fleet: retry an incomplete live snapshot in the cross-lane precheck
Verdict: needs-fix
Needs-fix
- Issue #5089, plan acceptance criterion 5 — the plan requires one passing full
bash scripts/fleet/tests/run_all.shregression run. The PR's acceptance-evidence row 5 instead records293 passed, 6 failed; baseline attribution does not meet the written pass criterion. Supply a clean full-run result or obtain a plan correction that explicitly permits the documented inherited failures and names its acceptable evidence.
Acceptance (issue #5089)
| Criterion | Grade | Basis |
|---|---|---|
| CI census for all nine red runs | met | Acceptance-evidence row 1 enumerates all nine runs and preserves that only 43778082117 failed the cross-lane suite. |
| Positive pre-fix failure control | met | Row 2 reports fleet-positive-control as meaningful; T7's fail-first seam and one-owner/one-label assertions cover the three schedules. |
| 50-run fail-first recovery stress | met | Row 3 reports 50/50 focused passes, and T7 enables the fail-first seam for amend-first, review-first, and together. |
| Persistent failure is bounded and fail-closed | met | T10 covers retries, diagnostics, zero POSTs, and cleanup; T11 covers the racing failure path. |
| Focused and full regression runs pass | unmet | The focused result is green, but the full run reported in row 5 has six failures. |
Validation observed
bash scripts/fleet/tests/run_all.sh --only fleet_claim_cross_lane— 1 passed, 0 failed, 0 skipped.bash scripts/fleet/tests/run_all.sh --only fleet_claim_host_gate— 1 passed, 0 failed, 0 skipped.bash scripts/fleet/tests/run_all.sh --only fleet_claim_acquire_race— 1 passed, 0 failed, 0 skipped.bash scripts/fleet/tests/run_all.sh --only fleet_claim_agent_flag_guard— 1 passed, 0 failed, 0 skipped.- The head's
fleet-testsandall-checksGitHub statuses were still in progress/pending when reviewed; they are not counted as green.
🤖 Reviewed by Codex (GPT-5) (review-pr skill)
Opus recheck not required.
|
Addressed feedback (no code change; head stays
— worker |
jakildev
left a comment
There was a problem hiding this comment.
Review — fleet: retry an incomplete live snapshot in the cross-lane precheck
Verdict: approve
The re-run evidence resolves the prior acceptance blocker; the fail-closed retry remains correctly scoped to the non-mutating precheck read.
Acceptance (issue #5089)
5 of 5 met.
Checked
fleet-claim::_cross_lane_precheckandfetch_issue_info: incomplete issue snapshots retry within the existing budget, retain only the final fetch stderr, and return before the label POST on exhaustion.test_fleet_claim_cross_lane.sh: T7 exercises all race orders after both first reads fail; T9-T11 cover recovery, bounded failure, zero POSTs, and concurrent-peer cleanup across all affected lanes.bash scripts/fleet/tests/run_all.sh --only fleet_claim_cross_lane— 1 passed, 0 failed, 0 skipped.bash scripts/fleet/tests/run_all.sh --only fleet_claim_agent_flag_guard— 1 passed, 0 failed, 0 skipped.bash scripts/fleet/tests/run_all.sh --only fleet_claim_host_gate— 1 passed, 0 failed, 0 skipped.- Issue #5089 acceptance criteria and the PR's updated evidence: 5 of 5 met; hosted full run
43924372096attempt 2 reports 298 passed, 0 failed, 1 expected skip. Current commit status reports all-checks success.
🤖 Reviewed by Codex (GPT-5; Codex runtime) (review-pr skill)
Opus recheck required: cross-lane claim admission and concurrent ownership arbitration.
jakildev
left a comment
There was a problem hiding this comment.
Review — fleet: retry an incomplete live snapshot in the cross-lane precheck
Verdict: needs-fix
Sonnet flagged cross-lane claim admission and concurrent ownership arbitration. On closer read, I confirm that the retry is correctly placed before mutation and that _acquire_label_on still owns the POST plus two independent confirmation GETs. The remaining gap is the definition of a complete precheck snapshot.
Needs-fix
scripts/fleet/fleet-claim::fetch_issue_info/_cross_lane_precheck(around lines 1225 and 2612) — the new gate treats any parsed object with a non-emptystateas complete, whilefetch_issue_infosilently defaults a missinglabelsfield to[]and a missingbodyto"". A valid partial response such as{"state":"OPEN"}therefore producesstate<TAB>OPEN, an empty labels row, andrc=0from_cross_lane_precheck; the caller may POST despite an omitted label set. That violates issue #5089's locked decision that an incomplete snapshot must not be interpreted as no labels, and can admit a reviewer/resolver/amender/persistent owner across a hidden foreign lane. Validate the requested response schema (or emit an explicit completeness marker) before accepting the snapshot, and add a hermetic valid-but-partial response case that exhausts the bounded retries and asserts zero POSTs.
Acceptance (issue #5089)
| Criterion | Grade | Basis |
|---|---|---|
| CI census for all nine red runs | met | Acceptance-evidence row 1 names every run and preserves that only 43778082117 failed the cross-lane suite. |
| Positive pre-fix failure control | met | Row 2 reports 42/101 assertions failing on origin/master; the committed seam and T7 assertions exercise all three race orders. |
| 50-run fail-first recovery stress | met | Row 3 reports 50/50 focused passes with both claimants' first reads failing. |
| Persistent failure is bounded and fail-closed | met for the injected failure shapes | T10 covers nonzero/truncated responses for all four lanes, while T11 covers racing-peer cleanup. The needs-fix above is a separate untested valid-partial shape. |
| Focused and full regression runs pass | met | Hosted run 43924372096 attempt 2 is green at d4e85886d; the focused checks below also pass locally. |
Validation observed
bash scripts/fleet/tests/run_all.sh --only fleet_claim_cross_lane— 1 passed, 0 failed, 0 skipped.bash scripts/fleet/tests/run_all.sh --only fleet_claim_agent_flag_guard— 1 passed, 0 failed, 0 skipped.bash scripts/fleet/tests/run_all.sh --only fleet_claim_host_gate— 1 passed, 0 failed, 0 skipped.bash scripts/fleet/tests/run_all.sh --only fleet_claim_acquire_race— 1 passed, 0 failed, 0 skipped.- Direct read-only parser probe with a
gh issue viewstub returning only{"state":"OPEN"}—_cross_lane_precheckreturnedrc=0with empty labels/body, reproducing the fail-open path.
🤖 Reviewed by Codex (GPT-5; Codex runtime) (review-pr skill)
|
Every failed workflow on this head is also red on master:
These failures are inherited and are not this pull request's to fix. |
_cross_lane_precheck treated a failed or unparsable `gh issue view` as an
empty label set. The amend lane then refused ("live labels unavailable")
on a single transient read, which is the intermittent amend-first failure
of test_fleet_claim_cross_lane.sh on hosted CI. The review, resolving and
pr-claim lanes instead proceeded to POST from the empty snapshot.
Every lane now re-reads an incomplete snapshot up to
FLEET_CLAIM_ACQUIRE_RETRIES times and, on exhaustion, refuses before any
label POST, printing the last fetch's gh stderr. Only the non-mutating
read is retried; the POST plus two complete confirmation GETs are
unchanged.
The cross-lane suite gains a fail-first issue-view seam, runs its three
race schedules with each claimant's first snapshot failing, and adds
per-lane recovery, bounded fail-closed, and racing fail-closed cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fetch_issue_info defaulted a missing labels or body field to empty, so a
well-formed partial response such as {"state":"OPEN"} passed the
cross-lane precheck's non-empty-state test and the caller could POST past
a hidden foreign label. fetch_issue_info now emits a `complete` marker
only when state, labels and body are all present and well-typed, and the
precheck gates its retry loop on that marker. Other callers ignore the
extra line.
test_fleet_claim_cross_lane.sh: the view stub gains a `:partial` mode
cycling through documents that omit labels, body and state; T12 asserts
each lane exhausts the bounded budget with zero POSTs beside a hidden
foreign label, and recovers once a complete snapshot arrives.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1b6af67 to
b4c2d63
Compare
|
Addressed feedback (rebase onto
— worker |
jakildev
left a comment
There was a problem hiding this comment.
Review — fleet: retry an incomplete live snapshot in the cross-lane precheck
Verdict: approve
The retry remains fail-closed and is correctly limited to the non-mutating live-snapshot read; the post-claim arbitration path remains intact.
Acceptance (issue #5089)
5 of 5 met.
Checked
fetch_issue_infoand_cross_lane_precheck: a response is usable only with well-typed state, labels, and body fields; incomplete reads exhaust the existing bounded retry budget before any label POST.test_fleet_claim_cross_lane.sh: T7 exercises every barrier order after both initial reads fail; T9–T12 cover all four claim lanes, recovery, bounded unreadable and partial-response refusals, zero POSTs, and peer cleanup.bash scripts/fleet/tests/test_fleet_claim_cross_lane.sh— 129 passed, 0 failed.bash scripts/fleet/tests/test_fleet_claim_agent_flag_guard.sh— 102 passed, 0 failed.bash scripts/fleet/tests/run_all.sh --only fleet_claim_cross_lane— 1 passed, 0 failed, 0 skipped.git diff --check origin/master...HEAD— clean. Current-head checks, including Fleet Tests andall-checks, are successful; the PR cites hosted full-suite run45753135666with 306 passed, 0 failed, 1 expected environment skip.
🤖 Reviewed by Codex (GPT-5; Codex runtime) (review-pr skill)
Opus recheck required: cross-lane claim admission and concurrent ownership arbitration.
jakildev
left a comment
There was a problem hiding this comment.
Review — fleet: retry an incomplete live snapshot in the cross-lane precheck
Verdict: approve
Sonnet flagged cross-lane claim admission and concurrent ownership arbitration. On closer read, I confirm the amended head now fails closed on failed, malformed, and schema-incomplete snapshots before any label POST, while leaving the existing post-POST two-read arbitration unchanged.
Acceptance (issue #5089)
5 of 5 met.
Checked
- The complete issue and PR thread, including every prior review and author response; there are no inline review comments.
fetch_issue_info,_cross_lane_precheck, and all four claim entry points: only the non-mutating precheck read retries, and exhaustion cannot reach_acquire_label_on.test_fleet_claim_cross_lane.sh: T7 and T9–T12 cover every affected lane, all race orders, transient recovery, bounded persistent failure, valid partial documents, zero-POST refusal, and cleanup.bash scripts/fleet/tests/test_fleet_claim_cross_lane.sh— 129 passed, 0 failed.bash scripts/fleet/tests/test_fleet_claim_agent_flag_guard.sh— 102 passed, 0 failed.bash -non the changed shell scripts andgit diff --check origin/master...HEAD— clean.- Current-head checks are successful, including Fleet Tests and
all-checks; hosted full-suite run45753135666reports 306 passed, 0 failed, 1 expected environment skip.
🤖 Reviewed by Codex (GPT-5; Codex runtime) (review-pr skill)
Summary
fleet-claim::_cross_lane_precheckno longer treats a failed or unparsable live issue fetch as an empty label set. It re-reads the snapshot up toFLEET_CLAIM_ACQUIRE_RETRIEStimes (jittered backoff between reads) and, if every read is incomplete, refuses with rc 1 before any label POST. The rule covers all four precheck lanes:review-claim,resolving-claim,amending-claim,pr-claim.refused on PR#N: live labels unavailable after 3 incomplete fetch attempt(s); no label POSTed) and prints the last fetch's own gh stderr (fetch_issue_infogains an opt-in_FETCH_ISSUE_ERRsink; every other caller still discards stderr). The red CI run could not say why the read failed; this output now would.state,labelsandbody, all well-typed.fetch_issue_infoemits acompletemarker line in that case and the precheck gates on it, so a valid-but-partial response such as{"state":"OPEN"}is retried and then refused, never read as "no labels". The otherfetch_issue_infocallers ignore the extra line._acquire_label_on's POST, its two complete confirmation GETs, the lexicographic contention rule and the amend live-tier gate are untouched.test_fleet_claim_cross_lane.shgains a fail-firstissue viewseam (CLAIM_VIEW_FAIL="<claimant>:<n|always>", alternating a non-zero gh exit with a truncated JSON document). T7's three race schedules now run with each claimant's first snapshot failing, as on hosted CI. New cases: T9 (per-lane recovery), T10 (per-lane bounded fail-closed, zero POSTs, no leftover state, gh error surfaced), T11 (a racing lane that cannot read never reaches its POST; the schedule breaks with a diagnostic and leaves no claimant or rendezvous state) and T12 (per lane, a well-formed document omittinglabels,bodyorstateexhausts the budget with zero POSTs beside a hidden foreign label, then recovers once a complete document arrives; seamCLAIM_VIEW_FAIL="<claimant>:<n|always>:partial").issue view(and so passed only because a lane could proceed from an empty snapshot) now model a real snapshot or assert the new diagnostic:test_fleet_claim_agent_flag_guard.shstub returns{"state":"OPEN",...}.test_fleet_claim_acquire_race.shneeded no edit: its "names the abandoned barrier" assertion now passes through the surfaced fetch error.FLEET-FEEDBACK-HANDLING.md: the amend failed-fetch sentence now says the read is retried a bounded number of times before the refusal.Test plan
bash scripts/fleet/tests/test_fleet_claim_cross_lane.sh(pre-rebase head1b6af6731):129 passed, 0 failedfleet-positive-control … d4e85886d(the pre-amend head): MEANINGFUL, 15 of 129 fail, all T12 partial-snapshot rowsrun_all.sh --only fleet_claim:43 passed, 0 failed, 0 skipped;--only pr_claim_feedback,--only claim_namespace,--only crlf: each 1 passedtest_fleet_claim_host_gate.sh,test_fleet_claim_acquire_race.sh,test_fleet_claim_agent_flag_guard.sh: each rc 0 (host_gate T43 still pins thelive labels unavailablereason)fleet-positive-control … origin/master: MEANINGFUL, 42 of 101 fail pre-fixrun_all.sh --only fleet_claim_cross_laneruns: 50/501 passed, 0 failed, 0 skippedrun_all.shon hosted Fleet Tests CI at the pre-amend headd4e85886d(run43924372096, attempt 2):299 suite(s) — 298 passed, 0 failed, 1 skipped(see criterion 5)run_all.shon hosted Fleet Tests CI at the current headb4c2d63bb(rebased ontof6d489ad6; run45753135666, attempt 1):307 suite(s) — 306 passed, 0 failed, 1 skipped(see criterion 5)test_fleet_claim_cross_lane.sh129 passed, 0 failed;run_all.sh --onlyfleet_claim_cross_lane,fleet_claim_agent_flag_guard,fleet_claim_host_gate,fleet_claim_acquire_race: each1 passed, 0 failed, 0 skippedAcceptance evidence
43778082117failed cross-lanegh run view <id> --log-failed | grep -o "run_all.sh: failed: .*"per run43778082117: test_fleet_claim_cross_lane.sh ·43777887065: test_fleet_claim_acquire_race.sh ·43777769740: test_fleet_claim_acquire_race.sh ·43777669189: test_fleet_claim_acquire_race.sh test_fleet_survey.py ·43777605906: same pair ·43777239396: same pair ·43776869411: same pair ·43776837800: same pair ·43777571415: test_fleet_survey.py. Only43778082117failed the cross-lane suite.live labels unavailablebefore any amend POST and fails the one-owner/one-label assertionsfleet-positive-control scripts/fleet/tests/test_fleet_claim_cross_lane.sh origin/masterMEANINGFUL: 42 of 101 assertions fail against origin/master (345dbbf25). Pre-fix T7 reproduces the CI run line for line:FAIL: amend-first rendezvous ends on claimant events — amend exited with rc 1 before: test -e …/run/arrived-amend,amend-first leaves exactly one successful claimant expected 1 actual 0,… exactly one lane label expected 1 actual 0,final label belongs to the sole successful claimant; claimant reportclaimant amend: rc=1 markers=[]/fleet-claim: amending-claim refused on PR#4201: live labels unavailable(noarrived-amend, so no POST was reached). review-first and together fail the same way. Post-fix: 101 passed, 0 failed.bash scripts/fleet/tests/run_all.sh --only fleet_claim_cross_lane×50stress: pass=50 fail=0(last: run_all.sh: 1 suite(s) — 1 passed, 0 failed, 0 skipped); every run's T7 executes amend-first, review-first and together withCLAIM_VIEW_FAIL="amend:1 review:1", each asserting one successful claimant and one surviving label. Run concurrently with a fullrun_all.shon the same host, i.e. under load.refuses an unreadable target,stops after the bounded attempt budget(3 views),names the target and the incomplete fetch,surfaces the last fetch's own error,sends no POST,leaves no label; thenrefused claims leave no liveness marker, lock, or amend record. T11:the unreadable claimant fails closed,neither lane POSTs,no claimant outlives the schedule,the unreadable schedule leaves no rendezvous state behind. T12, per lane, with a valid-but-partial document:refuses a snapshot that omits labels, body or state,re-reads a partial snapshot within the bounded budget,names the partial snapshot as an incomplete fetch,sends no POST,leaves the hidden foreign label as the only label. Allok.run_all.shpass; existing refusal / incumbent / symmetry / early-exit / cleanup assertions remainbash scripts/fleet/tests/run_all.sh --only fleet_claim_cross_lane;bash scripts/fleet/tests/run_all.sh(hosted Fleet Tests CI, run45753135666attempt 1, headb4c2d63bb)run_all.sh: 1 suite(s) — 1 passed, 0 failed, 0 skipped. Full (current headb4c2d63bb, first attempt):run_all.sh: 307 suite(s) — 306 passed, 0 failed, 1 skipped. The skip istest_cross_repo_shared_file_parity.sh(SKIP: downstream repo not present; no game clone on the runner).test_fleet_claim_cross_lane.shandtest_fleet_claim_acquire_race.shbothPASS. T1–T12 allok(129 passed). History: the pre-amend headd4e85886dpassed the full suite on run43924372096attempt 2 (298/0/1). The amended head1b6af6731(run44005843271) failed only on the master flakes #5126 and #5129. Both are now closed, and the rebase ontof6d489ad6picks up their fixes.Plan departures
issue viewwith nothing, and pre-fix that let a lane proceed (the hazard this PR closes):test_fleet_claim_agent_flag_guard.sh's stub now returns a real snapshot. Fortest_fleet_claim_acquire_race.sh, a "names the abandoned barrier" assertion only kept passing because the precheck now surfaces the last fetch's gh stderr. That diagnostic is an addition beyond the plan's "diagnostic naming the target and incomplete fetch".live labels unavailable(pinned bytest_fleet_claim_host_gate.shT43) rather than a new phrase.f6d489ad6: master replaced the suite's flat-file label state andlock_statemutex with per-label files (fleet: bound claim acquisition settle window #5127, fleet/tests: exclusive-create claim-race stub lock (uutils mkdir is not exclusive) #5212). The fail-firstissue viewseam drops itslock_statecall, and the T9/T12 assertions that read the state file withcat "$CLAIM_STATE"now uselabels_flat. T11's leftover-state check no longer looks for the removed${CLAIM_STATE}.lock.Notes for reviewer
review-claim/resolving-claim/pr-claimsucceeded against an unreadable target (T10 rowsexpected 1, got 0in the positive control): they proceeded from the empty snapshot to POST. Only amend failed closed, and it did so with no retry, which is the CI flake. The fix makes all four fail closed, after a retry._amend_live_feedback_gate's ownlive labels unavailablerefusal stays as the backstop for a non-numeric target (the precheck returns 0 there without fetching).fleet-pr-overlap --base master --self-pr 5122on the rebased head:VERDICT: clean.Closes #5089
🤖 Generated with Claude Code