Skip to content

fix(pm): claim-branch reader accepts the card-thread branch shape - #39734

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-39703-card-thread-claim-branch
Dec 4, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-39703-card-thread-claim-branch

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #39703
repo:objectstack@os-mickey · os-mickey · session_01ASNY8VYEJsv7qCYaPgM6nB
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户无感:车队内部的认领读取器现在认得卡线程自己的推送分支,合并前的认领守卫不再对这类拉取请求误报未定或误判红。
  • 替在项目卡线程里续做卡片的各席位解决反复重贴认领才能过守卫的问题。
  • 出错时最坏是守卫把一条卡线程分支的认领判为已认领,影响只在内部检查,可直接撤回此次改动。
  • 无

What changes

  • The claim-branch shape constant in the half-states module gains a second arm: beside the issue-branch shape (claude/issue-N-slug) it now matches the card-thread shape (claude/project-thread-ID). The id takes the same character class as the issue slug, so a suffixed thread branch is read whole rather than truncated to its base.
  • The line anchor of the Branch: reader is untouched; only the branch shape widens. A thread branch in prose or on a non-Branch: line is still not read.
  • The anchored card-number reader (branchNameTarget) stays issue-only on purpose: a thread branch names no card number, and the one reader that feeds claim branches into it (H37's fold roster) already skips a null answer.
  • Prose: the closing-target-claim header names the card-thread branch beside the issue branch as a claim branch, and the two "never widen the reader for the latest spelling" passages (closing-target-claim header, claimGovernance header) each gain one sentence: the card-thread arm is a second branch SHAPE the platform forces, not a spelling. The passages themselves stand.
  • Self-test rows in both scripts: match, mismatch, and a retired issue branch named in a note on a separate line. The yield-race rows that pinned the old reading (the winner's card-thread claim read as malformed / UNDETERMINED) now pin the new one (it governs; CLAIMED, no warning).

Read first (by risk):

  1. scripts/pm/check-half-states.mjs: the CLAIM_BRANCH_SHAPE constant and its header note. Risk: every claim reader (H20 ref probe, H27, H37, H46, governance, the handover reconciler) now sees thread branches.
  2. scripts/check-closing-target-claim.mjs: the new rows at the end of the acceptance-pair battery, the rewritten card-thread row in the yield battery, and the header prose.

Tests

Both self-tests at head 7b30853
  • node scripts/pm/check-half-states.mjs --self-test: exit 0, "5529 cases pass".
  • node scripts/check-closing-target-claim.mjs --self-test: exit 0, "125 cases pass".
  • Consumer of the reader, unchanged: node scripts/pm/check-handover.mjs --self-test: exit 0, "116 cases pass".
Ablation (head 5af555e): the new arm removed on disk, then restored

Constant reverted to the issue-only shape: half-states self-test exit 1, 8 of 5529 failed (the 4 new reader rows, the H46 MATCH row, the 3 rewritten yield rows); closing-target-claim self-test exit 1, 4 of 125 failed (the no-warning row, MISMATCH, the retired-note row, the rewritten yield row).
Id class narrowed to the measured six-character base: half-states exit 1, 1 of 5529 failed (the suffixed-branch row, which read the truncated base thread).
Restored with git checkout; both suites green again.

Derived gate families (dispatch-gates --commands, 69) at head 7b30853

68 run, exit 0 each; 1 NOT MEASURED: pnpm check:i18n-coverage refuses with its own prerequisite (exit 3, needs the CLI and example build closure); this diff touches scripts only, CI runs it. --ran reconciliation: 69 derived, 68 run, 1 NOT-MEASURED, 0 UNRUN. check-platform-checklist --changed-from origin/main: exit 0, 0 anchored files.

Acceptance notes

  • Measured spelling: 320 live heads under claude/project-thread on 2026-12-04; 315 are a six-character lowercase-alphanumeric id, 5 carry a suffix (wip, evidence, pr2, a card number plus verify). The slug class covers all 320.
  • The second failure mode on the card (a retired issue branch on the same Branch: line accuses the PR) is cured by the widening itself: the guard's positive predicate asks whether the head is among the claimed branches, and the thread branch now is. A same-line note still adds the retired branch to the claimed set (the permissive direction); the reader keeps reading every branch on the line, because the plural Branches: line legitimately lists several. The card's pinned case, a note on a separate line, is not read at all.
  • Both script headers keep their prose that the branch reader is not to be widened for a new spelling; each now says in one sentence that the card-thread arm is a second branch shape the platform forces, not a spelling (the seat's reading of the 2026-08-11 ruling's scope is in claim amendment 7416449736; the maintainer may veto it). The closing-target-claim remedy text names the PR's own head, not a shape, so it needed no change.
  • No changeset: both paths are repo scripts, the root package is private, nothing ships.

Verification

Two minutes: node scripts/check-closing-target-claim.mjs --self-test | grep 39703 prints two passing rows naming #39703 (MATCH clean; the yield winner CLAIMED with no warning).


Generated by Claude Code

CLAIM_BRANCH_SHAPE now matches claude/project-thread-ID beside
claude/issue-N-slug, so a claim naming a card thread's push branch reads
as that branch and the closing-target guard judges it like any other.
Self-test rows pin match, mismatch and a retired-branch note on a
separate line in both readers.

Claude-Session: https://claude.ai/code/session_01ASNY8VYEJsv7qCYaPgM6nB
Co-authored-by: Claude <noreply@anthropic.com>
The closing-target-claim header now names claude/project-thread-<id>
beside claude/issue-N-slug as a claim branch, and the two "never widen
the reader for the latest spelling" passages each say the card-thread
arm is a second branch shape the platform forces, not a spelling.

Claude-Session: https://claude.ai/code/session_01ASNY8VYEJsv7qCYaPgM6nB
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-mickey · os-mickey · session_01ASNY8VYEJsv7qCYaPgM6nB

席位核对

ACCEPT · head 7b308530 · read 2026-12-04T16:38Z

  • Shape: draft against main, first line Fixes #39703, skip-changeset. Two files: scripts/pm/check-half-states.mjs (CLAIM_BRANCH_SHAPE gains the claude/project-thread-<id> arm, self-test rows) and scripts/check-closing-target-claim.mjs (the same arm, self-test rows, header prose). +60 / −9.
  • Premises measured: the rework round (5af555e..7b30853, +7 / −4) is comment prose only: the header now names the card-thread branch, and each "never widen" passage gains one sentence that the arm is a second branch shape, not a spelling, the reading recorded in claim amendment 7416449736. branchNameTarget stays issue-only. check-governed-merges.mjs --pr 39734: NOT governed. landing-k.mjs: K = 2.
  • Check-runs on this head: 32 success, 24 skipped, 0 failure, none in progress.
  • Contract review: not owed (no contract surface, Clause-②: no).
  • Accepted deviations: the dev's one comment sentence beside the claimGovernance passage sits outside the amended file-surface list but is the seat's own rework order; no code moved.
  • Out of scope: none. Skills-docs: not owed.
  • Landing: ordinary queue landing by the owning seat — this stroke readies the pull and arms auto-merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 4, 2026 16:38
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit bb33484 Dec 4, 2026
57 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-39703-card-thread-claim-branch branch December 4, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants