Repository navigation
Commit a3570bc
feat(pm): a claim's Thread session line lists its card thread on the seat roster (#34289)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9SSGRNXwP8xci41jNfoVWSR)_
Fixes #34013
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:认领模板新增一行 `Thread
session:`(卡线程自己的会话);名册读取器只认这一种写法,且只读信箱敲门同一作者规则认可的认领评论,把它列进签认领那个席位的信箱名册;H72
巡查挪到在飞卡线程读全之后,把它们交给名册。
- 为什么改:卡线程以席位代理人的身份敲席位信箱,今天这种敲门读作 `unlisted`(未列名)。席位裁定选方案 A(报告
6905063882),本 PR 是卡 #34013 的最后一项。
- 风险与回滚:只动 PM
工具和一行模板文字。认领被释放、被新认领取代或卡已关闭,名册就不再列这个会话;规则外作者的评论一律不算。仍读不全的认领线程让整行签名巡查记为
NOT MEASURED 并点名卡号,不会误报。回滚就是 revert。
- 先看:`scripts/pm/record-recognisers.mjs` 的 `claimDelegate`(作者规则在第一行)与
`claimThreadSession`,`scripts/pm/check-half-states.mjs` 的
`h72RosterListings` 与 H72 在扫描里的新位置,SKILL.md 模板第 314 行。
- 两分钟验证:`node scripts/pm/record-recognisers.mjs --self-test`(新电池 17
例全绿),`pnpm check:pm-skill-ratchet`(SKILL.md 仍 329 行)。
- 需要你做的:无,席位落地(`.claude/**` 为 Tier S,契约复审交 review#2,PASS 后席位入队)。
## What changes
- **Claim template** (`.claude/skills/pm-dispatch/SKILL.md`, 〈模板与表〉):
one new key line after `Session:`, `Thread session:` followed by a
backticked session id (mode:thread only; the card thread's own session,
which knocks the seat mailbox as its delegate; nothing after the id;
omit otherwise).
- Paid in the same file: the 报告契约 line that restated the final report's
`out_of_scope_findings` shape is deleted. Its rule's home is
`.claude/agents/os-dev.md` rule 3 (the `class:` + `reach:` + evidence or
`carrier:` line, and "皆无只进该节") plus the field in the final-report JSON
shape. The line above it in SKILL.md already says the JSON shape lives
in os-dev.md and is not copied. It is not a security-discipline line.
SKILL.md stays at 329 lines (ceiling 329); bytes 33474 → 33519.
- **Reader** (`scripts/pm/record-recognisers.mjs`, beside
`seatSessionRoster`):
- `claimThreadSession(body)`: the one key, in the template's one
spelling. The line starts the line, the value is one backticked session
id in the signature's own session shape, and nothing follows it.
Anything else reads null: a bare id, a bullet, a bold key, a prose tail,
a hyphenated key, a session in prose on the `Session:` line, no key, or
two lines that read as the key.
- `claimDelegate(card, rows)` (module-private) reads the thread's rows
under the author rule first: only rows whose author the knock's own
fence trusts (`MAILBOX_KNOCK_AUTHORS`, through `recordAuthorTrusted`, as
`readMailboxComment` reads it; no second author list). A row with no
author, or one outside the rule, lists nobody and neither supersedes,
yields nor releases a claim. Then: an open card's newest claim
(`latestMarkedComment` over `CLAIM_COMMENT_MARKER`, skipping claims
their own session yielded via `yieldedClaimIndexes`), signed by a seat
(`readSignatureLine`, `seatKey`), naming its card thread, and not
answered by a `Release:` (`releaseAnswersClaim`). All are the existing
readers, imported from `check-half-states.mjs`. No second signature
parser, no second roster. Its docblock states, as intended: the signer's
session is not compared; a claim does not lapse by age; a reopened card
whose newest claim was never released lists that claim's thread again; a
seat whose post is no longer held keeps its open claims' threads listed
until each is released or superseded.
- `seatSessionRoster`'s docblock states the trust root per source: posts
and mailbox openings are bodies only the relay writes (authors not
read); a claim is a comment, so its authors are read (above).
- `seatSessionRoster({ posts, mailboxes, claims })` takes a third
listing, `{ card, rows }` per open claimed card, and lists the delegate
for the seat the claim is signed by. `claims` not an array (or a thread
not an array) reads the roster unreadable, naming the claim threads.
Omitting `claims` lists no card thread, the reading before this PR.
- The `--mailbox-keys` signature line, the self-test summary and
`knockSignature`'s "lists no session" reason name the third source.
- **H72** (`scripts/pm/check-half-states.mjs`):
- `h72RosterListings(issues, pulls, truncated, threads)` hands the
roster the open `pm:dispatched` cards with the whole thread the sweep
holds. A card whose thread is missing or not whole, or a truncated
`listIssues(pm:dispatched)` page, makes `claims` null, so the roster
reads unreadable and the signature row is UNJUDGED (NOT MEASURED via the
existing `mailboxRosterReason` clause), never clean and never a smaller
roster.
- It also returns `unheld`, the numbers of the open `pm:dispatched`
cards whose thread is not held whole; `h72RosterReason` puts them in the
NOT MEASURED reason, so a seat can find them.
- The H72 block now runs AFTER the dispatch-liveness loop (H50's
completing walk), not beside the PR listing. Before that loop two
populations of open `pm:dispatched` cards had no whole thread in the
cache: a card with no assignee (H2 reads only assigned cards) and a card
whose first page came back full. H50 walks every open `pm:dispatched`
card, first page included, so after it both are held, at no request
beyond the ones H50 already makes. The threads come from
`commentCache.get`, whole only when the walk says so. What can stay
unheld is H50's own residue (a walk still full at its page ceiling, or a
failed page): while such a card is open, the signature half stays
UNJUDGED every sweep, and the reason names it.
- The unlisted-knock remedy text names the third source.
The rule this lands: a relay knock is `listed` when its signed session
is one the named seat lists. A card thread its open claim names is now
one of those sessions. `listed` stays a consistency reading inside the
fleet's trust root, never proof of who rang, and an `unlisted` knock is
still not acted on.
## Spellings measured
Newest claims on a sample of 13 open `pm:dispatched` cards (2026-11-16
03:20Z; MCP reads):
| Spelling | Where | Reader |
|---|---|---|
| `Thread session:` line, backticked id | skills#2 (#34013 claim
6906299967) | reads |
| dev session first, in prose on the `Session:` line | ui#2 (#34250,
#34207, #34197), devx#2 (#33993) | refuses (null) |
| no session, prose only ("a card thread opened under seat …") | ui#1
(#34232) | refuses (null) |
| no thread key (`mode:subagent` claims) | server#5 (#34257, #34144,
#33955, #33918, #34145, #34096, #33922, #34218) | nothing to read |
So after this lands, only claims written on the template spelling list
their card thread. A ui#2, devx#2 or ui#1 card thread knocking as its
seat keeps reading `unlisted` until those seats write the key.
## Tests
- `node scripts/pm/record-recognisers.mjs --self-test`: 451 cases pass.
New battery "the card-thread delegate" (17 cases, floor 17; the
battery-count floor 18 → 19):
- the reader reads the template spelling with a real id (blanks after it
and CRLF included);
- the governed template itself, read from
`.claude/skills/pm-dispatch/SKILL.md`: exactly one line reads as the
key, the backticked placeholder sits directly after it, its note says
nothing follows the id, and that spelling with a real id is what the
reader reads (the read is declared on the `self-test-reads` line and
classified in `GOVERNED_READ_FLOOR`,
`scripts/pm/dispatch-gates.data.mjs`);
- the author rule both ways: a relay claim and a `GOVERNED_APPROVERS`
claim list; a claim by any other author, or with no author, lists
nobody; a row outside the rule neither supersedes, releases nor yields a
relay claim;
- the template spelling joins the roster (a delegate knock reads
`listed`, via the claim);
- each other spelling reads null and joins nothing (nine spellings,
including the two measured prose shapes);
- a released claim, a superseded claim (another seat's and the same
seat's) and a closed card each drop the session; an older release does
not;
- a yielded claim is no claim;
- a claim signed by another seat adds nothing to this seat, and an
unsigned claim adds nothing;
- fail closed: claims not an array or a thread not an array read
unreadable; omitted claims list none;
- one thread on two seats' claims reads unlisted for both;
- H72 end to end: the real roster from `h72RosterListings`, the real
reader and H72's predicate list a stray knock and not the delegate's; a
thread not held whole makes the row UNJUDGED.
- `node scripts/pm/check-half-states.mjs --self-test`: 5313 cases pass.
H72 battery 42 cases, floor 33 → 39 (the claim listing, its unread and
truncated cases, its truncation name, the cache-only wiring, the row's
place after the dispatch-liveness loop, and the unheld cards named in
the reason).
- Forced test edits: two.
- The existing H72 wiring pin in `check-half-states.mjs` matched the
sweep's call text, which now builds the listings first and passes
`claimThreads`. The pin now matches the new two calls.
- The existing "a vacant or paused post lists NOBODY" row in
`record-recognisers.mjs` spelled `knockSignature`'s "lists no session"
reason, which now names the third source.
- Ablations, round 1: 12, one per new branch, through
`scripts/ablation-replace.mjs` (anchor x1 → x0 each, each red, each
restored: `git diff HEAD` empty, blob equals HEAD). A1 any spelling on a
keyed line (2 red); A2 two key lines read the first (2); A3 release no
longer drops (1); A4 a yielded claim counts (1); A5 a closed card lists
(1); A6 the oldest claim governs (2); A7 an unsigned claim lists for a
seat (1); A8 unreadable claims read as none (2); A9 a thread not whole
lists (1 in each script); A10 a truncated `pm:dispatched` listing
ignored (1); A11 the sweep hands no threads (1); A12 a full first page
read as whole (1). These ran on the round-1 head; A11 and A12 targeted
wiring this round replaced.
- Ablations, review fix r1: 8, same method, each red, each restored. B1
no author rule on the claim thread (2 red); B2 a second, relay-only
author list (1); B3 the join reads a thread whole without the walk (1);
B4 the listing names no unheld card (1); B5 the reason drops the card
numbers (1); B6 the sweep keeps the bare reason (1); B7 the template key
spelled otherwise in SKILL.md (1); B8 the template note without "nothing
after the id" (1). The row's place after the loop is pinned by source
order; moving a block is not a one-anchor ablation, so it has none.
## Acceptance notes
- `claimSessionId` (check-half-states) documents the first session on
`Session:` as the seat's. The measured ui#2 and devx#2 claims put the
card thread's session first ("`session_A` (card thread, dev) · seat
`session_B`"). So for those claims `claimSessionId` reads the dev's
session, not the seat's. Observation only; carrier: the seat.
- `post-stamped.mjs` checks four exact-value claim keys at write time.
It does not check `Thread session:`, so a misspelt key is caught only
when its knock reads `unlisted` (the template note now says nothing
follows the id). A write-time check would sit outside this card's file
surface. Carrier: the seat.
- File surface: review fix r1 adds `scripts/pm/dispatch-gates.data.mjs`
(one `GOVERNED_READ_FLOOR` row and its paragraph), as the fix order's S2
directs, so the census derives the restored SKILL.md read.
- Live census of today's `unlisted` knocks: NOT MEASURED (this thread
does not run the board sweep).
## Verification
- Head `ef43bcaf3a6a4edc8bbcfb53ccda63644b33964a` (main merged in; the
diff against main is these four files).
- `node scripts/pm/dispatch-gates.mjs --commands` at that head: 75
families, run one after another, all exit 0. `--ran` reconciles: 75
derived, 75 run, 0 NOT-MEASURED, 0 UNRUN. The build prerequisite for
`check:doc-formula-expressions` and `check:i18n-coverage` ran under
`os-verify-lock.sh`, exit 0.
- `check-governed-merges --pr 34289`: Tier S (`.claude/**` x1).
- CI: not awaited.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmSx7z6GRueigx6aDsA)_
<!-- signed: domain:skills#2 · os-steve ·
session_01ADHkmSx7z6GRueigx6aDsA -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent f9120b8 commit a3570bc
4 files changed
Lines changed: 311 additions & 87 deletions
File tree
- .claude/skills/pm-dispatch
- scripts/pm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | 292 | | |
294 | 293 | | |
295 | 294 | | |
| |||
312 | 311 | | |
313 | 312 | | |
314 | 313 | | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
0 commit comments