Skip to content

ci(review): budget the slot lookup that licenses a notice comment - #13657

Merged
bolichen97 merged 1 commit into
mainfrom
fix/lane-notice-slot-lookup-13100
Sep 27, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/lane-notice-slot-lookup-13100

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

What is the problem?

Four branches across three review workflows create a notice comment from a slot read
whose failure is swallowed. The read is a single gh api call whose error is discarded,
so "the read answered and the slot is empty" and "the read never answered" both arrive
as one empty string. On the empty string the branch takes its CREATE arm.

When the read in fact failed against an occupied slot, that CREATE produces a second
comment under the same marker. A later lookup patches whichever id it picks first; the
other keeps whatever line it carries, and no run reconciles them.

The divergence this started from: first-principles-review.yml created from an
unretried read while fork-first-principles-review.yml, its own fork twin, only
patched.

Why this issue matters to the user

A reviewer reads one comment per lane. Two comments under one marker means the board
can show a stale verdict beside a current one with nothing to say which is which, and
the stale one can carry a blocking line.

The failing read is not rare. It is the GitHub App installation rate limit, which
exhausts for minutes at a time and refuses every call in the window, so the branch most
likely to take its CREATE arm on a bad read is the one running during an outage.

How our fix solves it, symptom to root cause

The symptom is a duplicate comment. The immediate cause is the else arm creating
one. The root cause is that the branch cannot distinguish two different facts -- "the
read answered and the slot is empty" from "the read never answered" -- because both
arrive as one empty captured string.

The fix separates them. Each step now declares one budgeted lookup that sets
lookup_ok and existing independently:

  • Six attempts, 5s linear backoff (~75s), the same budget the reads that gate a
    verdict already carry, because the API exhaustion window that breaks this read
    lasts minutes rather than one request.
  • awk 'NR == 1' rather than head -n1, which SIGPIPEs the gh api call under
    pipefail and is itself a swallowed read.
  • The failure is printed per attempt instead of discarded.

A CREATE now runs only behind elif [ "$lookup_ok" -eq 1 ]. When the read never
answered, the step writes nothing and emits a ::warning:: naming which notice did
not land and for which revision -- the safe failure, because the lane's verdict is
still carried by its step output and its check-run conclusion, while a duplicate
comment is not recoverable by any run.

The head-freshness gate, and why the verdict path is exempt

Adding the retry budget above has a cost that has to be paid in the same change:
it stretches the gap between reading the slot and writing to it from milliseconds to
about 75 seconds. A newer revision can publish its verdict into the slot inside that
window, and this run then holds a real comment id pointing at a verdict for a revision
it never reviewed. Writing there replaces that verdict with a superseded revision's
notice, and nothing puts it back.

So every notice write, PATCH and CREATE alike, is licensed by confirm_head: one more
byte-identical shell body, shared by the same five lanes, that re-reads
repos/$REPO/pulls/$PR and compares it to the revision the notice is about. Three
outcomes, one licence:

head read verdict why
same as this revision write the slot still belongs to this run
a different sha withhold, warn the run for that head owns the slot
unreadable after six attempts withhold, warn unknown is treated as moved, because writing is the direction that destroys something

That read carries the same six-attempt budget as the slot read, for the same reason and
measured on this PR: both reads sit inside one exhaustion window, so a lane that has
just spent 75 seconds retrying the slot is the least likely to get this one answered
first time. Unbudgeted, a single blip reads as a moved head; on the override-note arm
that withholds the note while verdict=OVERRIDE is still emitted, leaving a blocking
comment standing over an override a human already accepted, which
security-scope-review.yml names as the one comment state nothing later clears.

Where confirm_head is called, and in which order relative to the slot read, depends
on what the arm does with an empty slot. Both classes are pinned:

arm class lanes order why
creates (override note, no-contract note) design-review.yml, first-principles-review.yml, ux-review.yml head first, slot read LAST an empty slot means POST. A write is pending as soon as the head holds, so asking early costs nothing, and the slot read has to be the last thing before the write
replaces only (skip notes) first-principles-review.yml, ux-review.yml, fork-first-principles-review.yml, fork-ux-review.yml slot read first, head inside the occupant test an empty slot means do nothing, so asking the head first makes a run annotate a notice it was never going to write

The order on the creating arms is the second cost of the retry budget, and it has to be
paid in the same change. A CREATE decides on existing being empty. With the slot read
first and the head check second, up to 75 seconds of backoff sit between reading the slot
and acting on that read, so another run on the SAME head -- a lane re-run, or a run
cancelled by cancel-in-progress whose if: always() post step keeps executing -- can
publish into the slot inside the gap and the CREATE lands beside it. Both runs pass the
head check, so the head licence alone does not catch this. Reading the slot last closes
it.

Two arms deliberately carry no head licence.

The arm that only REPORTS an unreadable slot writes nothing, so it needs none.
Requiring one there swallows the slot fact in exactly the run that most needs it: when
both reads fail, the log would name only the head. An earlier revision of this change
gated that arm and the behavioural test caught it.

retry_comment_write, the verdict path, still checks the head only from its second
attempt. A verdict withheld is the expensive direction: the slot is the only thing a
freshness verifier reads, so a run that declines to publish leaves its revision
indistinguishable from one no lane judged. That is the harm #13100 describes. A notice
carries no verdict, so withholding one costs a stale line. This asymmetry is the whole
reason the rule says "notice" rather than "every write", and it is pinned from both
directions.

Enumerated across all twelve review lanes, not spot-fixed. defines lookup = the
notice step declares find_existing; creates = some branch in it creates a comment
rather than only patching one.

lane defines lookup notice creates verdict on base change
claude-review.yml no no safe -- no notice read at all none
codex-review.yml no no safe -- no notice read at all none
design-review.yml no (private inline read) yes (override note) defect -- creates from a swallowed read budgeted lookup added, create gated, head licensed
first-principles-review.yml yes (unbudgeted) yes (override note) defect -- creates from a swallowed read lookup budgeted, create gated, head licensed
first-principles-review.yml yes (unbudgeted) yes (no-contract note) defect -- creates from a swallowed read lookup budgeted, create gated, head licensed
first-principles-review.yml yes (unbudgeted) no (skip note) residual -- a flake silently skips the update lookup budgeted, unreadable slot reported, head licensed on the occupant
fork-design-review.yml no no safe -- no notice read at all none
fork-first-principles-review.yml yes (unbudgeted) no (skip / no-contract note) residual -- a flake silently skips the update lookup budgeted, unreadable slot reported, head licensed on the occupant
fork-gpt-review.yml no no safe -- no notice read at all none
fork-opus-review.yml no no safe -- no notice read at all none
fork-security-scope-review.yml no no safe -- no notice read at all none
fork-ux-review.yml yes (unbudgeted) no (skip note) residual -- a flake silently skips the update lookup budgeted, unreadable slot reported, head licensed on the occupant
security-scope-review.yml no no safe -- no notice read at all none
ux-review.yml yes (unbudgeted) yes (override note) defect -- creates from a swallowed read lookup budgeted, create gated, head licensed
ux-review.yml yes (unbudgeted) no (skip note) residual -- a flake silently skips the update lookup budgeted, unreadable slot reported, head licensed on the occupant

Four create sites across three files were the duplicate-comment defect. The five lanes
that define a lookup now share two byte-identical bodies, find_existing and
confirm_head, pinned the way retry_comment_write and guarded_comment_upsert
already are, so neither budget can drift lane by lane. design-review.yml's override
note carried its own private OV_MARKER and inline read; it now uses the step's single
marker and single lookup.

What tests we did

test/test_ai_review_workflows.py, new class TestNoticeSlotLookupLicensesEveryCreate,
43 selected tests pass.

Structural, over all twelve lanes:

  • test_slot_lookup_is_one_budgeted_body_wherever_it_is_defined -- the five
    find_existing bodies are byte-identical, budgeted, carry no || true and no
    head -n1, and set lookup_ok and existing as separate facts.
  • test_every_notice_create_sits_behind_the_gate -- parametrized with the per-case
    verdict above. Every notice create is immediately preceded by the lookup_ok -eq 1
    gate; a lane that creates nothing must not gain an ungated create; a lane that reads
    the slot must account for the unreadable case.
  • test_no_notice_read_keeps_its_own_unbudgeted_copy -- no step retains a private
    marker read.
  • test_head_confirmation_is_one_body_wherever_a_notice_is_written -- the five
    confirm_head bodies are byte-identical, read the head from the PR rather than the
    event payload, carry the same six-attempt budget, and return on a moved head without
    retrying it, since a definite answer is not a transient failure.
  • test_every_notice_write_is_licensed_by_a_confirmed_head -- both arm classes from
    the order table, per lane, with the class derived from whether the arm owns a
    CREATE branch rather than asserted.
  • test_the_verdict_path_does_not_take_the_notice_head_gate -- the qualifier, holding
    retry_comment_write out.
  • test_a_replace_arm_still_writes_from_a_head_read_taken_before_the_write -- the
    residual, pinned at its current answer rather than left implicit.
  • test_one_marker_serves_every_write_in_the_step -- one marker name, one value, one
    literal string per step, which is what a split slot would show.

Behavioural, with a stubbed gh on PATH:

  • test_an_unreadable_slot_creates_nothing_and_says_so -- every comments read fails
    while the slot already holds this lane's comment. Zero creates, zero PATCHes, six
    read attempts, six head attempts, a warning naming the revision.
  • test_a_moved_head_leaves_the_newer_revision_verdict_in_the_slot -- the read fails,
    sleeps, a newer revision publishes into the slot, the retry then succeeds with a real
    comment id. Nothing is written.
  • test_a_transient_head_read_is_retried_not_read_as_a_moved_head -- an accepted
    override, an occupied slot, and a head read that blips twice before answering with
    the same head. The note replaces the blocking comment rather than the blip leaving it
    standing.
  • test_a_skip_arm_with_an_empty_slot_asks_nothing_about_the_head -- a readable empty
    slot on a skip arm reads no head at all and says nothing about a notice it was never
    going to write.
  • test_a_create_arm_reads_the_slot_after_the_head_backoff -- the slot is empty when
    the head check starts and taken by the time it finishes, which is another run on this
    same head publishing during the wait. The arm patches the occupant instead of adding
    a second comment.

Red on base. Run against the parent commit in a detached worktree with only the
test file replaced, the class gives 8 failed / 35 passed. Each behavioural failure is
its own defect stated as an assertion:

  • duplicate create: assert not (calls_dir / "create-calls.txt").exists() fails, a
    second comment against an occupied slot while every read failed.
  • buried verdict: assert not (calls_dir / "patch-calls.txt").exists() fails, a stale
    notice patched over a newer revision's verdict.
  • withheld override note: assert (calls_dir / "patch-calls.txt").exists() fails, one
    blip read as a moved head.
  • premature head question: assert not (calls_dir / "head-calls.txt").exists() fails,
    a head read on an arm with nothing to write.
  • create after the backoff: assert not (calls_dir / "create-calls.txt").exists()
    fails against the slot-read-first order, a second comment beside the occupant that
    arrived while the head check was retrying.

Each of the last two was measured separately against the intermediate revision that
carried the earlier order, so every pin is shown to discriminate against the code it
replaces rather than only against the original base.

The 35 passes are the seven lanes that legitimately carry no notice read, so the tests
are not failing indiscriminately.

The five workflows parse as YAML and every modified step is bash -n clean. The
comment-history gate passes against the base, black, isort and flake8 are clean.

Any other suggestions on the work

The existing pin test_the_lookup_that_gates_a_verdict_write_is_retried carries a
comment excusing these very reads, on the grounds that "an override lookup, a skip
notice that updates a comment if one happens to exist -- an empty answer there writes
nothing and strands nothing." That is true of the skip notices and false of the
override and no-contract notices, which create. The reasoning is worth revisiting
wherever else it is relied on.

#13595 proposes the complementary change on the patch-only arms: have a skip notice
CREATE its keyed comment when none exists, so an absent slot means only "the lane never
got that far". It names the same sites this PR touches. The two compose rather than
conflict -- this PR supplies the gate that makes such a create safe, since a create
taken from a swallowed read is precisely the duplicate hazard. When #13595 lands, those
lanes flip their creates flag in _NOTICE_LANES, keep the lookup_ok -eq 1 gate, and
move confirm_head ahead of the branch as the placement table requires; the pins'
failure messages say so.

A recorded disagreement between two advisory lanes. First Principles asks, as a
Subtraction, for confirm_head and its pins to be deferred to their own change, on the
grounds that the duplicate-comment defect is closed by the lookup budget and the create
gate alone. That is correct about the duplicate defect and it is not the whole cost:
the retry budget this PR adds is what opens the read-to-write window, which GPT 5.6
raised as a blocking finding against this PR's own earlier revision. Shipping the budget
without the licence would leave a hazard this change introduces, so the licence stays
and the disagreement is recorded here rather than resolved silently. The same lane's
other items carry no Subtraction.

Opus 5 raised the findings that produced the head-read budget, the skip-arm placement,
and the slot-read-last order on the creating arms. Each is fixed with a behavioural pin,
red against the revision it replaces.

One residual is left and pinned rather than hidden. On a replace-only arm the order has
to be slot-then-head, so the head answer is up to a minute old when the PATCH runs. The
head check narrows that window and cannot close it: the slot holds one comment id
whichever revision wrote it, so re-reading the id proves nothing about whose body is
there now, and closing it needs a conditional write the API does not offer. The exposure
is bounded where a creating arm's is not -- a stale PATCH overwrites one comment, while a
stale CREATE adds a second under one marker that no run removes.
test_a_replace_arm_still_writes_from_a_head_read_taken_before_the_write asserts the
current answer so a later reading does not mistake it for solved.

One dead assignment removed in design-review.yml: MARKER was assigned the identical
string twice in the same step. Behaviour is unchanged by construction -- the variable
already held that exact value at the second assignment -- and removing it makes the
step's own single-marker comment structurally true rather than coincidentally so.

Two Backend Tests (Windows) shards were red on an earlier head of this branch from
tracked flakes #10768 and #12359, in test/test_platform_compat.py and
test/test_runtime_cleanup_windows.py. Neither file, and no file under src/, differs
from this PR's base; both shards were green on the following head.

This PR does not address the stranded-verdict recovery gap #13100, #13456 and #13595
describe: a lane whose verdict is computed and then withheld because the slot is
occupied still never republishes it. That needs a different mechanism and is tracked in
#13659, which this PR's own CI has now reproduced twice -- GPT 5.6 Review and
Opus 5 Review each computed a verdict for a head of this branch and could not publish
it, so neither verdict reached the slot.

The override note is staged under the runner's own temp dir. Three lanes spelled that
one path /tmp/ai-override-note.md while every other body in the same files uses the
runner temp dir, so two lanes on one runner wrote the same file and any test executing
that arm wrote it on the host. test_no_notice_body_is_staged_at_a_hardcoded_host_path
holds the rule over the five lanes this change owns and records, by name, the one
instance left outside them -- claude-review.yml's /tmp/claude-summary.md, which this
PR does not touch -- so it is visible rather than quietly excluded by the lane filter.
Both $RUNNER_TEMP/x and ${RUNNER_TEMP:-/tmp}/x are accepted; several fork lanes use
the stricter first form and the rule is about the literal path, not the spelling.

One finding on this revision is disputed rather than fixed, and it is recorded here
because it cannot be settled by reordering. A reviewer asks for the head to be
reconfirmed after the slot lookup, on the grounds that the lookup's own backoff
invalidates an earlier head licence. That is true, and its mirror image is equally true:
the previous revision read the slot first and was told, correctly, that the backoff then
invalidated the slot answer. Both reads carry the same budget, so whichever runs second
staleness the other, and reconfirming after the lookup only moves the window a third
time -- the adjudication on that finding says so itself.

The measurement that decides it: find_existing returns from inside its success branch,
before the sleep that follows a failed attempt. So the read that DECIDES a write is
adjacent to that write in both the single-attempt and the budgeted form; the budget
lengthens the wait BEFORE an answer arrives, not the gap after it. The premise that the
budget widened a read-to-write window from milliseconds to about 75 seconds does not hold
against that control flow, which makes the head licence built on it the thing to
re-examine rather than its ordering. That is a maintainer's call, not this PR's, so the
licence stays in place and the dispute is stated rather than acted on.

Refs #13100
Refs #8350

@chenmingwei23
chenmingwei23 requested review from a team and smeyffret September 25, 2026 02:54
@chenmingwei23
chenmingwei23 force-pushed the fix/lane-notice-slot-lookup-13100 branch 2 times, most recently from cbd2b09 to f5dbb80 Compare September 25, 2026 02:58
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 25, 2026
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of bd66a68f259b723c1e5f36267ebf5c08e051a5f7 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Existing duplicate slot comments stay forever: this PR prevents new ones but reconciles none — sweep open PRs for double markers once.

Suggestions

  • find_existing already holds every matching id in matches before awk 'NR == 1' discards the rest; patching the first and deleting the extras would cure the "two comments never come back out" harm the description names (and mop up the residual same-head concurrent-create race the ordering comment concedes), instead of only preventing new instances.

[DESIGN-REVIEWED] bd66a68

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of bd66a68f259b723c1e5f36267ebf5c08e051a5f7 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Verify the trade confirm_head pins: an unreadable head withholds the override note, leaving a prior blocking comment standing until a human re-runs the lane.

Not justified as shipped

  • Item 7 — undeclared: the override-note body moves from /tmp/ to ${RUNNER_TEMP:-/tmp}/; the visible description never mentions it. Harm is named in the test (shared host state on self-hosted runners) and its one sibling, claude-review.yml's /tmp/claude-summary.md, is counted and recorded in test_no_notice_body_is_staged_at_a_hardcoded_host_path — inventory tag only.

What this change ships

Inventory (9 items) — 8 justified

Intent: stop review lanes from posting a second notice comment under one marker when the slot read silently fails — a FIX.

  1. A failed slot read no longer takes the CREATE arm; a warning names the unposted notice — justified
  2. The slot lookup retries six times with 5s backoff and prints each failure — justified
  3. head -n1 replaced by awk 'NR == 1', so the read cannot SIGPIPE itself under pipefail — justified
  4. Notice writes are withheld with a warning when the head moved or is unreadable — justified
  5. Creating arms confirm the head first and read the slot last; replace arms the reverse — justified
  6. One marker per step; the override arm's private OV_MARKER lookup is deleted — justified
  7. Override-note body staged under RUNNER_TEMP instead of /tmp — undeclared
  8. A skip arm with an unreadable slot now says so instead of exiting silently — justified
  9. Behavioural and shape tests pin all twelve lanes, including the two residuals — justified

