fix(ci-status): wait for the re-run of a failed full run before carrying its failure - #647
Draft
kyle-sexton wants to merge 1 commit into
Draft
kyle-sexton wants to merge 1 commit into
kyle-sexton wants to merge 1 commit into
Conversation
…ing its failure In carry-forward mode a settled failure or error ended the wait at once, so a contract-only event during a re-run of the failed full run read the stale failure and went red. The wait now holds a failure open while the run its target_url names is in flight with an attempt started after the status was created. Only a full run writes the status, so contract-only siblings on a failed SHA still stop at once. A success still ends the wait immediately, and every path stays fail-closed. Every carry-forward red now also says to re-run this run once ci-lanes is success, where a new commit would re-run every lane. Closes #646 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kyle-sexton
added a commit
to melodic-software/claude-code-plugins
that referenced
this pull request
Sep 30, 2026
…5592) Refs #4670 ## Summary The Contract-only `ci-status` section of `docs/ci-runner-routing.md` told operators to "try re-running" a red contract-only run and to push a commit if it stayed red. A throwaway-PR reproduction on #4670 showed what actually happens, so the section now says so. ## Fix - Remedy: re-running a red contract-only run after `ci-lanes` is `success` passes the composite and replaces the red check run. No new commit is needed. - Defect (a): a body edit while a failed full run is being re-run reads the stale `ci-lanes` failure at once and goes red. The fix is upstream: melodic-software/ci-workflows#646. - The ruleset behavior for two same-name `ci-status` check runs stays marked unverified. The probe could not observe it (the `do-not-merge` label kept every run red), and no stale-check-clearing step is added. - `ci.yml` is not repinned here. ## Verification - `npx markdownlint-cli2 docs/ci-runner-routing.md` reports 0 issues. - The diff touches only the Contract-only `ci-status` section. - Run ids and timestamps for each stated behavior are in the results comment on #4670: #4670 (comment) ## Related - #4670 stays open: AC2 to AC5 need the ci-workflows release and a repin. - melodic-software/ci-workflows#646 (issue), melodic-software/ci-workflows#647 (draft fix). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #646
Summary
In carry-forward mode,
ci-statusended its wait as soon as the newestci-lanesstatus wassuccess,failureorerror. After a full run failed and was re-run, a contract-only event on the same SHA read the oldfailureat once and went red. It did not wait for the re-run. Reproduced in melodic-software/claude-code-plugins#4670: contract-only run 36675804726 went red at 06:00:01 on the 05:56:46 failure of run 36673988526, while that run's attempt 2 (started 05:57:10) was in flight. Attempt 2 passed at 06:12:49.The failure message also only ever said
re-run the full workflow. Onceci-lanesissuccess, re-running the red contract-only run is enough.Fix
failureorerroris held open only while its writer re-runs.read_carried_statenow also reads the chosen entry'screated_atand the run id itstarget_urlnames. The status stays open, and the wait narrows to that one run, when that run is in flight with arun_started_atlater than the status'screated_at. Asuccessstill ends the wait at once.run_attempt > 1test was rejected because it also matches a re-run contract-only run. A jobs-API discriminator was already rejected in fix(ci-status): wait on any in-flight sibling before reading ci-lanes #562.fail_carry_forward. It keepsre-run the full workflowand appendsOnce ci-lanes on <sha> is success, re-run this run instead.The run cannot see a verdict recorded after it, so it names both.carry-forward-wait-secondsinput description and the README section are updated to match.Verification
bash .github/actions/ci-status/run.test.sh: all cases pass on this branch.main'srun.shfails 5 new cases:main.mainonly on the new message text.mainalready behaves correctly in the first two. They are regression guards for this change.run.sh:run_attempt > 1in place of the writer test fails the "two contract-only siblings" case.created_at05:56:46Z) names run 36673988526 intarget_url. That run's attempt 1run_started_atis 05:33:54Z and attempt 2's is 05:57:10Z. The consumer pin4610c31ewrites the sametarget_urlshape.shellcheckonrun.shandrun.test.sh,shfmt -d .github/actions/ci-status/,actionlint,markdownlint-cli2 README.md,editorconfig-checker: clean.typosflags only aqueueingonrun.sh:20, which is already onmain.node --test .github/scripts/ci-fanout-consolidation.test.cjs: pass.Related
🤖 Generated with Claude Code