Repository navigation
fix(pm): a claim its own session later yielded is not the card's claim - #26016
Merged
Merged
Conversation
The race re-read rule makes the loser yield in a comment, never by deleting its claim, so the loser's claim is always the newer one. claimGovernance read it as the governing claim and h46ClaimNamesBranch still counted it, so the closing-target guard went red on the winner's PR. yieldedClaimIndexes (exported once from check-half-states) recognises the protocol's `already claimed — yielding` first line naming exactly one session, and withdraws only the earlier claims whose Session: line names that session. Both readers skip them; the guard imports the same predicate. Claude-Session: https://claude.ai/code/session_01LqKsGyMNFwwnbF5FTAqyPn Co-authored-by: Claude <noreply@anthropic.com>
…parator is strict equality Claude-Session: https://claude.ai/code/session_01LqKsGyMNFwwnbF5FTAqyPn Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
席位核对 — ACCEPT ·
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #25791
Clause-②: no
Metadata-protocol: none
What this changes
A
Claim:comment that its own session later yielded is no longer read as a claim of the card. This applies in both claim readers inscripts/pm/check-half-states.mjs, and through them in the closing-target guard (scripts/check-closing-target-claim.mjs, check-run "The card this PR closes must claim this branch").yieldedClaimIndexes(commentRows), the only recogniser. It takes REST rows or bare bodies and returns the indexes of yielded claims. A claim counts as yielded only when all three of these hold:already claimed — yielding(CLAIM_YIELD_MARKER, read through the shippedmarkerMatchesdecoration reading; no dash or wording dialect);SEAT_SESSION_ID);claimSessionId: the first session id on itsSession:line) is that session, and the claim precedes the yield (created_atwhen both parse and differ, thread order otherwise, the same ruleclaimGovernanceuses).claimGovernanceskips yielded claims for both of its readings (governingand the newest-claimmalformedreading).h46ClaimNamesBranchskips yielded claims, so H46 leg (b) and the guard's positive predicate agree with governance.What the card's "Wanted" section asked to keep, kept: a yield naming no session, a yield naming two sessions, a hyphen-written yield, a yield by another session, and a
Claim:the yielding session posts after its yield all keep today's reading. Only the yield's first line is read. The measured yield names the winning claim and its session in its body, and reading the whole body would withdraw the winner's claim.The yield spelling already in use was machine-readable enough, so
execution-duties.mdis not touched, and this PR changes no governed surface.Mechanism, measured on PR #25780's thread (card #25729) at
origin/main05f7758fReaders run over the live comment rows of #25729:
claimGovernancebeforeh46ClaimNamesBranch(loser branch)beforemalformednull, so the guard said UNCLAIMED (red, run 40183909709)malformed= A, so UNDETERMINED (pass, warned)malformed= re-post (UNDETERMINED)malformed= re-post (unchanged)All three PM hypotheses held. (1)
CLAIM_BRANCH_SHAPEgives zero branches forclaude/project-thread-biervl. (2) The.somecounted the yielded claim. (3)newestincluded the yielded claim. With the yield skipped in both readers, the measured red goes away, and a PR on the yielded branch no longer passes on a claim whose session yielded it.Tests
node scripts/check-closing-target-claim.mjs --self-test: 121 cases pass. New battery "A claim its own session later YIELDED is not the card's claim" (16 cases, pinned at 16; the roster floor goes 12 to 13). It covers the acceptance pair: claim A on a protocol branch, claim B, B yields. The guard is CLEAN for A (one comment page) and a FINDING for B, and the failure names A's branch. It also covers the card-thread winner (no red; UNDETERMINED, warned), the five today's-reading controls, and the no-fork pin: CLAIMED equals the shippedh46ClaimNamesBranchover every yield fixture.node scripts/pm/check-half-states.mjs --self-test: 4962 cases pass. New battery "Yielded claim reading" with 21 cases (pinned at 19). It holds the measured pm-dispatch model tiering: a card whose surface touchesdocs/adr/**is dispatched at CONTRACT_REVIEW_TIER with effort xhigh, no one-line exit #25729 race verbatim in the lines the readers read, a protocol-branch control, the decoration, precedence and bare-body cases, and the controls that must withdraw nothing. Every pre-existing case stays green.Gates (local, at
f32ecea4)node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 43 families from the two changed paths. Each was run with its exit code captured before any pipe, and all 43 exited 0. That includespnpm check:closing-target-claim,pnpm check:pm-half-statesandpnpm check:pm-dispatch-gates, the last underos-verify-lock: "VERDICT command-exit 0", fast tier 1917 cases.--ranreconciliation: "✓ dispatch-gates --ran: 43 derived famil(ies) accounted for — 43 run, 0 NOT-MEASURED (a DERIVED zero — all 43 recorded an exit code and none of them is 3)."scripts/pm/**andscripts/check-*publish nothing, so the PR carriesskip-changeset.Acceptance notes
CLAIM_BRANCH_SHAPEparses only theclaude/issue-N-slugshape. A claim naming a card-thread branch (claude/project-thread-…) therefore gives no branch, and every such PR reads UNDETERMINED in this guard. That includes this PR, whose card claim namesclaude/project-thread-1r3slx. On a race whose winner is on such a branch, the loser's PR also reads UNDETERMINED rather than red. The self-test pins that it is no longer CLAIMED, and nothing further. The guard header records why the branch reader is not widened here (the 2026-08-11 ruling; the repair direction is the write side). The report carries it as a finding for the seat.Claim:would still be read as a claim, as today. No such yield was measured. This is noted only.Generated by Claude Code