Skip to content

fix(source-control): wait out the read floor's reset in the merge-queue verify read - #17382

Merged
kyle-sexton merged 7 commits into
mainfrom
fix/pr-verify-read-floor-wait
Nov 19, 2026
Merged

kyle-sexton merged 7 commits into
mainfrom
fix/pr-verify-read-floor-wait

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #17377
Refs: #16642

Summary

In merge-group runs, ci-status's verdict reader (babysit_verify_evidence.py evidence) refused verify:unreadable whenever babysit_gh did not send a read below github-token's read floor (BABYSIT_READ_FLOOR_STOP). That ejected the lane pull request until it got a new head or a person stepped in: 21 merge_group runs on 8 lane PRs between 03:46Z and 05:14Z on 2026-11-19. Owner decision D417 (Q226): on a read-floor refusal, wait for the pool reset and read again. The budget comes from a new WAIT_BUDGET_SECONDS key, and a read that still cannot be made after the wait reports as it does today.

Fix

  • Wait and judge again. babysit_gh records the reset of each pool it refuses below the floor (read_floor_refusals). The evidence command is now wrapped by _after_the_read_floor. When the judgment is verify:unreadable, at least one read-floor refusal was recorded, and every refused pool's reset is within BABYSIT_READ_FLOOR_WAIT_SECONDS, it:
    • sleeps until the reset,
    • drops those readings,
    • judges once more with a fresh Reader, so no failed-read memo carries over.
  • Otherwise the first judgment stands. That covers a reset that is too far away, no reset header, or no wait set. A stderr line names the reason.
  • The wait happens above every listing and page deadline, so those deadlines do not count it.
  • Budget: WAIT_BUDGET_SECONDS.ciStatusVerify: 900 in .github/actions/log-api-budget/rate-guard.mjs. No Python or shell mirror of WAIT_BUDGET_SECONDS exists (git grep over *.py, *.sh and *.bash).
    • The value is passed as BABYSIT_READ_FLOOR_WAIT_SECONDS=900 on the lanes App reader's python3 line only. The other judged-author reader never holds on unreadable, so it does not wait.
    • The ci-status timeout goes from 20 to 35 minutes: GH_READ_JOB_SECONDS (1200) plus the wait.
    • rate-guard.test.mjs pins the literal and the timeout to the key.
  • Why 900 s and not D410's 1200 s:
    • The main merge queue's check_response_timeout_minutes is 30 (gh api repos/melodic-software/claude-code-plugins/rules/branches/main).
    • The slowest of the last 30 merge_group runs that passed took about 11.5 minutes (gh run list --event merge_group).
    • 1200 s would push an entry past the queue's timeout. 900 s leaves about 3.5 minutes of margin.
  • fix(source-control): report an unreadable pass as verify:unreadable, not verify:missing #17377: a PASS or PASS-NOTES at the head whose run read fails now refuses verify:unreadable, not verify:missing.
    • This applies only where the chain would otherwise reach too_old or missing. A counted pass beside an unread one still allows.
    • The existing test test_a_pass_whose_run_cannot_be_read_is_missing pinned the old behavior. It is renamed and now expects verify:unreadable.
    • In FAIL index mode, the lanes-hold step's notice no longer says the reader "refused before listing artifacts".
  • Docs: the outage-posture item 1 in docs/conventions/pr-pipeline/README.md, and the step comment, which wrongly said the reader had no read-floor margin.

What the floor compares against. In the job log of run 44463304120, the refusal at 05:15:34Z came with an end-of-job core reading of limit=5000 remaining=2766 used=2234. The floor compares that reading against github-token's limit-cap of 1000 in rate-limits.json, so planned-left is max(0, 1000 - 2234) = 0, under read-floor 0.1 × 1000 (babysit_gh._below). So it floors at 900 used, while 55% of the real 5000-request pool is still left. This is not a stale or misread value. It is the configured planning cap. That window's core reset was 05:46:58Z, 31 minutes after the refusal, so this wait would not have cleared that run. Whether the cap should stay at 1000 is a separate owner decision. This PR leaves it unchanged.

Verification

Run locally against this branch, merged with main:

  • python3 tests/test_babysit_verify_evidence.py: 460 tests OK. The new ARefusalBelowTheReadFloorWaitsForTheReset class drives a real Reader through the real rate guard, with gh faked at run_command and GitHub's rate-limit headers on each answer:
    • a reset within the wait gives a pass after one wait;
    • a reset past the wait stays verify:unreadable and names the budget;
    • with no wait set, the refusal stands.
  • test_babysit_gh_rate_guard.py (57 OK), test_babysit_gh_read_retry.py (42 OK), test_babysit_verify_index.py (48 OK).
  • node --test .github/actions/log-api-budget/rate-guard.test.mjs: 164 pass, including the new pin test. log-api-budget.test.mjs: 85 pass. bash scripts/ci-lanes-pr-hold.test.sh: PASS=345 FAIL=0.
  • Red on the old code: with main's babysit_gh.py, babysit_verify_evidence.py, rate-guard.mjs and pr-require-checks.yml restored, the 3 floor-wait tests error, the fix(source-control): report an unreadable pass as verify:unreadable, not verify:missing #17377 test fails (verify:missing), and the pin test fails.
  • callers.test.mjs was not run locally (no node_modules in the worktree). CI runs it.
  • pr-require-checks.yml is 482,244 bytes, up from 481,459 on main, under the 500 KB workflow limit.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits November 19, 2026 01:09
…ue verify read

ci-status's merge-queue verdict reader refused verify:unreadable when
babysit_gh did not send a read below github-token's read floor, which
ejected lane PRs until a new head or a person. Under
BABYSIT_READ_FLOOR_WAIT_SECONDS the reader now waits for the floored
pool's reset and judges again with a fresh reader, when the reset is
within the wait; otherwise the judgment stands. ci-status passes 900 s,
WAIT_BUDGET_SECONDS.ciStatusVerify in rate-guard.mjs, pinned by
rate-guard.test.mjs, and its timeout grows by that wait (owner decision
D417).

A pass at the head whose run cannot be read now refuses
verify:unreadable instead of verify:missing, unless another counted
pass allows, and the index-mode notice no longer claims the reader
refused before listing.

Closes #17377

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 19, 2026 06:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T06:21:46.076629Z f988f52 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f988f528d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 897dbbff157314f8e4b381eb4e01cedd9e920788: read 12 of 12 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

Scope. I read the full diff in .claude-lane/pr.diff, all 12 listed files and every hunk. This lane already reviewed an earlier head, so this review is blocking only: it reports CRITICAL and IMPORTANT findings only and leaves out SUGGESTIONs.

Trusted paths I checked closely:

  • .github/actions/log-api-budget/rate-guard.mjs
  • .github/workflows/pr-require-checks.yml: the ci-status lanes-hold step, which is a merge hold.
  • babysit_gh.py and babysit_verify_evidence.py, both merge-hold modules.

