Skip to content

pm tooling: the claim-branch reader knows only issue-named branches, so a card thread's push branch fails or reads UNDETERMINED in the PR-body claim guard #39703

Description

@objectstack-fleet

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

Found while landing PR #39684 (#39208 + #38589), L1 nit N3 (7413406069), and on PR #39657 (#38749).
Filing gate: ① a defect the work surfaced. Grading: area:fleet · domain:skills · tooling · Bug · p2 (asked for by the project coordinator for the seat's maintainer thread).

What happens

CLAIM_BRANCH_SHAPE in scripts/pm/check-half-states.mjs matches only claude/issue-N-slug. claimedBranches (same file) uses it, and scripts/check-closing-target-claim.mjs imports claimedBranches for the PR-body claim guard.

A project card thread can push only to its own claude/project-thread-<id> branch. So:

  • A claim whose Branch: line names the card thread's branch reads as no branch (UNDETERMINED, a warning).
  • A claim that names the retired issue branch anywhere on its Branch: line, even in a note, reads as that branch, and the guard accuses the PR (red).

Measured: #38749 needed a claim amendment and then a full re-claim (7410283613, 7410395815, 7410440305) before PR #39657's guard passed; #39208 and #38589 needed three re-claims each (latest 7412772281, 7412782366) before PR #39684's guard passed. The stale red cell then stays on the head.

What is owed

The claim-branch reader accepts the card-thread branch shape claude/project-thread-<id> beside claude/issue-N-slug, so a claim naming the card thread's branch reads as that branch and the guard judges it like any other. Pin both shapes in check-half-states.mjs's self-test and in check-closing-target-claim.mjs's self-test (match, mismatch, retired-branch note on a separate line).

Responsibility: PM tooling in this repo; no existing path covers it; every seat that resumes a card in a project card thread reaches it.

Re-check: grep -n "CLAIM_BRANCH_SHAPE = " scripts/pm/check-half-states.mjs

Activity

  1. added
    tooling
    priority:p2
    pm:queue
    domain:skills
    on Dec 4, 2026
  2. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

    triage@hotlong · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:fleet · domain:skills · Bug · p2 · pm:queue · size S, touched 2026-12-04T14:26Z. Rationale: CLAIM_BRANCH_SHAPE knows only issue-named branches, so a card thread's push branch fails the claim-branch read or is misread. Fleet tooling that blocks landings is p2 as filed, and the type is already Bug. Governed path, fable tier. Labels stand.
    Grade: p2 · pm:queue · size S · claimable when pm:queue.

  3. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop round 2
    Session: session_01ASNY8VYEJsv7qCYaPgM6nB
    Account: os-mickey
    Branch: claude/issue-39703-card-thread-claim-branch
    Worktree: objectstack-issue-39703
    Domain: domain:skills
    Seat: repo:objectstack@os-mickey
    File surface: scripts/pm/check-half-states.mjs (CLAIM_BRANCH_SHAPE and claimedBranches at their current home, near line 6144, and their self-test rows; no new code elsewhere in that 39k-line file), scripts/check-closing-target-claim.mjs (its self-test rows). Stop on breach; explain in the report.
    Container & model: S, mode:subagent, model: default (dispatch-gates --tier: no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: fleet tooling, objectstack: CLAIM_BRANCH_SHAPE (scripts/pm/check-half-states.mjs:6144) matches only claude/issue-N-slug | no platform path covers it | every seat that resumes a card in a project card thread, today (#38749, #39208, #38589 measured on the card)
    Thread-read: 7414352104
    Premise: holds — on origin/main 758cd97, CLAIM_BRANCH_SHAPE = /claude\/issue-\d+-[A-Za-z0-9][A-Za-z0-9._-]*/g (scripts/pm/check-half-states.mjs:6144); there is no project-thread arm.
    Pre-claim lane: domain:skills file ownership (non-gate scripts/pm/**; scripts/check-closing-target-claim.mjs is the PR-body guard that imports the reader).
    Pre-claim deps: none named on the card.
    Prior rulings read: check-prior-rulings.mjs --card 39703 --paths … — card thread: 0 rulings; the ADR and AGENTS.md hits are term coincidences on "claim"/"branch" (read by title, none governs the branch-shape reader).
    Serial constraints cleared: check-handover.mjs --inflight reads OVERLAP with #39677, this seat's own claim. Its File surface: line names check-half-states.mjs only as the module its self-test imports from, and PR #39716's file list does not touch that file, so this is not a true overlap. #39628 / #39627 (os-tesla, H48 in the same file) have landed (1802815).

  4. added
    pm:dispatched
    and removed
    pm:queue
    on Dec 4, 2026
  5. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

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

    {
      "issue": 39703,
      "status": "done",
      "branch": "claude/issue-39703-card-thread-claim-branch",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39734",
      "session": "session_01ASNY8VYEJsv7qCYaPgM6nB",
      "premise_still_valid": true,
      "summary": "CLAIM_BRANCH_SHAPE (scripts/pm/check-half-states.mjs, now line 6163 after its header note) gains a card-thread arm: claude/(issue-N | project-thread)-ID, the id taking the issue slug's class, so claimedBranches, governance, H46 and the closing-target guard read a claim naming claude/project-thread-ID as that branch. Id class chosen from 320 live claude/project-thread heads (315 six-char lowercase alnum, 5 suffixed e.g. -wip, -pr2, -dwhq6r-25697-verify); a narrower class would truncate a suffixed branch to its base, pinned. Importers judged: check-closing-target-claim (via h46ClaimNamesBranch/claimGovernance) and check-handover claimPulls now see thread branches as intended; H20/H27 probe them as refs; H37 is the one reader needing an issue number (branchNameTarget) and already skips null, so branchNameTarget stays issue-only (pinned). The card's second failure mode (retired issue branch on the same Branch: line accusing the PR) is cured by the widening itself since the guard asks whether the head is among the claimed branches; the line still reads every branch (plural Branches: lists are legitimate), so no first-token-wins; a note on a separate line is not read (pinned). Three yield-battery rows in check-half-states and one in check-closing-target-claim that pinned the old reading (card-thread winner = malformed / UNDETERMINED) were rewritten to the new reading.",
      "tests": "At head 5af555e909: 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 node scripts/pm/check-handover.mjs --self-test exit 0 '116 cases pass'. Ablation 1 (new arm removed on disk): half-states exit 1, 8 of 5529 failed (4 new claimedBranches rows, H46 MATCH, 3 rewritten yield rows); closing-target-claim exit 1, 4 of 125 failed (no-warning row, MISMATCH, retired-note row, rewritten yield row). Note: the closing-target MATCH exit-code row alone stays green under ablation because UNDETERMINED exits 0; its sibling no-warning row is the one that reds. Ablation 2 (id class narrowed to [a-z0-9]{6}): half-states exit 1, 1 of 5529 failed (suffixed-branch row read 'claude/project-thread-dwhq6r'). Restored via git checkout, both green.",
      "gates": "Local, head 5af555e909: dispatch-gates --commands derived 69; 68 run each exit 0 (exit captured before any pipe, output redirected to file); pnpm check:pm-dispatch-gates exit 0 '2926 cases pass' (first attempt killed by my own 240s timeout, exit 124, rerun 380s exit 0); NOT MEASURED: pnpm check:i18n-coverage exit 3 PREREQUISITE NOT MET (needs CLI + example build closure dist; scripts-only diff; CI). --ran reconciliation: '69 derived, 68 run, 1 NOT-MEASURED, 0 UNRUN'. check-platform-checklist --changed-from origin/main exit 0 (0 anchored files). Control-char scan of both files: no hits. CI on PR #39734 at report time: Check Changeset=success; Lint, Type Check, PR-body guards (claim · duplicate · Part-of · single-writer path), Live half-state sweep and the rest in_progress; dogfood/opt-in rows skipped. CI convergence left to PM.",
      "line_budget": "58 changed lines (+53 / -5) over 2 files, under the 3000 human-merge threshold; check-half-states.mjs grew by its constant header note and 15 self-test rows only.",
      "files_changed": ["scripts/pm/check-half-states.mjs", "scripts/check-closing-target-claim.mjs"],
      "deviations": "1) The dispatch order says every GitHub write opens with the seat line; os-dev.md says the PR body's first line is Fixes #N. The PR body opens with 'Fixes #39703' and carries the seat line as its second line (os-dev.md wins on conflict). 2) First commit was amended locally before push to drop a 'Fixes #39703' line from the commit message (no card trailers in commits); nothing pushed was rewritten. 3) check-closing-target-claim.mjs header prose still describes the Branch: line as naming claude/issue-N-slug and warns against widening the reader; left as is (fence: self-test rows only in that file), named in the PR's Acceptance notes.",
      "mcp_calls": "0",
      "api_writes": "3 — git push (claude/issue-39703-card-thread-claim-branch, plus the dev-worktree empty probe push before it); fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls draft, POST /issues/39734/assignees os-mickey, POST /issues/39734/labels skip-changeset) via relay run 47368183639, read back identical; os-dev-report comment on #39703 via post-stamped.mjs",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "withheld",
      "out_of_scope_findings": ["carrier: none · noted, not filed — both script headers (check-half-states claimGovernance + H60 banner, check-closing-target-claim) say the branch reader is never to be widened for the latest spelling; this card widens the SHAPE by ruling, and the check-closing-target-claim header prose naming only claude/issue-N-slug is now stale (PR Acceptance notes)."]
    }
  6. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim amendment · 2026-12-04T15:48Z · L1 REWORK on PR #39734 (header prose that this change makes false)
    File surface: scripts/pm/check-half-states.mjs (CLAIM_BRANCH_SHAPE, claimedBranches and their self-test rows only), scripts/check-closing-target-claim.mjs (its self-test rows, plus the header and remedy prose that name only claude/issue-N-slug as the claim branch). Stop on breach; explain in the report.
    Ruling scope, the seat's reading: the 2026-08-11 ruling (⛔ 不放宽谓词) and both headers' "⛔ never widen the reader for whichever spelling was measured last" govern SPELLINGS of the claim line. A card thread's claude/project-thread-<id> is the branch the platform forces that thread to push to: a second real branch SHAPE, not a dialect. The widening therefore stays inside the ruling. The maintainer may veto this reading.

  7. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

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

    {
     "issue": 39703,
     "status": "done",
     "branch": "claude/issue-39703-card-thread-claim-branch",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/39734",
     "session": "session_01ASNY8VYEJsv7qCYaPgM6nB",
     "premise_still_valid": true,
     "summary": "L1 rework round, head 7b30853002, after claim amendment 7416449736. The check-closing-target-claim header (line 19) now names claude/project-thread-<id> beside claude/issue-N-slug as a claim branch. The two 'never widen the reader for whichever spelling was measured last' passages still stand (check-closing-target-claim header around line 147, and the claimGovernance header in check-half-states around line 6341). Each gained one sentence saying the card-thread arm (#39703) is a second branch SHAPE the platform forces, not a spelling. The remedy text around line 659 names the PR's own head (ctx.head) rather than a branch shape, so it needed no change. Net change: +7 / -4 lines across both files. Earlier round, unchanged: CLAIM_BRANCH_SHAPE matches claude/(issue-N | project-thread)-ID, with the id in the issue slug's character class (chosen from 320 live heads: 315 six-character, 5 suffixed). branchNameTarget stays issue-only, so H37 skips thread branches. A retired branch in a note on a separate line is not read, and every branch named on the Branch: line is still read. Self-test rows pin match, mismatch and the retired-branch note in both scripts.",
     "tests": "At head 7b30853002: 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'. This round changed only comments, so no ablation was owed. Ablation from the earlier round, at head 5af555e909, still applies: with the new arm removed, half-states failed 8 of 5529 and closing-target-claim failed 4 of 125; with the id class narrowed, half-states failed 1 of 5529; both were green after restore.",
     "gates": "Local, head 7b30853002. dispatch-gates --commands re-derived the same 69 commands. 68 ran, each exit 0, with exit codes captured before any pipe; pnpm check:pm-dispatch-gates took 366.5s and exited 0. NOT MEASURED: pnpm check:i18n-coverage, exit 3 PREREQUISITE NOT MET (needs the CLI and example build closure; scripts-only diff; CI runs it). --ran: '69 derived, 68 run, 1 NOT-MEASURED, 0 UNRUN'. check-platform-checklist --changed-from origin/main exit 0. CI on the new head was not read; convergence is left to the PM.",
     "line_budget": "Rework round: +7 / -4 across 2 files, comment prose only. PR total is about 69 changed lines, under the 3000-line threshold.",
     "files_changed": [
      "scripts/pm/check-half-states.mjs",
      "scripts/check-closing-target-claim.mjs"
     ],
     "deviations": "1) dev-worktree.sh refused the resume because local branch claude/issue-39703-card-thread-claim-branch still existed at the pushed sha 5af555e909, so I attached the worktree to it with git worktree add, then ran pnpm install. 2) Claim amendment 7416449736 limits check-half-states.mjs to CLAIM_BRANCH_SHAPE, claimedBranches and their self-test rows, but the coordinator's rework order puts one sentence beside the claimGovernance passage (around line 6341). I followed the order: one comment line, no code. 3) Carried from the earlier round: the PR body opens with 'Fixes #39703' and has the seat line as its second line. The body now also ends with the signed trailer the order asked for. 4) Carried from the earlier round: I amended my first commit locally before its first push to drop a Fixes line. The out-of-scope prose item from the earlier round is now fixed in this round.",
     "mcp_calls": "0",
     "api_writes": "Rework round: 3 — (1) git push 5af555e909..7b30853002; (2) relay issue_patch on PR #39734's body, with the signed trailer, read back identical (5487 bytes); (3) os-dev-report comment on #39703 via post-stamped.mjs. The earlier round made 3 more (push, pr_create, report comment 7416385819).",
     "classifier_refusals": [],
     "open_questions": [],
     "security_findings": "withheld",
     "out_of_scope_findings": []
    }
  8. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

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

    ACCEPT → PR #39734 comment 7417743726 (head 7b308530). Not governed: readied and armed for auto-merge by the owning seat; Fixes closes this card on merge.

  9. objectstack-fleet commented on Dec 4, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Reading Value
    PR #39734 MERGED 2026-12-04T16:55:33Z as bb33484408
    sweep-closed-cards.mjs --pr 39734 #39703 closed by this merge, the one named target; nothing else closed

    Close-out: pm:dispatched and the seat's assignee removed. Delivered: the claim-branch readers in check-half-states.mjs and check-closing-target-claim.mjs accept the card-thread branch shape claude/project-thread-<id>; H37 still skips thread branches. Left over: none.

  10. removed
    pm:dispatched
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:fleetdomain:skillspriority:p2tooling

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions