fix(ci): add the external_id-scoped stranded-run sweep to the 4 fork reviewer lanes - #5928
Conversation
9bc1572 to
7187874
Compare
|
Rebased onto main after #3854 merged mid-flight: defect 3 (UX scope-gate here-strings) is now main's — my workflow hunks and test class for it were dropped in favor of #3854's identical fix and stronger wide-diff tests. This PR now carries defects 1 (external_id + stranded-run sweep, 4 fork lanes) and 2 (current-head marker verification, 4 advisory lanes) only. Head: 7187874. All local gates re-run green (211 workflow tests, YAML+bash -n on all 6 lanes, black/isort/flake8). |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of I've verified everything I need. The harm is derived and nameable ( First-Principles-Verdict: PASS Ports the reference lane's stranded-run sweep to the four sibling lanes, closing a nameable wedge; every item is derived, declared, and cause-level. What this change shipsIntent: stop a transiently-failed finalize from wedging
Sibling count: I grepped Subtractions
[FIRST-PRINCIPLES-REVIEWED] 56ccaa6 |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Faithful port of a production-proven sweep, correctly external_id-scoped against sibling-PR heads, with the verdict-preserving divergence from the reference well-argued and tracked (#5949). Watch
[DESIGN-REVIEWED] 56ccaa6 |
|
Design Review CONCERNS — disposition (adopted, fixed in 740cd74): The Watch item is correct and the suggestion was applied verbatim. In the fail-closed lanes the sweep now completes a stranded run with the current run's computed Verified: YAML + bash -n on both lanes, 211 workflow ratchet tests green, black/isort/flake8 pass. |
UX Review (Fable 5) — ⏭️ skippedRevision |
Opus 4.8 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
740cd74 to
f515d9f
Compare
|
GPT BLOCK-MERGE on 740cd74 — disposition (stale-base contamination, rebased): The blocking finding targets Rebased onto current main (740cd74 → f515d9f, patch unchanged) to refresh the merge-base; fresh lanes will review the true diff. 211 workflow ratchet tests green post-rebase. |
|
GPT BLOCK on f515d9f — disposition (adopted, fixed in 13a2dd4): Legitimate finding, and symmetric to the Design lane's earlier one: in the two advisory lanes the sweep completed a stranded run as hardcoded Noted: the reference Verified: YAML + bash -n on both lanes, 211 workflow ratchet tests green. |
13a2dd4 to
a6cb548
Compare
|
First Principles CONCERNS — per-concern dispositions:
No code change on this PR from either item; both are tracked (#5949, and the #3855 note in the PR body's "Relation to open PRs"). |
…reviewer lanes Defect 1 of #3447, second half, stacking on #3856's finalize retry: external_id at check-run creation plus an external_id-scoped stranded-run sweep in the fork design/GPT/Opus/UX lanes' finalize, so a doubly-failed or previously stranded finalize can no longer wedge pr-readiness at 'checking', and a sibling PR sharing the head commit is never touched. Stranded runs complete with the current run's computed verdict: a hardcoded conclusion would either outvote a genuine green re-run under pr-readiness's fail-precedence (fail-closed lanes) or launder a genuine BLOCK whose own PATCH lost both attempts into an un-gated neutral (advisory lanes). complete() takes the check-run id as $1, matching the reference lane. 21 ratchet tests pin external_id at creation, sweep presence, and per-PR scoping. Defect 2 was fixed on main by #3855 and defect 3 by #3854 mid-flight; both are adopted via rebase and dropped from this diff. Fixes #3447
a6cb548 to
56ccaa6
Compare
|
Rebased onto main after #3855 merged (defect 2, marker verification): my parallel defect-2 hunks and test class were dropped in favor of main's landed shape — the auto-merge had produced doubled marker guards in 3 lanes and a conflicting duplicate test class name, both resolved to main's version (verified: exactly one marker guard per lane, verdict-step byte-identical to main in the design lanes). This PR now carries only defect 1's second half (external_id + stranded-run sweep, 4 fork lanes), stacking on #3856. All three #3447 defects are now covered: #3854 (defect 3), #3855 (defect 2), this PR (defect 1 residual). Head: 56ccaa6, single commit, 212 workflow tests green, YAML+bash -n clean, black/isort/flake8 pass. |
bolichen97
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (5 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, SAST annotations clean, security checklist all-NO, AI reviewers green. Category: fix — a transient 5xx while completing a fork AI-review check-run stranded it in_progress, wedging the PR at readiness: checking; the finalize sweep is scoped by external_id (PR number) so it only ever completes this PR's own stranded run and never a sibling sharing the commit.
Fixes #3447
PR #3436 hardened three things inside the new first-principles lane only; the sibling reviewer lanes kept the un-hardened shape. Issue #3447 records the deferral. All three defects are now resolved: defect 3 landed via #3854 and defect 2 via #3855 (both mid-flight of this PR, adopted via rebase and dropped from this diff); this PR carries the remaining piece — defect 1's second half, stacking on the merged #3856.
What this ships (defect 1, second half)
#3856 landed the
complete()finalize retry in the 4 fork lanes; this adds the rest of the reference implementation fromfork-first-principles-review.yml:external_id="<lane>-pr-$PR"at check-run creation (design-pr-$PR,gpt-pr-$PR,opus-pr-$PR,ux-pr-$PR). None of the four lanes set one before (the issue's "reuse each lane's existing external_id" was not executable as written — verified against the checkout).complete()refactored to take the check-run id as$1— byte-identical to the reference except the lane name inoutput[title](per-lane$summaryis assigned outside the helper).external_id— a run stranded by a previous workflow run (or by both PATCH attempts failing) can no longer wedgepr-readinessatchecking, and a sibling PR sharing the head commit is never touched.$conclusion/$title, not a hardcoded one. A hardcodedfailurewould permanently outvote a genuine green re-run under pr-readiness's fail-precedence; a hardcodedneutralwould launder a genuine BLOCK whose own PATCH lost both attempts into a verdict pr-readiness no longer gates on. With no verdict,$conclusionalready degrades to each lane's incomplete posture (failure for the fail-closed GPT/Opus lanes, neutral for the advisory Design/UX lanes). This deliberately diverges from the reference, which sweeps to hardcodedneutraland carries the same latent issue — tracked as fork-first-principles-review.yml sweep completes stranded runs as hardcoded neutral #5949 (the dispatching spec pinned the reference lanes as unmodifiable for this change).[ -n "${HEAD:-}" ] && [ -n "${PR:-}" ], so theworkflow_run.head_shafallback path (wheresteps.prnever ran) skips it instead of trippingset -u.Tests
TestForkLaneStrandedRunSweepsintest/test_ai_review_workflows.py(red-before verified): external_id at creation, sweep presence, external_id scoping,${PR:-}guard, and unscoped-sweep absence, per lane.Verification
bash -nof everyrun:block in all 4 touched workflows: clean.complete()diffed against the reference: only the lane name differs.What could not be verified without a real fork PR: a PR modifying
.github/workflows/does not exercise the modified workflows on its own runs — CI green here is NOT evidence the runtime behavior works. The sweep's live behavior (listing and completing a genuinely stranded check-run) is verified statically and by the ported reference's production record only.Relation to sibling PRs / out of scope
fork-pr-description.ymlcarries a similar barePATCH … || true, but is not a reviewer lane — observed, deliberately not widened into this diff (it already sets its own external_id).