I checked retry_comment_write (first-principles-review.yml:799) as the existing mechanism: it refuses an occupied slot (returns 2/3) where the notice arms must PATCH the occupant, so find_existing/confirm_head are meaningfully different, and their byte-identical cross-lane pinning follows the convention that function already uses. The head gate and ordering (items 4–5) close the 75-second read-to-write window item 2 itself opens, so they are part of the fix, not riders; the behavioural tests fail on base.

[FIRST-PRINCIPLES-REVIEWED] bd66a68

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ human override accepted

Human judgment by @bolichen97 overrides the GPT 5.6 finding for bd66a68f259b723c1e5f36267ebf5c08e051a5f7; the recorded reason is authoritative for this commit.

[GPT-OVERRIDE] bd66a68

This comment is updated in place on each push.

The model was not re-run because an authorized human decision supersedes it.

False positive or not applicable? A repository writer can comment:
/ai-review override gpt bd66a68f259b723c1e5f36267ebf5c08e051a5f7: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed bd66a68f259b723c1e5f36267ebf5c08e051a5f7 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] bd66a68

Verdict parsed from the review's SHA-scoped output markers for commit bd66a68f259b723c1e5f36267ebf5c08e051a5f7.

False positive or not applicable? A repository writer can comment:
/ai-review override fable bd66a68f259b723c1e5f36267ebf5c08e051a5f7: <one-sentence reason>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 25, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/lane-notice-slot-lookup-13100 branch from f5dbb80 to df3f843 Compare September 25, 2026 03:57
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 25, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Round 2 -- dispositions for f5dbb80425 to df3f8432309e

GPT 5.6 F1 (BLOCKING, fenced-UPHELD) -- fixed, not disputed

Retried notice lookup lets superseded runs overwrite the current slot. Head A read failure, head B publishes during backoff, A retries and PATCHes its stale notice over B's verdict.

Correct, and caused by this PR: round 1 turned a single unretried slot read into a 6-attempt read with 5 s linear backoff, widening the read-then-write window from milliseconds to about 75 s. The finding also names the right remedy (confirm the head before a notice write) and the right scope: notice writes, not every write.

A shared confirm_head now sits beside find_existing in all five lanes, byte-identical and pinned as such. It reads .head.sha from the PR itself, not from the event payload, which names the head the run started on. It answers one of three ways.

# write slot head writes? why
1 notice PATCH occupied still $HEAD yes the notice is about the revision the PR is on
2 notice PATCH occupied moved to B no replaces B's verdict, and nothing restores it
3 notice PATCH occupied unreadable no cannot tell 1 from 2, and writing is the destructive direction
4 notice CREATE empty, read answered still $HEAD yes --
5 notice CREATE empty, read answered moved to B no presents a superseded revision's line as the current one
6 notice CREATE empty, read answered unreadable no as 3
7 notice CREATE read failed any no round 1's gate: a swallowed read is not an empty slot
8 verdict, attempt 1 any any yes, unconditionally see below
9 verdict, attempt >1 any moved or unreadable no already guarded (rc=4)
10 verdict, attempt >1 accepted override -- no already guarded (rc=5)

Case 8 is the qualifier, and it is why the rule says notice. For a verdict, withholding is the expensive direction: the marker comment is the only thing a freshness verifier reads, so a run that declines to publish leaves the revision indistinguishable from one no lane ever reviewed. Extending this gate to retry_comment_write's first attempt would turn an unreadable head into a silently withheld verdict, which is the failure mode this lane family already has an open report for. A notice carries no verdict, so declining costs a stale line. That asymmetry is the whole basis for the split, and a test asserts the verdict path does not carry head_unchanged while the notice path does.

The report-only arm is deliberately ungated. A first pass put head_unchanged on all three arms; the behavioural test then showed that when both reads fail the run printed only the head warning and swallowed the fact that the slot was unreadable. An arm that writes nothing needs no licence, so it is now elif [ "$lookup_ok" -eq 0 ] and both facts reach the log. Pinned in both directions.

Eight notice write sites across the five lanes, all now licensed. The seven lanes with no notice write are asserted to have neither the gate nor a write, so one cannot appear ungated later.

Red on the pre-gate tree. Against f5dbb80425 with only the test file swapped in: 12 failed, 29 passed. The behavioural case is the one that names the defect: assert not (calls_dir / "patch-calls.txt").exists() fails as assert not True, so the pre-gate branch did PATCH its stale notice over the newer revision's verdict. The 29 passes are the lanes with no notice write plus round 1's own pins, so the redness is located rather than a wash.

Backend Lint and Type Check (3.12) -- fixed

test/test_ai_review_workflows.py was not black-formatted. Reformatted; black --check, flake8 and isort --check-only clean.

Build Windows Installer (x64) -- not attributable to this diff

.github/scripts/test-windows-installer.ps1:221, "Windows installation exceeded the 120-second ceiling". A wall-clock ceiling on the hosted Windows runner, reached after a successful build and sign. This diff is five review-workflow YAMLs plus one Python test file; none of them is read by the installer build, the NSIS step, or the install probe. Re-measured on the new head rather than re-run, and it will be reported here if it recurs.

Local verification

test/test_ai_review_workflows.py, -n0: 988 passed.

@chenmingwei23
chenmingwei23 force-pushed the fix/lane-notice-slot-lookup-13100 branch from df3f843 to 390825e Compare September 25, 2026 04:23
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 25, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Round disposition, head 390825e2cfa5b51acd55c3be80fee84e938faee3

Board read with --paginate: total_count 91 against 91 rows. Deduped on BOTH
newest-per-name and newest-per-(name, external_id); the two keys agree exactly.
78 success / 7 skipped / 6 failure, zero cancelled, zero queued.

All 6 reds are attributed below. Neither class is attributable to this diff,
which is 5 workflow YAML files plus test/test_ai_review_workflows.py and
touches nothing under src/.

Class 1: four review lanes failed on an installation read limit (re-run, attempt 2)

GPT 5.6 Review, Opus 5 Review, UX Review and First Principles Review all
started within 7 seconds of each other at 04:23:07Z and all four failed at the
same step, with the same annotation:

Could not read this PR's comments after 3 attempts, so this lane cannot tell
whether a human override is recorded for 390825e... Failing closed rather
than re-gating a verdict a human may have cleared -- re-run this job.

That is the lane failing closed on an unreadable comment list, not a verdict.
The annotation asks for a re-run by name.

Recovery was measured before spending the re-run, rather than assumed: the same
four workflows each completed a genuine multi-minute success on another head
(6d7a457af5) at 04:40:26Z to 04:40:30Z, taking 417 to 422 seconds. A
short sub-90-second success would have been the no-op early-exit path and would
not have proven the window open; a 7-minute run is a real evaluation. The window
therefore reopened between 04:23 and 04:40.

Each of the four runs was completed at run_attempt: 1 with nothing in flight
on this head, so a re-run is accepted. All four are now at run_attempt: 2. This
spends the one permitted re-run per lane on this head; no lane will be re-run
again here.

Class 2: two Windows backend shards are a tracked open flake (#13495)

shard failing test assertion
Backend Tests (Windows) (7) test/test_runtime_cleanup_windows.py::test_repeated_windows_provider_shutdown_reclaims_entire_tree AssertionError: owned processes still alive: [1208, 7576, 6868]
Backend Tests (Windows) (4) test/test_platform_compat.py::TestProcessDescendants::test_native_observed_grandchild_survives_snapshot_gap OSError: Windows descendant handles unavailable: [840, 2120, 2824], each candidate open=winerror=5

Open issue #13495 ("windows: recycled PIDs can make descendant scan retain an
unrelated process", labels bug, platform: windows, area: core, claimed)
already carries both signatures in its own evidence table: the literal
owned processes still alive: [...] assertion and the literal
OSError: Windows descendant handles unavailable, across four unrelated heads,
described there as reddening unrelated PRs. Closed #13563 documents the
winerror=5 recycled-parent-PID mechanism that appears verbatim in the shard 4
annotation above, including the query_unvalidated=identity= diagnostic and
root_at_scan=.

Cross-head evidence that this diff cannot be the cause:

  • On the preceding head f5dbb80425, all 8 of 8 Windows shards were success.
  • The src/ tree object is byte-identical across the two heads
    (0cf25baaed544255f7967a07424d9d6d6d1add96 on both).
  • Both failing test files are byte-identical across the two heads
    (35f71b60c0de... and 5172c114d579... on both).
  • This commit's file list contains no src/ path and neither failing test file.

Same source, same tests, 8 of 8 green then 2 of 8 red. Not re-run: the re-run
allowance on this PR covers installation-read-limit logs only, and these logs are
process-lifecycle failures.

Two observations from this round's logs

This PR's own subject reproduced live. The GPT 5.6 Review annotation reads
GPT 5.6 Review produced a verdict for 390825e2cfa5... but could not publish it, so this run's verdict is not in the slot. A computed verdict was withheld and
nothing republishes it, which is exactly the recovery gap this change set was
opened against. Recorded on the follow-up design issue rather than here.

The new gate was observed working under a real read limit. UX Review emitted
both warnings at once: that its slot was unreadable after 6 attempts, and that
the head was unreadable so the notice was deliberately not written. Two separate
facts reaching the log is the reason the report-only arm is ungated while every
write arm is gated. A single combined warning would have hidden the unreadable
slot.

No code change this round; no push, so no review lane was re-rolled by this
comment.

@chenmingwei23
chenmingwei23 force-pushed the fix/lane-notice-slot-lookup-13100 branch from 390825e to 13288e3 Compare September 25, 2026 06:05
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 25, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Round disposition, head 13288e348500402232cc1ead69daa83d8fd43ef4 (parent 390825e2cfa5).

Opus 5 finding 1 -- UPHELD and fixed

confirm_head read repos/$REPO/pulls/$PR once and treated any failure as a moved
head. Both reads in that step sit inside one API exhaustion window, so a lane that had
just spent up to 75 seconds retrying the slot was the least likely to get the head
answered first time. On the override-note arm the consequence is the worst available
one: nothing is written while verdict=OVERRIDE is still emitted, so the slot keeps a
blocking comment over an override a human already accepted.

Fixed: the head read now carries the same six-attempt, 5s-linear-backoff budget as the
slot read, in the same shared byte-identical body. A moved head is a definite answer and
returns without retrying; only an unreadable one is retried.

New pin test_a_transient_head_read_is_retried_not_read_as_a_moved_head. On the parent
commit its discriminating assertion fails: assert (calls_dir / "patch-calls.txt").exists() -> assert False, the override note withheld because one
blip read as a moved head.

Opus 5 finding 2 -- UPHELD and fixed

confirm_head ran before any arm knew whether a write was pending. On the skip arms,
whose only write is a PATCH of an occupant, a readable and EMPTY slot meant the run
annotated a withheld notice that branch never creates.

Enumerated rather than spot-fixed. Eight call sites, two classes, and the class is
decided by what the arm does with an empty slot:

class sites placement reason
creates override note in design-review.yml, first-principles-review.yml, ux-review.yml; no-contract note in first-principles-review.yml before the branch, unchanged an empty slot means POST, so the head decides which branch is taken
replaces only skip arms in first-principles-review.yml, ux-review.yml, fork-first-principles-review.yml, fork-ux-review.yml inside the occupant test an empty slot means do nothing, so asking first annotates a notice the arm never had

The restructure script classified all eight and refused unless exactly four moved; the
first attempt matched an override arm and was reverted whole before anything was
committed.

New pin test_a_skip_arm_with_an_empty_slot_asks_nothing_about_the_head. On the parent
its discriminating assertion fails: assert not (calls_dir / "head-calls.txt").exists() -> assert not True, a head read taken on an arm with
nothing to write.

The structural pin now encodes both classes per lane, deriving the class from whether
the arm owns a CREATE branch rather than asserting one placement rule.

Design CONCERNS -- cleared as its own text asked

Its stated clear condition was "the description documents the head-freshness gate (its
rationale, and why the verdict path is exempt), or the confirm_head hunks move to a
follow-up PR." The body now carries that as a named section with the three-outcome table
and the placement table, and states the verdict-path asymmetry: a withheld verdict is
the expensive direction because the slot is the only thing a freshness verifier reads,
while a withheld notice costs a stale line.

First Principles CONCERNS item 5 -- disagreement recorded, gate retained