Merge hold: not weakened.

  • _after_the_read_floor only runs a second judgment when the first one refused verify:unreadable and at least one read-floor refusal was recorded (babysit_verify_evidence.py#L6743-L6744).
  • The second judgment uses a fresh Reader that sends real reads. It can allow only on verdicts that actually read, so no refusal becomes an allow without evidence.
  • Every other path returns the first report unchanged: a reset that is missing or too far away, or no wait set.
  • The fix(source-control): report an unreadable pass as verify:unreadable, not verify:missing #17377 change makes the outcome stricter, not looser. An unread PASS at the head now refuses verify:unreadable instead of verify:missing, and both are refusals. It applies only where the chain would otherwise reach too_old or missing.
  • After a read-floor refusal, the reader skips three things: the .failed note, the UNREAD_RECORD_SECTION cache entry, and the over-count claim (it releases the claim instead). Each only makes a later reader read again rather than refuse from memory. None of them caches an allow.

Inputs. BABYSIT_READ_FLOOR_WAIT_SECONDS is a literal 900 in the workflow (pr-require-checks.yml#L6896). read_floor_wait_seconds accepts only [0-9]{1,5}. The reset value comes from GitHub's x-ratelimit-reset response header and only sets how long the job sleeps, which the job's timeout-minutes caps. No pull-request-controlled text reaches either value.

Trust controls: none touched. The diff does not change the trusted-actor list, the trusted-trigger check, token scope or the token broker, the kill switch, or untrusted-text selection. It touches no plugin manifest and removes no standing instruction.

Settled threads. Both threads on babysit_verify_evidence.py (the floored listing's .failed note and the unread-record cache) and the index-mode notice thread on pr-require-checks.yml are resolved by the owner and marked lines changed since resolution: no. The fixes are in this diff, and I raise nothing more on them.

Spend. ci-status's timeout-minutes goes from 20 to 35, and a merge-group run can now sleep up to 900 s for a rate-limit reset. That spends more Actions runner time per affected run. It is not a billing change and is not counted as a finding.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 2 inline finding(s) on f988f528d5dd9991a372c47d8710776b194c0608; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread .github/workflows/pr-require-checks.yml Resolved
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 897dbbff157314f8e4b381eb4e01cedd9e920788: read 12 of 12 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no blocking findings on #17382 at 897dbbff

This lane already reviewed earlier heads (blocking only: yes), so this review reports blocking findings only. The new head is a merge of origin/main. I read every hunk of all 12 changed files in .claude-lane/pr.diff.

What I checked beyond the diff

  • Read-floor refusal path. _send_once (babysit_gh.py#L423-L433) records the pool's reset and raises ReadsFloored. It writes nothing to the job's stop file, so the second judgment is not stopped by state the first one left behind.
  • No failure is cached for the next Reader. _run_state (babysit_verify_evidence.py#L2699-L2756) keeps an unread run only on the Reader instance, and _default_branch_file caches only successful reads. The .failed and .overcount-fallback notes and the unread-record cache now skip READ_FLOOR_REFUSAL. That was settled at 383da1ef and those lines have not changed since.
  • Merge with main. main brought in D418's export BABYSIT_READ_FLOOR_HEADER_LIMIT=1 (pr-require-checks.yml#L6854). It is exported on its own line, not added to the python3 line (L6896), so the regex in the new rate-guard.test.mjs pin still matches. With D418 the floor is a share of the live 5000 limit, not the 1000 cap. The PR description's example still describes the cap; that is a stale description, not a code defect.
  • Timeouts. timeout-minutes: 35 and GH_READ_JOB_SECONDS: 1200 match both pins (rate-guard.test.mjs and ci-gh-read.test.sh). The existing jobSeconds - margin == ciStatusReads pin is unaffected. The lanes-hold step has no step-level timeout-minutes, so the sleep is not cut short.

Closing issue #17377

  • "A test where the pass's run read fails yields verify:unreadable": met, by test_a_pass_whose_run_cannot_be_read_is_unreadable.
  • "The index-mode notice no longer claims no listing happened": met, by the new case in scripts/ci-lanes-pr-hold.test.sh.

Earlier findings

  • The .failed note blocking the second judgment, and the advisory about an untested index-mode notice: both settled, and their lines have not changed since.

Spend: a merge-queue ci-status run can now take up to 15 more minutes of runner time (one wait of up to 900 s per queue entry). This is ordinary Actions usage, not a billing change.

Loosened-check verdict: fail (the default, since the prompt had no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0.

  • There was no loosened_check_decision_record: line, so I did not check the citation requirement.
  • I found no loosened check. The change raises a job timeout to hold a wait the owner decided on (D417), and it tightens tests.

No plugin manifest changed. Both changelog fragments are bump: patch, which fits a fix.

I ran no tests. The test counts in the PR description are the author's own and I have not checked them.

I dispatched no verifier subagents.

Verifier dropped 0 of 0 candidates.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 19, 2026
@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

The pr-unblock lane stopped resolve-conflicts on this pull request: a conflicted path is a workflow, submodule config or a settings file, which the lane does not resolve. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/conflict status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=17382 -f activity=resolve-conflicts

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44479305151

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44491941158

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44494327321

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44498031282

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44500145569

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44502074037

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44504415172

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

The pr-unblock lane stopped address-feedback on this pull request: the pull request changes .github/workflows/, which the lane token cannot push, so the lane does not address its review threads. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=17382 -f activity=address-feedback

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44523363357

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44525452544

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44544045515

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

…dgment

A listing or record read refused below the read floor left a `.failed`
note, an over-count claim, or a run-cache negative entry, so the second
judgment after the reset refused verify:unreadable without reading.
Floor refusals are no longer noted or cached, and the over-count claim
is released. ci-gh-read.test.sh now takes the verdict reader's 900 s
read-floor wait out of ci-status's timeout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44547545640

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

kyle-sexton and others added 2 commits November 19, 2026 09:50
Main raised GH_READ_MARGIN_SECONDS to 435 and ciStatusReads to 765; this
branch adds ciStatusVerify's 900 s read-floor wait and the note that it
comes out of ci-status's timeout. Both are kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
An index-mode refusal with no saved listing must say it was refused in
FAIL index mode, not before listing artifacts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
Keep both waits #17433 and this branch add: WAIT_BUDGET_SECONDS carries
ciStatusVerify and queuedPr, rate-guard.test.mjs keeps both timeout
tests, and the outage-posture paragraph names both readers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 19, 2026
@melodic-automation-lanes melodic-automation-lanes Bot removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 19, 2026
Merged via the queue into main with commit 402fb52 Nov 19, 2026
119 of 121 checks passed
@kyle-sexton
kyle-sexton deleted the fix/pr-verify-read-floor-wait branch November 19, 2026 16:48
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(source-control): report an unreadable pass as verify:unreadable, not verify:missing

1 participant