Repository navigation
fix(ci): anchor the unmeasured-gate-tail by position when the failing step has no final conclusion yet - #19166
Merged
os-try-charles merged 2 commits intoSep 19, 2026
Conversation
… step has no final conclusion yet `judge()` located the failure with `conclusion === 'failure'`, but this reporter runs as a later step in the SAME job, so that field is the least final one in the response. Over the instrument's whole lifetime 24 of 42 failing `Lint & Repo Gates` jobs disclosed NOT MEASURED for exactly this reason, while the file had already solved the same race for the COUNT and written the principle down twice. `anchorFailure()` keeps the stamped-conclusion case unchanged, adds a positional case licensed by this reporter's own `if: failure()` wiring (one unfinished step + a running reporter = the step the job stopped at, since steps do not overlap), and REFUSES with a distinct code when neither holds. NOT MEASURED and zero stay different answers; no red becomes a warning. `--self-test` gains the shape it could not express: a fixture in which the failing step carries no final conclusion at the instant of the read, plus the two refusals that prove the new anchor never guesses. 32 -> 47 assertions. `wiringVerdict()` now also pins `if: failure()`, because that condition is what licenses the positional inference. Claude-Session: https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk Co-authored-by: Claude <noreply@anthropic.com>
…sting-conclusion Claude-Session: https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk Co-authored-by: Claude <noreply@anthropic.com>
os-try-charles
marked this pull request as ready for review
September 19, 2026 03:22
os-try-charles
deleted the
claude/issue-18874-anchor-the-tail-without-trusting-conclusion
branch
September 19, 2026 03:53
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.
Fixes #18874
Clause-②: no
The defect, in one line
judge()located the failure withconclusion === 'failure', but this reporter runs as a later step in the same job, so that field is the least final one in the response it reads. Over the instrument's whole lifetime — a census, not a sample — 24 of 42 failingLint & Repo Gatesjobs disclosedNOT MEASUREDfor exactly this reason, and the step is green either way, so nothing escalated.⭐ The file had already solved the same race for the COUNT and written the principle down twice (
Position decides; conclusion only subtracts). The residue was the ANCHOR.Which of the two in-lane shapes this takes, and why the other one is rejected
The card prescribed no remedy and named three shapes. The dispatch removed the third (taking the failing step from the runner's own context lands in
.github/workflows/**, not this lane's surface). Of the remaining two:Taken — anchor on position/status rather than
conclusion.Rejected — re-read the API after a short wait. It fails the file's own stated criterion, the one written twice in it:
A wait keeps the anchor's authority on
conclusionand merely hopes it becomes final later — the same dependency the file already rejected for the count, with a timer bolted on. Two further readings back that up, neither of them this PR's own work:measured=noone. Any wait length would be a number this repo has measured to be unrelated to the outcome — i.e. a guess, and the card's constraint 1 says a repair that makes the anchor guess is worse than the honest refusal;--self-test. The battery drives the purejudge()over recorded shapes; a retry can only be tested by faking a sequence of responses, which grades the retry harness whilejudge()itself stays exactly as blind as it is today. That is the constraint the card called this round's most important deliverable.What the anchor does now —
anchorFailure()Three cases, in order, and the third is a refusal, never a pick:
conclusion: "failure"→ unchanged, and it still wins over any position;OS_TAIL_REPORT_STEP(this reporter) is itself recordedin_progress, and exactly one other declared step is too → that step is the failure, by position. The inference is licensed by three facts: the reporter's step declaresif: failure(), so its running at all is the runner's statement that a step failed; steps in a job do not overlap, so a step the API still showsin_progresshas in fact finished; and the runner went on to theif: failure()epilogue instead of to the next gate, which is what failing means;NOT MEASURED, with a distinct reason code.⛔
NOT MEASUREDand zero stay different answers. ⛔ No red became a warning; the step still always exits 0 and still emits onenotice.wiringVerdict()now also pinsif: failure()on that step, because that condition — and nothing else — is what licenses case 2. Widen it and this gate goes red on every failing job, instead of the positional anchor silently starting to answer on jobs that never failed.The case the battery could not express before
This is the deliverable the dispatch called more important than the changed line.
fixtures()gainsfailureNotYetStamped: the live shape in which the failing step carries no final conclusion at the instant of the read — it is still recordedin_progress, the gates behind it arequeued, and theif: failure()epilogue step ahead of it has already run and passed. Every pre-existing fixture hands the anchor a stampedfailure, which is why 32 green assertions were compatible with a reporter that was blind in production.Plus the two refusals that prove the new anchor never guesses:
failureNotYetStarted(the failing step's start has not landed either, so there is a position but no evidence for it) and a two-unfinished-steps ambiguity.32 assertions → 47.
Evidence
node scripts/report-unmeasured-gate-tail.mjs --self-test, verbatim:Reverse verification (ablation), run from the committed state, mutation proved on disk by blob hash and grep counts, restored by
git checkout HEAD -- PATHwithgit diff HEADempty afterwards.Leg 1 — put the pre-fix conclusion-only anchor back. Worktree blob
ebbcc88e→0770b5f8;anchorFailure(call sites 1 → 0,const failedIdx = declared.findIndex0 → 1. Self-test exits 1 with 8 failures, the headline one reproducing the production symptom exactly:Leg 2 — disable the
if: failure()licence (if (!selfRunning)→if (false && !selfRunning)). Blobebbcc88e→a8738922. Self-test exits 1 with 3 failures. ⭐ Worth recording honestly: themeasuredverdict on that fixture staysfalseeven so, because the uniqueness rule catches it independently (unnamed, both the failing step and the reporter read as unfinished, which is an ambiguity). The licence is load-bearing for the reason code; the safety property has two independent barriers, not one.Both legs restored: blob back to
ebbcc88e,git diff HEADempty.Gates.
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackre-derived in this worktree against the real changed set (1 path, +283/-24) and every command it printed was run. Results are in the report comment on the card.Acceptance notes
reason=on a refusal andanchored_by=on a measurement, appended so themeasured=no never_ran=NOT_MEASUREDandmeasured=yes never_ran=Nprefixes every existing reader greps for are byte-unchanged. This is the reason-collapse that comment 5737477072 recorded as noted, not filed and handed explicitly to this remedy round: without it, a census taken from the annotation surface alone still could not tell this race from an unreadable API — and could not count whether this fix worked.in_progressit now measures, and where it does not it refuses exactly as before. Theanchored_by=status/reason=fields are what make the answer countable next time.NOT MEASUREDbranch ofrenderReport()still prints no shape of thesteps[]it saw, so diagnosing the refusals that remain needs the raw API rather than the log. Successor: this card's next round, if the rate does not go where this predicts.Generated by Claude Code