You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit babda9d
Browse filesBrowse the repository at this point in the historyBrowse files
feat(pm): H72 lists unlisted mailbox knocks against the seat roster (#34235)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi994eAZcnCC5xnunA1cufNQ1)_
Part of #34013
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么:**
半态巡查的信箱行(H72)现在每轮用已列出的在任座位贴与信箱开张读一次席位名册,交给同一个敲门读取器;签名会话不在所点名席位名册上的敲门(`unlisted`),在该信箱上多出一行只报告的巡查行,按评论
id 列出,告诉收信席位「这条不照办」。
- **为什么改:** 上一 PR 落了 `listed`/`unlisted` 读数,但巡查没带名册,`unlisted`
敲门没人被告知(卡上席位裁定的剩余项一)。
- **风险与回滚:** 只改 PM
工具两个脚本,产品包零改动、不发布;不新增任何请求(名册读自巡查已有的两份列表);名册读不全(列表触页上限)时整行不判、摘要写 NOT
MEASURED,不会误报。回滚即 revert。
- **先看:** `scripts/pm/check-half-states.mjs` 的 `h72UnlistedKnockLines` 与
`h72RosterListings`,以及 sweep 里 H72 块的接线(`mailboxEvents(rows, roster)`)。
- **两分钟验证:** `node scripts/pm/check-half-states.mjs --self-test`,预期结尾
`H72 mailbox off-table bells 36/33`、退出 0。
- **需要你做的:** 无,席位落地。剩余项二(卡线程会话是否入席位名册)未在本 PR 处理,见下文 Remainder,卡保持打开。
## What changes
- **The roster, once per sweep.** H72's sweep block now imports
`seatSessionRoster` beside `mailboxEvents` (same lazy import) and reads
the roster from the two listings the sweep already holds: the open
`pm:seat` posts (`SEEN_LABEL_PAGES`) and the open pulls (H7's listing).
No new request, and no second signature or roster parser in this file
(pinned against the source above the self-test).
- **`h72RosterListings(issues, pulls, truncated)`** (pure): hands the
roster the `pm:seat` rows and the pulls, or `null` for a listing that
`noteOpenListing` recorded as truncated at the page ceiling (or that is
not an array). The roster reads `null` as `unreadable`, never as a
smaller roster: a partial roster would read a knock from a seat whose
post sat on an unread page as `unlisted`. The two listing names live in
`H72_ROSTER_LISTINGS` and are pinned against the names the two listing
functions record.
- **`h72UnlistedKnockLines(reading, roster, nowMs)`** (pure): a second
report-only H72 row on the mailbox PR, listing (up to five, then
counting) the knocks inside the 24 h window whose signature reads
`unlisted`, by comment id, author and the reader's reason. Remedy text:
the seat the mailbox serves does not act on an `unlisted` knock
(`untrusted-text.md`); the seat the signature names rings from a session
it lists (`--mailbox-keys` prints the rule). A `listed` knock is a
consistency reading, never proof, and is not listed. A maintainer's
knock (not signature-checked) and a comment the author fence ignores are
out.
- **Unjudged, never clean.** A roster that was not read makes the reader
fail closed, so every relay knock reads `unlisted`; this row then lists
nothing and the sweep records `mailboxRosterReason`, which the H72
summary clause renders as `Unlisted knock signatures: NOT MEASURED — …`.
The new key rides `SWEEP_COUNT_KEYS`.
- The off-table row (`h72OffTableMailboxLines`) is unchanged and reads
the same `mailboxEvents(rows, roster)` reading; its census does not move
with the roster (pinned by #34071).
- Band stays `inventory`; neither row is loud.
## Tests
- `check-half-states.mjs` H72 battery: 22 → 36 cases, floor raised 20 →
33. Both ways: an `unlisted` knock fires; `listed`, maintainer and
unsigned readings do not; an unread roster (unreadable, null, no
`state`) and an unread reading are unjudged; the window boundary (23h59m
fires, 24h01m aged out, unreadable `at` fires); an off-table unlisted
knock is named by both rows; the five-item cap; the text (no angle
bracket, rule file, printout, never proof, report-only, no tracker
number); not loud; the roster listings and their truncation; the
truncation names against the listing functions' source; the sweep wiring
against the source above the self-test; the summary clause in both
states and the forwarding key.
- `record-recognisers.mjs` knock-signature battery: 2 end-to-end rows.
The REAL roster read through `h72RosterListings` (with a non-seat card
and a non-mailbox pull mixed in) and the REAL reader: H72 lists the
stray session's knock and not the listed knock, the maintainer's or the
drive-by's. A truncated `pm:seat` listing makes the real roster
unreadable, the reader reads both relay knocks `unlisted`, and H72 lists
none.
- Self-tests at 22ea9fe: `check-half-states` 5307 cases pass;
`record-recognisers` 432 cases pass. No forced edits to existing tests.
<details><summary>Ablations — 3 legs, each red, each restored to the
HEAD blob</summary>
All through `scripts/ablation-replace.mjs` (anchor hit 1, x1 to x0) at
22ea9fe; each restore proven by an empty `git diff HEAD` and blob
`e1e8c12b` equal to HEAD.
| leg | mutation | red cases |
|:--|:--|:--|
| A1 | drop the unread-roster guard in `h72UnlistedKnockLines` (`roster
=== undefined` only) | 1 in check-half-states (unjudged roster), 1 in
record-recognisers (truncated listing end-to-end) |
| A2 | the sweep calls `mailboxEvents(rows)` without the roster | 1
(wiring pin) |
| A3 | `h72RosterListings` ignores a truncated `pm:seat` listing | 1 in
check-half-states (truncation), 1 in record-recognisers (truncated
listing end-to-end) |
A first A2 attempt was refused before any write (anchor ambiguous: it
also matched the pin's own literal); it ran with the indented sweep line
as the anchor.
</details>
## Remainder (not in this PR — the card stays open)
- **Does a card-thread session named on a seat's newest `Claim:` belong
on that seat's roster?** Not done here, for a measured reason: there is
no claim reader of a thread session on `main` to reuse. `claimSessionId`
reads the FIRST session on the `Session:` line, deliberately the seat's;
nothing reads `Thread session:`. The claim template in the pm-dispatch
skill carries no such key, and live claims spell it at least three ways:
a `Thread session:` line (the skills seats' claims), a second session in
prose on the `Session:` line (a spec seat's), or not at all (a ui seat's
claim for a card set; a server seat's subagent claim). Listing it would
mint a new claim key and its reader. The options are in the card's
`os-dev-report`.
## Acceptance notes
- No live census of today's `unlisted` knocks was taken: this card
thread does not run the board sweep. The previous round's census (22 of
58 relay knocks `unlisted` on 2026-11-15) is the expected order of
magnitude for the new row on the first sweeps.
## Verification
<details><summary>Local gates at 22ea9fe — 69 derived, 69 run, 0
NOT-MEASURED (derived zero, exit codes recorded)</summary>
Every command `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` listed at 22ea9fe (2 paths vs merge base
dfb8ed3), each exit 0 captured before any pipe, including `pnpm
check:pm-half-states`, `pnpm check:pm-record-recognisers`, `pnpm
check:pm-dispatch-gates`, `pnpm check:pm-governed-merges` and `pnpm
check:commit-card-trailers`. `pnpm check:i18n-coverage` first exited 3
(its CLI and example build closure was not built in this container);
after the `turbo run build` closure it names, under the verify lock
(`VERDICT command-exit 0`, 73 of 73 tasks), it re-ran: exit 0 (14
configs, none new). `--ran` reconciliation: `69 run, 0 NOT-MEASURED (a
DERIVED zero)`. `test:repo` was not run locally: the diff touches no
vitest repo-project file. main moved to b51cb18 after the round; it
touches neither file of this diff.
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01ADHkmPhHSUtdB95JSektb4
Co-authored-by: Claude <noreply@anthropic.com>
// band, the coverage clause in its three states, and the lazy one-reader import
25728
25822
// read off this file's source. The end-to-end leg — the REAL reader's readings
25729
25823
// through this predicate — lives in record-recognisers.mjs's doorbell battery,
25730
-
// because this self-test cannot import that module (H62's banner).
25731
-
'H72 mailbox off-table bells': 20,
25824
+
// because this self-test cannot import that module (H62's banner). RAISED 20 → 33
25825
+
// with the signature half (#34013): its predicate both ways, the unjudged roster,
25826
+
// the window, the cap, the text, the roster listings and their truncation names,
25827
+
// the wiring and the summary clause.
25828
+
'H72 mailbox off-table bells': 33,
25732
25829
// Registered with the unowned-PR row, pin just under the count: the firing, the assignee/mailbox/closed
25733
25830
// exemptions, the unread-label UNJUDGED leg, the text, the band and the wiring.
25734
25831
'H76 unowned open PR': 11,
@@ -29076,6 +29173,31 @@ async function selfTest() {
29076
29173
b(BATTERY28675, 'H72: the three count keys ride the enumerated forwarding contract', ['mailboxCandidates', 'mailboxRead', 'mailboxReaderReason'].every((k) => SWEEP_COUNT_KEYS.includes(k)), true);
29077
29174
b(BATTERY28675, 'H72 summary: the coverage pair is reported, with the window', saidBy('h72Mailbox', summaryLine({ mailboxRead: 3, mailboxCandidates: 4 }, 0)).includes('comment page read on 3 of 4 open `pm:mailbox` PR(s) touched in the last 24h'), true);
29078
29175
b(BATTERY28675, '⛔ H72 summary: a reader that did not load renders NOT MEASURED, never `0 of N`', (() => { const c = saidBy('h72Mailbox', summaryLine({ mailboxReaderReason: 'the doorbell reader did not load (x)', mailboxCandidates: 0 }, 0)); return c.includes('NOT MEASURED — the doorbell reader did not load (x)') && !c.includes('0 of 0'); })(), true);
29176
+
// -- H72's signature half (#34013): an `unlisted` knock is listed for the seat the
29177
+
// mailbox serves; a roster nobody could read lists nothing. The readings carry
29178
+
// `mailboxEvents`' `signature` field; the real reader and the real roster drive
29179
+
// this predicate in record-recognisers.mjs's signature battery. ----
b(BATTERY28675, '⭐ H72 signature: an `unlisted` knock inside the window is listed by comment id, author and the reader\'s reason', ['1 knock(s)', 'comment 9 by objectstack-fleet[bot]', `${UNV72} — session_01AAAAAAAAAAAAAAAAAAAAAAAA is not a session`].every((x) => row72u(reading72(READ72(1, 60), UNL72(9, 30)), ROSTER72, NOW72).includes(x)), true);
29188
+
b(BATTERY28675, '⛔ H72 signature: a `listed` knock, a maintainer\'s knock and a knock with no signature reading are not listed — clean is null', h72UnlistedKnockLines(reading72(KN72(1, 5, { state: 'listed', seat: 'domain:skills#2' }), KN72(2, 5, { state: 'maintainer' }), READ72(3, 5)), ROSTER72, NOW72), null);
29189
+
b(BATTERY28675, '⛔ H72 signature: a roster that was not READ makes the row UNJUDGED — null, never every knock listed as unlisted (the reader fails closed, so all of them read unlisted)', [h72UnlistedKnockLines(reading72(UNL72(9, 30)), { state: 'unreadable', gaps: ['the open `pm:seat` posts'] }, NOW72), h72UnlistedKnockLines(reading72(UNL72(9, 30)), null, NOW72), h72UnlistedKnockLines(reading72(UNL72(9, 30)), { seats: new Map() }, NOW72)].every((v) => v === null), true);
29190
+
b(BATTERY28675, '⛔ H72 signature: a reading that is not `read` is UNJUDGED too', [h72UnlistedKnockLines({ state: 'unreadable', gaps: ['x'] }, ROSTER72, NOW72), h72UnlistedKnockLines(null, ROSTER72, NOW72), h72UnlistedKnockLines({ state: 'read' }, ROSTER72, NOW72)].every((v) => v === null), true);
29191
+
b(BATTERY28675, '⭐ H72 signature: the window boundary — 23h59m old fires, 24h01m has aged out, an unreadable `at` must not read as aged out', [typeof h72UnlistedKnockLines(reading72(UNL72(4, 24 * 60 - 1)), ROSTER72, NOW72), h72UnlistedKnockLines(reading72(UNL72(4, 24 * 60 + 1)), ROSTER72, NOW72), typeof h72UnlistedKnockLines(reading72({ ...UNL72(5, 10), at: 'not a date' }), ROSTER72, NOW72)].join(), 'string,,string');
29192
+
b(BATTERY28675, 'H72 signature: an off-table knock that is ALSO unlisted is named by both rows — the vocabulary and the signature are two readings', (() => { const r = reading72(KN72(6, 10, { state: 'unlisted', reason: `${UNV72} — x` }, 'refused')); return row72(r, NOW72).includes('comment 6') && row72u(r, ROSTER72, NOW72).includes('comment 6'); })(), true);
29193
+
b(BATTERY28675, `H72 signature: it names at most ${H72_LISTED_COMMENTS} knocks and counts the rest`, (() => { const r = row72u(reading72(...[1, 2, 3, 4, 5, 6, 7].map((c) => UNL72(c, 10))), ROSTER72, NOW72); return r.includes('7 knock(s)') && r.includes('comment 5 by') && !r.includes('comment 6 by') && r.includes('and 2 more'); })(), true);
29194
+
b(BATTERY28675, 'H72 signature text: no angle-bracket fragment, names the rule file, the printout, that listed is no proof and the report-only boundary — and no tracker number', (() => { const r = row72u(reading72(UNL72(2, 9, '`<seat>` lists no session'), UNL72(3, 9, 'a<b')), ROSTER72, NOW72); const plain = row72u(reading72(UNL72(2, 9, 'no seat line')), ROSTER72, NOW72); return !/[<>]/.test(r) && r.includes('`SEAT` lists no session') && ['untrusted-text.md', '--mailbox-keys', 'never proof', 'Report-only', '⛔ does not act on'].every((x) => plain.includes(x)) && !/#[0-9]/.test(plain); })(), true);
29195
+
b(BATTERY28675, 'H72 signature: not a loud finding — it never escalates a sweep', isLoudFinding(row72u(reading72(UNL72(2, 9)), ROSTER72, NOW72)), false);
29196
+
b(BATTERY28675, '⭐ H72 roster listings: the open `pm:seat` rows and the open pulls the sweep holds, other cards dropped', (() => { const seat = { number: 1, labels: [{ name: 'pm:seat' }] }; const card = { number: 2, labels: [{ name: 'pm:queue' }] }; const pull = { number: 3 }; const l = h72RosterListings([seat, card, null], [pull]); return l.posts.length === 1 && l.posts[0] === seat && l.mailboxes.length === 1 && l.mailboxes[0] === pull; })(), true);
29197
+
b(BATTERY28675, '⛔ H72 roster listings: a listing truncated at the page ceiling, or not an array, hands the roster NULL — read as unreadable, never as a smaller roster', (() => { const both = h72RosterListings([], [], [H72_ROSTER_LISTINGS.posts, H72_ROSTER_LISTINGS.mailboxes]); const other = h72RosterListings([], [], ['listIssues(pm:queue)']); const bad = h72RosterListings(undefined, 'x'); return both.posts === null && both.mailboxes === null && Array.isArray(other.posts) && Array.isArray(other.mailboxes) && bad.posts === null && bad.mailboxes === null; })(), true);
29198
+
b(BATTERY28675, '⭐ H72 roster listings: the truncation names are the ones the two listings record — `listIssues(pm:seat)` off a label page this sweep lists, `listOpenPullRequests` off the pulls', (() => { const src = SRC72; return SRC72.length > 0 && SEEN_LABEL_PAGES.includes('pm:seat') && src.includes('noteOpenListing(stats, `listIssues(${label})`') && src.includes(`noteOpenListing(stats, '${H72_ROSTER_LISTINGS.mailboxes}'`) && H72_ROSTER_LISTINGS.posts === 'listIssues(pm:seat)'; })(), true);
29199
+
b(BATTERY28675, '⭐ H72 wiring: the sweep reads the roster ONCE through the reader\'s `seatSessionRoster`, hands it to the same `mailboxEvents` call both rows judge, and parses no signature or roster of its own', (() => { const src = SRC72; return SRC72.length > 0 && src.includes('reader.seatSessionRoster(h72RosterListings([...seen.values()], [...seenPrs.values()], stats.openListingsTruncated))') && src.includes('const reading = reader.mailboxEvents(rows, roster);') && src.includes('h72OffTableMailboxLines(reading, nowMs)') && src.includes('h72UnlistedKnockLines(reading, roster, nowMs)') && !/function (?:seatSessionRoster|knockSignature|readMailboxComment)\b/u.test(src); })(), true);
29200
+
b(BATTERY28675, '⛔ H72 summary: a roster that was not read renders NOT MEASURED for the signature half, a read one says it buys no fetch — and the key rides the forwarding contract', (() => { const no = saidBy('h72Mailbox', summaryLine({ mailboxRead: 1, mailboxCandidates: 1, mailboxRosterReason: 'the seat roster could not be read (x)' }, 0)); const yes = saidBy('h72Mailbox', summaryLine({ mailboxRead: 1, mailboxCandidates: 1 }, 0)); return no.includes('Unlisted knock signatures: NOT MEASURED — the seat roster could not be read (x)') && yes.includes('Unlisted knock signatures: judged on the same pages') && SWEEP_COUNT_KEYS.includes('mailboxRosterReason'); })(), true);
29079
29201
b(BATTERY28675, '⭐ H72: the sweep takes the ONE reader and the opener\'s label LAZILY — `mailboxEvents` from record-recognisers.mjs, MAILBOX_LABEL from mailbox-open.mjs — and spells no doorbell key of its own', (() => { const src = readFileSync(fileURLToPath(import.meta.url), 'utf8'); return src.includes("import('./record-recognisers.mjs')") && src.includes("import('./mailbox-open.mjs')") && !/^import [^\n]*from '\.\/(?:record-recognisers|mailbox-open)\.mjs'/mu.test(src) && !src.includes(['MAILBOX_KEYS', '='].join(' ')); })(), true);
29080
29202
b(BATTERY28675, 'floor: this battery is DECLARED on the roster, with a positive pin', Object.prototype.hasOwnProperty.call(SELF_TEST_BATTERIES, BATTERY28675) && SELF_TEST_BATTERIES[BATTERY28675] > 0, true);
0 commit comments