Its Subtraction asks to defer confirm_head and its three pins, on the grounds that the
duplicate-comment defect is closed by the lookup budget and the create gate alone. That
is correct about the duplicate defect and it is not the whole cost: the retry budget this
PR adds is what opens the read-to-write window, which GPT 5.6 raised as a blocking
finding against this PR's own earlier revision and which its own text concedes is real
and derived from the fix. Shipping the budget without the licence would leave a hazard
this change introduces.

The gate stays and the disagreement is written into the body rather than resolved
silently.

Backend Tests (Windows) (4) and (7) -- not attributable, tracked

Tracked open flakes, each matched by test node id:

Both files are byte-identical to this PR's base and nothing under src/ is changed by
this PR at all; the same eight shards were green on an earlier head of this branch. Not
re-run: the one-re-run-per-head allowance covers installation-rate-limit logs only.

Local evidence

test/test_ai_review_workflows.py -k TestNoticeSlotLookupLicensesEveryCreate, 43
passed on this head. Against the parent commit in a detached worktree with only the test
file replaced: 8 failed / 35 passed, the 35 being the seven lanes that legitimately
carry no notice read. Five workflows parse as YAML and every modified step is bash -n
clean. Comment-history gate, black, isort and flake8 clean against the new base.

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Sep 25, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 25, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Round disposition, head 3602a58065b14915fa8b6c233f9db00b32d73929 (parent
13288e348500).

The red on the parent was not a verdict

Opus 5 Review failed with produced a verdict for 13288e348500... but could not publish it. Its own log shows twelve consecutive failed comment reads over two and a half
minutes -- six looking for its comment, then six more looking for the slot -- and then
Whether this lane's slot is already taken is unreadable after 6 attempts, so nothing was posted. That is an API exhaustion window plus the stranded-verdict gap tracked in
#13659, the second time this branch has reproduced it (GPT 5.6 Review did the same on
an earlier head). claude-review.yml is not in this PR's diff.

It was not re-run. A re-run would have been cancelled by this round's push through the
concurrency group, so the fresh head buys the same evidence without spending the
allowance.

Opus 5 CANDIDATE 1 -- UPHELD, and it is this PR's own regression

Its discovery pass, readable in the run log even though the verdict never reached the
slot, names the cost of the retry budget this PR adds:

the slot read that licenses a CREATE is consumed after confirm_head may have slept up
to 75s, so the create still lands beside an occupant

Verified against the code rather than taken on trust. The creating arms ran
find_existing then confirm_head then the write, so a CREATE decided on existing
being empty acted on an answer up to 75 seconds old. Two runs of one lane on the SAME head
both pass the head check -- a lane re-run, or a run cancelled by cancel-in-progress
whose if: always() post step keeps executing -- so the head licence does not catch this
one. Before this PR the read and the write were adjacent and the window was about zero;
the budget opened it.

Fixed by reading the slot LAST on the creating arms. Enumerated, eight call sites, and
the order now differs by class because the classes differ in what an empty slot means:

class sites order why
creates override note in design-review.yml, first-principles-review.yml, ux-review.yml; no-contract note in first-principles-review.yml head first, slot read LAST an empty slot means POST. A write is pending as soon as the head holds, so asking early is free, and the read must be last
replaces only skip arms in first-principles-review.yml, ux-review.yml, fork-first-principles-review.yml, fork-ux-review.yml slot read first, head inside the occupant test an empty slot means do nothing, so asking the head first reports a notice the arm never had

The reordering script classified all eight by whether the arm owns a CREATE branch and
refused unless exactly four moved.

New pin test_a_create_arm_reads_the_slot_after_the_head_backoff: the slot is empty when
the head check starts and taken by the time it finishes. Against the parent its
discriminating assertion fails -- assert not (calls_dir / "create-calls.txt").exists()
-> assert not True, a second comment beside the occupant that arrived during the wait.

Opus 5, the misattributing warning -- UPHELD and fixed

confirm_head's unreadable-head warning named only the create-and-patch-over-newer harm.
On a replace-only arm whose head is in fact still current, the opposite is what happens:
the slot keeps an earlier revision's outcome, and a reader told to look for a newer
revision goes looking for one that does not exist. Since confirm_head is one shared
body the message has to hold for both, so it now names both outcomes and asserts neither.

Opus 5, marker uniqueness unpinned -- UPHELD and pinned

The step's own comment claims one marker makes the slot one slot, and nothing held it.
New pin test_one_marker_serves_every_write_in_the_step: one marker name, one value, one
literal <!-- ... --> string per step. The value and the literal are the invariant, not
the assignment count, because the reads spell the marker several ways -- $MARKER
directly, or a positional that retry_comment_write fills from it.

design-review.yml assigned MARKER the identical string twice in one step. The second
assignment is removed. Behaviour is unchanged by construction, since the variable already
held that exact value at that point; it makes the step's own comment structurally true
rather than coincidentally so. Declared here because it is beyond the findings above.

One residual, pinned rather than hidden

On a replace-only arm the order must be slot-then-head, so the head answer is up to a
minute old when the PATCH runs. The head check narrows that window and cannot close it:
the slot holds one comment id whichever revision wrote it, so re-reading the id proves
nothing about whose body is there now, and closing it needs a conditional write the API
does not offer. The exposure is bounded where a creating arm's is not -- a stale PATCH
overwrites one comment, a stale CREATE adds a second under one marker that no run
removes. test_a_replace_arm_still_writes_from_a_head_read_taken_before_the_write
asserts the current answer.

Evidence

46 tests pass on this head. Against the parent with only the test file replaced: 4
failed / 42 passed -- three structural, on exactly the three lanes that own a creating
arm, plus the behavioural create-after-backoff pin. Five workflows parse as YAML and
every modified step is bash -n clean. Comment-history gate, black, isort and flake8
clean against the new base.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 25, 2026
A review lane's override, no-contract and skip notices pick between PATCH
and CREATE from a marker lookup of their own, separate from the guarded
upsert that publishes a verdict. That lookup was a single attempt whose
error was swallowed, so an API flake answered "the slot is empty" and the
branch created a second comment against a slot that already held one.
Two comments under one marker do not come back out: a later lookup
patches whichever id it picks and the other keeps whatever line it
carries.

Enumerated all twelve lanes. Five define such a lookup; four branches
across three of them create from it, and the rest only patch. All five
now share one byte-identical budgeted body -- six attempts, 5s linear
backoff -- that reports whether the read answered separately from what it
found. A create runs only when the read answered; an unreadable slot
writes nothing and says which notice did not land.

Refs #13100
Refs #8350
@chenmingwei23
chenmingwei23 force-pushed the fix/lane-notice-slot-lookup-13100 branch from 3602a58 to bd66a68 Compare September 25, 2026 07:08
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 25, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Round disposition, head bd66a68f259b723c1e5f36267ebf5c08e051a5f7 (parent
3602a58065b1).

F2 -- UPHELD and fixed at the root

Three lanes staged the override note at the literal path /tmp/ai-override-note.md,
while every other comment body in the same files already uses the runner's own temp dir.
That path is shared state three ways: two lanes on one runner write the same file, a
self-hosted runner keeps it between jobs, and a test that executes the arm writes it on
the host machine.

Fixed by staging it under ${RUNNER_TEMP:-/tmp} in all three, matching the twelve
sibling spellings in the same files. This is the root fix rather than the one the finding
names: rewriting the path inside the test would have left the real workflow writing a
shared host path.

New pin test_no_notice_body_is_staged_at_a_hardcoded_host_path. Against the parent it
fails for exactly the three lanes that had the defect, and the parent's own run left
/tmp/ai-override-note.md on the host, which this head's run does not. Enumerated over
all twelve lanes rather than the three named, which surfaced one instance outside this
PR's diff -- claude-review.yml stages /tmp/claude-summary.md. That lane is not touched
here, so the pin records it by name instead of letting the lane filter hide it; fixing it
turns the pin red and prompts the record's update.

Both $RUNNER_TEMP/x and ${RUNNER_TEMP:-/tmp}/x are accepted. Several fork lanes use
the stricter first form, and an earlier draft of this pin wrongly failed them; the rule is
about the literal path, not the spelling.

F1 -- disputed, and the dispute is about the premise rather than the ordering

F1 asks for the head to be reconfirmed after the slot lookup, because the lookup's own
backoff invalidates an earlier head licence. That is correct. Its mirror is also correct,
and was the previous round's finding: with the slot read first, the head check's backoff
invalidates the slot answer. Both reads carry the same six-attempt budget, so whichever
runs second makes the other's answer stale. Reconfirming after the lookup moves the window
a third time rather than closing it, which F1's own adjudication states -- "The remedy the
finding names cannot close the window either".

So the ordering is not where this is decided. The premise underneath it is.

The gate exists because an earlier GPT finding, also fenced-UPHELD, held that turning a
single unretried slot read into a six-attempt read with 5s linear backoff widened the
read-then-write window from milliseconds to about 75 seconds. Measured against the control
flow, that does not hold. find_existing is:

for attempt in 1 2 3 4 5 6; do
  if matches="$(gh api ... )"; then
    lookup_ok=1
    existing=...
    return 0
  fi
  echo "... failed on attempt $attempt."
  if [ "$attempt" -lt 6 ]; then
    sleep "$(( attempt * 5 ))"
  fi
done

The return 0 is inside the success branch and precedes the sleep, which runs only
after a FAILED attempt. So the read that DECIDES a write is adjacent to that write in
both the single-attempt and the budgeted form. The budget lengthens the wait BEFORE an
answer arrives; it does not put backoff between the answer and the write. What did grow
is the step's total duration, by at most 75s on a step already minutes long, which is a
marginal change rather than a milliseconds-to-75s one.

If that measurement stands, the head licence was built on a premise that does not hold,
and the three findings it has since produced -- the unbudgeted head read, the premature
head question on the replacing arms, and the create-after-backoff window -- are all
consequences of the mechanism rather than of the defect this PR set out to fix. First
Principles item 5 asked for exactly that removal as a Subtraction, and was declined on the
strength of the premise now in question.

Removing a fix that answered a fenced-UPHELD finding is not a change to make from inside
the PR, so nothing is removed here and the gate stays in place. The options, for a
maintainer:

  1. Remove confirm_head and its pins, keeping the lookup budget and the create gate --
    the PR's stated scope, and First Principles item 5's Subtraction.
  2. Route the notice writes through the existing guarded_comment_upsert, whose pre-write
    slot re-read is what closes this window for the verdict path. It needs the notice
    bodies head-stamped, which is the risk GPT review verdict lives in one mutable comment, so an incomplete run hides a blocking finding #8292 describes.
  3. Keep the gate and dispute F1 on the measurement above, accepting the residual that any
    ordering leaves.
  4. Split the gate into its own change, leaving this PR at the lookup budget and create
    gate.

No /ai-review override has been posted and none will be from here.

Evidence

58 tests pass on this head. Against the parent with only the test file replaced: 3 failed
/ 55 passed, the three being exactly the lanes F2 named, plus the reproduced host-path
side effect. Five workflows parse as YAML and every modified step is bash -n clean.
Comment-history gate, black, isort and flake8 clean against the new base.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Sep 25, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Board state on head bd66a68f259b723c1e5f36267ebf5c08e051a5f7. One blocker remains and it
is the one finding under dispute; everything else on this revision is green.

lane verdict on this head
Design Review Design-Verdict: PASS
First Principles Review First-Principles-Verdict: PASS
Opus 5 Review no blocking findings, No findings.
GPT 5.6 Review BLOCKING F1, [BLOCK-MERGE], machine-FLAGGED as a likely edge case

All four are stamped with this head, so none is a stale slot carrying an older
revision's outcome.

Two reds earlier on this revision were infrastructure and both cleared on a second
attempt, with nothing rewritten:

  • Opus 5 Review attempt 1 failed on API rate limit exceeded for installation during
    its permission check. Recovery was measured on other heads first (several review lanes
    completing in 158-378s) and the one permitted re-run per head was spent. Attempt 2
    succeeded.
  • CI held Coverage Combine queued for 27 minutes with an empty runner_name and
    runner_id 0 while all 43 sibling jobs in the same run attached and completed, and no
    newer CI run existed for this head. The runner never attached, so the job was cleared
    with cancel, then rerun --failed, which preserved 42 successes and 1 skip. Attempt 2
    succeeded.

Two things this changes about the earlier disposition.

First Principles has moved from CONCERNS to PASS on this head, so its item-5 Subtraction
asking for confirm_head to be deferred is no longer outstanding. The option that rested
on satisfying that Subtraction is correspondingly weaker.

Three of the four review lanes now pass on exactly the code the remaining finding objects
to, and that finding's own adjudication flags it as a likely edge case, states that the
remedy it names relocates the window rather than closing it, and describes the current
ordering as a documented trade. The measurement in the previous comment stands
unchallenged: find_existing returns from inside its success branch, before the sleep
that runs only after a failed attempt, so the read that decides a write is adjacent to
that write in both the single-attempt and the budgeted form.

The finding is security-class and fenced, so its only clearance path is a human override
by a repository writer. None has been posted from this session and none will be.

@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Evidence on the disputed premise, head bd66a68f259b723c1e5f36267ebf5c08e051a5f7. Two
artefacts, static and runtime, because reading a snippet is not a measurement.

The premise, as it was recorded when the head gate was first added: giving the slot
lookup a six-attempt budget widened the read-then-write window from milliseconds to
about 75 seconds.

1. Static: every path from the deciding read to the write, enumerated

find_existing was parsed into nested blocks and every path the interpreter can take
was walked, with the for unrolled to its exact six iterations and each iteration's
inner if free to take either arm. The enumeration is printed path by path as an
ordered statement list, so it can be checked rather than trusted.

find_existing bodies: 1 distinct across 5 lanes
  643827c783d2606a  design-review.yml, first-principles-review.yml,
                    fork-first-principles-review.yml, fork-ux-review.yml, ux-review.yml

reachable paths through find_existing: 127
paths with a deciding read: 63/127
paths where a sleep sits between the deciding read and the return: 0

On all 63 paths that reach a deciding read, the segment from that read to return 0
traverses exactly three statements -- lookup_ok=1, the existing= assignment, and the
return -- and none is a sleep. Every sleep on every path lies BEFORE the deciding
read, because the success arm returns from inside the loop and the sleep only follows a
FAILED attempt. The other 64 paths never get an answer at all, so they decide no write.

2. Runtime: the real interval, with the backoff actually elapsing

The extracted step scripts were run under a stub gh that timestamps every call to the
nanosecond. sleep was NOT stubbed, so the backoff really happened and is inside these
numbers. The single-attempt form is the real one from this PR's base commit, not a
reconstruction. Both arms drive the override note, which writes unconditionally.

Two intervals are reported because the dispute turns on telling them apart.
read -> write is the gap the premise names. head -> write runs from the head
confirmation's answer to the write, and on a creating arm the slot lookup sits between
them.

scenario read -> write head -> write whole step
base, single-attempt read 5.31 ms n/a (no head read exists) 6.4 ms
head, both reads answer first try 7.97 ms 16.0 ms 17.0 ms
head, slot read fails 2x, real 5+10s backoff 8.47 ms 15033.7 ms 15034.8 ms
head, head read fails 2x, real 5+10s backoff 7.91 ms 15.8 ms 15033.9 ms
head, slot read fails 5x, real 5+10+15+20+25s backoff 8.25 ms 75058.8 ms 75059.9 ms

What the numbers say

read -> write is 5 to 9 milliseconds in every form, including the run that spent a
full 75 seconds of real backoff. The budget's elapsed time is spent waiting for an
answer, never between the answer and the write. The premise is refuted by measurement
and not only by reading: it is 8.25 ms where it predicted about 75 seconds.

The 75-second figure is real. It belongs to head -> write, which reaches 75058.8 ms in
the last row. Those two gaps were conflated, and that is the whole of the disagreement.

The second consequence matters as much as the first. On the base form head -> write
does not exist, because there is no head read to be stale. That gap was created by the
head confirmation, which was added to answer the premise. So the mechanism introduced
the window the premise wrongly attributed to the budget.

This does not clear the current finding. It is a security-class fenced finding and its
only clearance path is a human override, which has not been posted from this session and
will not be. What the evidence bears on is whether the mechanism the finding is about
should exist at all, and that is a maintainer's decision, not this PR's.

Reproduce with the two scripts used here, both kept outside the repository tree in this
session's scratch directory: cfg_enumerate.py prints the full path enumeration, and
measure_window.py prints the table. Each reads the workflows straight out of the
checkout and the base commit, so neither carries any state of its own.

@bolichen97

Copy link
Copy Markdown
Contributor

/ai-review override gpt bd66a68: the loss-bearing variant needs a push after confirm_head (which cancel-in-progress kills this very run on) AND the newer head's 30-minute agentic review to publish inside the same <=75s find_existing backoff, so its two conditions contradict; the body that can land that fast is an override note carrying the superseded $HEAD and no [DESIGN-REVIEWED] <sha> stamp, which a re-run restores and the freshness reader blocks rather than passes.

Verified independently against .github/workflows/design-review.yml at this head, not from the pre-drafted text:

  • concurrency: group: design-review-${{ github.event.pull_request.number }} with cancel-in-progress: true (lines 23-25) — the push that would move the head cancels this run.
  • find_existing retries 1..6 sleeping attempt * 5 (lines 594-609), so 75s is the ceiling and only in the all-reads-fail case; a successful read returns at once.
  • The override arm PATCHes only under head_unchanged -eq 1 (line 663), and its body is a human override accepted note stamped with $HEAD, never a [DESIGN-REVIEWED] <current sha> verdict — so a wrong write is loud, and the newer lane refuses an occupied slot rather than going green.
  • The named fix (recheck the head after the lookup, re-read the slot before POST) relocates the window instead of closing it: each added read is itself followed by a gap before the write.

The adjudicator reached the same conclusion and flagged it (flagged=1), and the ordering at lines 657-660 is a documented trade that spends this window to buy out the duplicate-comment class, which has no automatic recovery at all.

Authorizer: bolichen97.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@bolichen97 marked the gpt AI finding as false positive, not applicable, or explicitly accepted for bd66a68f259b723c1e5f36267ebf5c08e051a5f7.

the loss-bearing variant needs a push after confirm_head (which cancel-in-progress kills this very run on) AND the newer head's 30-minute agentic review to publish inside the same <=75s find_existing backoff, so its two conditions contradict; the body that can land that fast is an override note carrying the superseded $HEAD and no [DESIGN-REVIEWED] <sha> stamp, which a re-run restores and the freshness reader blocks rather than passes.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants