Repository navigation
fix(pm): H48 and --handoff read a pull sent back for changes as bounced - #39606
Merged
Merged
Conversation
A bounce-back takes pm:awaiting-merge off, and the label returns only after the fix passes re-review. H48 and `label-write.mjs --handoff --dry-run` still read an ACCEPT plus a same-head PASS with no label as a missing piece, so the next patrol prescribed the label back on a pull the maintainer cannot merge. One shared reader in scripts/pm/bounce-reading.mjs, wired once through `h48BounceReading` in check-half-states, reads three triggers: a red merge-queue build (the merge-queue-triage workflow's comment on the pull thread), a newest contract-review record reading FAIL or carrying an open must-fix or should-fix, and a member's CHANGES_REQUESTED review. A trusted PASS on the current head newer than the newest trigger clears it. H48 stays quiet while bounced and is unjudged when the leg could not be read; --handoff refuses with zero writes (exit 2, never exit 7 under --dry-run). Claude-Session: https://claude.ai/code/session_01L9qibwWshzDX2XGDrhKHAo
Measured on the bounced pull that prompted the card: the maintainer's own review there reads author_association CONTRIBUTOR, so a member-association filter would have ignored the maintainer asking for changes. The reviewer is now trusted through the same binding the records are read through (the relay identity and GOVERNED_APPROVERS), never a second login list. Claude-Session: https://claude.ai/code/session_01L9qibwWshzDX2XGDrhKHAo
Contributor
Author
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv L1-a · ACCEPT · #39606 @
Not Tier H: the seat lands it. |
Contributor
Author
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibxjHbaJSwcu6suJxbB 2026-12-04T10:22Z · Seat record · land PR #39606 (#39516) at head
|
This was referenced Dec 4, 2026
This was referenced Dec 4, 2026
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.
Requested by Tesla · project thread
Fixes #39516
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
A pull sent back for changes ("退回") now reads as BOUNCED in both readers that prescribe the hand-off's pieces, so neither asks for
pm:awaiting-mergeback before the re-review passes (landing-operations.md: 「复审过再挂、入队,其间不补四件」).scripts/pm/bounce-reading.mjs(new, pure, no imports) holds the one "bounced since" reading,bouncedSince. Three triggers, each dated:merge-queue-triage:RUNmarker, authorgithub-actions[bot]). A comment carrying the workflow'sinfra:no-runnermarker is the flake class and does not bounce (ruled term 3: a flake re-queue keeps the label).## Contract reviewrecord (one that names a head) reads FAIL or carries an open must-fix or should-fix.The bounce dates from the newest trigger and clears only on a trusted
## Contract reviewnaming the CURRENT head, with one PASS line and no FAIL spelling or open/unreadable grade (the queue guard's standard), newer than that trigger. An unread thread, review page or author binding readsunread.check-half-states.mjs:h48BounceReadingis the ONE wiring (it hands the sibling this file's contract-review readers, so no import cycle with the file's top-level await). H48 takes the reading as a fourth argument and stays quiet whilebounced; an unconsulted orunreadleg is UNJUDGED (check:react-declaration-parity 是唯一没接进任何 workflow 的源码审计门禁,且无 MANIFEST 时静默 skip 退出 0 —— 它现在永远不可能红 #4690's three states). The sweep buys one submitted-review page only for a PR H48 would otherwise fire on (h48NeedsBounceRead), and the summary clause reports how many read bounced (briefBounced, on the forwarding contract).label-write.mjs --handoff: the gate asks the sameh48BounceReadingover the thread and review page it already reads. A bounced pull is REFUSED with zero writes, exit 2, under--dry-runtoo, so the per-round reader never answers exit 7 and the real stroke never re-adds the label; thenow H48line reads ✓ on it.Merge-queue source used: the merge-queue-triage workflow's comment on the pull thread, neither of the two the dispatch named. Measured on #39400 (2026-12-04): the REST timeline's
removed_from_merge_queueevent carriescommit_id: null, no reason and no run, and it also fires when a person dequeues or the pull merges; GraphQL (which hasbeforeCommit/reason) is not reachable from a session; the queue's check-runs sit on the merge-group commit, never on the pull's head. The triage comment names the red run, is posted exactly for amerge_groupCI run that concluded failure, and lives on the thread both readers already hold (zero new requests for it). Its five comments on #39400 read as five queue-red triggers through the new reader.Tests
Self-tests on the final head (both green)
node scripts/pm/check-half-states.mjs --self-test→✓ check-half-states self-test: 5505 cases pass(was 5476), new batteryH48 bounced pull 29/29.node scripts/pm/label-write.mjs --self-test→✓ label-write self-test: 414 cases pass across 19 batteries(was 401);--handoffbattery pin raised 68 → 81 (at the count).Pins: one cell per trigger, one exit cell per trigger, the control
H48 (
H48 bounced pullbattery): control (unbounced ACCEPT, no label → today's finding withRemedy: add pm:awaiting-merge); ① queue-red → no finding, ① exit (newer PASS on current head) → finding; ② newest record FAIL → none, ② exit → finding; ② open should-fix → none, its closing delta → finding; ③ CHANGES_REQUESTED → none, ③ exit → finding. Controls that keep it a narrowing: no-runner red, foreign triage author, untrusted reviewer, later APPROVED, COMMENTED under a request, newer PASS on an older head, newer PASS by an untrusted author, red before a fix push (still bounced), unconsulted and unread legs UNJUDGED, the gathering policy, the triage workflow still printing both markers (source pin), the sweep wiring (source pin), the summary key.--handoff --dry-run(label-write--handoffbattery): control exit 7; ① dry run exit 2 withnow H48 ✓and zero sends, ① real stroke exit 2 with zero sends, ① exit → exit 7; ② newest record FAIL → exit 2, ② exit → 7; ② open should-fix → exit 2; ③ CHANGES_REQUESTED → exit 2, ③ exit → 7; controls: no-runner, foreign author, later APPROVED, untrusted reviewer → exit 7.Red on main first (base 7039fd6)
7039fd68and run there: 5 red — ① drygot [7,0,0,false,false], ① real strokegot [0,1,0,false,false](exit 0, the label put back), ② FAIL[7,…], ② open[7,…], ③[7,…]; the exit cells and controls are green there (they describe today's behaviour).main's H48 driven with the same trigger fixtures: ① queue-red, ② FAIL, ② open should-fix and ③ (main reads no reviews) each answer a finding whose remedy isadd pm:awaiting-merge.--handoff, a FAIL or open-grade record naming the CURRENT head was already refused onmainby the guard's PASS standard; the ② cells there use the shapemainanswered exit 7 on: the newest record names another head while the older same-head PASS still stands.Ablation of the bounce read (committed head, restored byte-exact)
node scripts/ablation-replace.mjsreplaced the no-trigger return inbouncedSincewith an unconditionalclear(anchor 1 → 0, blob1f2afd85b88e→715b4918b107), ran both self-tests, restored (blob == HEAD,git diff HEADempty). check-half-states: 10 of 5505 red, every trigger cell and every "still quiet" cell; label-write: 5 of 414 red, every trigger cell (the real strokegot [0,1,0,…]). Exit cells and controls stayed green.Acceptance notes
--handoffanswers exit 2 on a bounced pull, not 0. A bounced pull is not a hand-off candidate, the same way a pull with no ACCEPT is refused today; the real stroke must not write the label either, so the refusal covers both.GOVERNED_APPROVERS), notauthor_association: the maintainer's own review on fix(spec)!: refuse a field whose inline options repeat a value #39400 readsCONTRIBUTOR.--handoffstill applies its own stricter same-head PASS check, so the door never hands off on a weaker PASS than before.--self-testof its own: its pins live in its two readers' self-tests, asseat-record.mjs's do (a new CI step would touch a governed workflow).scripts/pm/**publishes nothing (skip-changeseton this pull).Verification
Read first, by risk:
scripts/pm/bounce-reading.mjs—bouncedSince: the trigger set, "newest trigger", and the clearing comparison.scripts/pm/label-write.mjs— the bounce refusal inhandoffGate(after the PASS stands, beforehand-off records ✓).scripts/pm/check-half-states.mjs—h48GovernedVerdictWithoutBrief's newbouncegate and the sweep's review-page buy.Two-minute check:
node scripts/pm/check-half-states.mjs --self-test— expect the last line to listH48 bounced pull 29/29.Generated by Claude Code