Repository navigation
Commit b9b877c
feat(pm): epic seats open a mailbox and show on the fleet roster (#28751)
<!-- claude-projects-attribution: {"github_login":"marchtian"} -->
_Requested by **田騏** · [project
thread](https://claude.ai/code/project/chan_01VmuUhXU9SSUzqJYyXSmYSi?thread=cmsg_01VmuUhXU9SSUzqJYyXSmYSiHXKqxUqDPJKZyNHP7BoqTb)_
Fixes #28718
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么:** epic 席(`epic:#父单号#K`)现在能开信箱:`mailbox-open.mjs`
认这种席位拼写;车队总表给每张已委托的 `pm:epic` 父单一行,信箱列显示它的信箱。
- **为什么改:** epic PM 席既没有信箱也不在总表上,任何席位都敲不到它们(今天活着的父单 #27293、#26676、#8345
皆如此)。
- **风险与回滚:** 只动两个 PM 脚本、一个夹具和一行协议文字,不发布任何包;回滚 = revert 本 PR,总表下次生成即恢复旧样。
- **先看:** `scripts/pm/mailbox-open.mjs` 的 `SEAT_SHAPE` /
`RESERVED_DOMAIN_LANE` / slug 一行;`scripts/pm/fleet-roster.mjs` 的
`buildRows` epic 循环;`project-forms.md` 〈信箱 PR〉首行。
- **两分钟验证:** `node scripts/pm/mailbox-open.mjs --repo
objectstack-ai/objectstack --seat 'epic:#27293#1' --login sunhaolin
--dry-run`,应退出 0 并印出分支 `mailbox/sunhaolin/epic-27293-1`。
- **需要你做的:** 无,`.claude/**` 属 Tier S,席位经契约复核记录落地。
## What changes
**1. `mailbox-open.mjs` — the seat grammar reads the epic lane.**
`seatKey` now accepts `epic:#N#K` (the seat-signature spelling the
pm-dispatch references and `check-half-states.mjs`'s
`SIGNATURE_LANE_SOURCE` already use; measured live as `epic:#27293#1`,
`epic:#8345#1` on the parent cards' signature lines). `epic:#N` alone is
seat 1, as for every lane. The epic kind is one new exported constant,
`SEAT_EPIC_KIND`, and both the shape and the reserved set are built from
it.
- Key stays as spelled (`epic:#27293#1`); slug is `epic-27293-1` (the
`:#` after the kind becomes one hyphen, then the seat's `#`), so the
branch is `mailbox/LOGIN/epic-27293-1` — a legal ref segment.
- Collision measured: an epic slug always carries two numbers after
`epic-`; `repo:` slugs start `repo-`, bare lanes are
`triage-N`/`director-N`. The only lane that could reach `epic-N-K` is a
`domain:epic-N` lane, so `domain:epic-…` joins `domain:repo-…` in the
reserved set (no `domain:epic*` label exists today). `domain:epic` /
`domain:epics` still read.
- Malformed epic spellings stay refused: `epic`, `epic:`, `epic:#`,
`epic:12`, `epic#12`, `epic:#0`, `epic:#12`, `epic:#12#0`, `epic:#12#`,
`epic:#12#1#2`, `epic:#abc`, `epic:#12-1`, `epic:skills#1`.
- The self-test case that pinned `seatKey('epic:#12')` as null now pins
it as `epic:#12#1` / `epic-12-1`.
- `record-recognisers.mjs` is **not** edited: it reads `To:` and every
key's seat field through `seatKey`, so `To: epic:#27293#1` now reads
(measured: a `Notify: seat-online · epic:#27293#1 · …` line reads with
`to: "epic:#27293#1"`; `To: epic:27293` is still refused). Its self-test
passes unchanged.
**2. `fleet-roster.mjs` — epic rows (the card's option (a)).** One new
read per repo, `GET /repos/R/issues?state=open&labels=pm:epic`, and a
row per open `pm:epic` **parent** — sub-issues under it AND a
`session_…` registration in its body, both halves of H45's
`h45DelegationNodeSignals` (held equal by the self-test; not imported,
so the relay, which imports `ROSTER_MARKER` from this file, never loads
the patrol). Lane `epic:#N`, the seat link is the parent card.
- Seats: one row per `epic:#N#K` seat with an open mailbox (seat K,
seated by the login on its `Mailbox-of:` line — a mailbox opens at
seating and closes at hand-over); with none open, one row, seat 1,
status unknown (`? —`), so an epic seat nobody can ring is visible as
one.
- An epic mailbox is no longer listed under the table as "on no seat
row"; a mailbox of an epic that is not an open delegated parent still is
(`no seat post or epic parent carries this seat`).
- The roster reads no epic in-flight cards or rulings, so an epic row is
never flagged 疑似撞墙 on a partial activity reading.
- Why (a) over (b): (b), a `Mailbox:` line on the epic card body, needs
the same epic-card read (or one read per epic mailbox) AND a new body
protocol on epic cards; (a) needs only the read and reuses the
delegation signal the epic lane already defines (「父单打 `pm:epic` + 正文写会话
ID」). Reading rows off the mailboxes alone (zero reads) was rejected: a
mailbox of a closed epic would show as a live seat.
**3. `project-forms.md` 〈信箱 PR〉 — one line.** The section's first line
now says an epic seat (`epic:#N#K` spelling in the rule) opens a mailbox
like any seat. The file sits at its ratchet ceiling (54/54, headroom 0)
and every line is near the 120-byte cap, so the clause is paid in place
by deleting the branch spelling from the same line — a tooling detail
whose one owner is `mailbox-open.mjs`'s header. Line count unchanged,
the line is 115 bytes.
Session: https://claude.ai/code/session_017ihL2g7RyXa8ErM6GAkHyc
## Tests
- `node scripts/pm/mailbox-open.mjs --self-test` → `✓ mailbox-open
self-test: 81 cases in 10 batteries pass.` (pins raised: arguments
13→14, seat 7→11, open plan 10→11, owner 7→8, finding 9→10, CLI 6→7).
- `node scripts/pm/fleet-roster.mjs --self-test` → `✓ fleet-roster
self-test: 88 cases in 8 batteries pass.` (fixture battery 18→22,
rendered body 9→10). The fixture gains two delegated parents (one with a
mailbox, one without), a `pm:epic` child, an undelegated parent with
sub-issues, an epic mailbox and a mailbox of a closed epic.
- Importers unchanged and green: `record-recognisers.mjs --self-test`
(351 cases), `check-owed-reviews.mjs --self-test` (65),
`fleet-write/dispatch.mjs --self-test` (265).
- Live read-only run `node scripts/pm/fleet-roster.mjs --repos
objectstack-ai/objectstack --json` (no write): 30 rows, three epic rows
`epic:#26676`, `epic:#27293`, `epic:#8345`, each seat 1 status unknown
(no epic mailbox is open yet).
## Acceptance notes
- `record-recognisers.mjs`'s `readSeat` docblock still lists four lanes
in prose; behaviour already follows `seatKey`. Left alone: outside this
card's file surface.
- `#8345`'s body says its epic seat is vacant in prose; the roster does
not parse prose and shows it as unknown, the same as an epic with a live
session but no mailbox. The mailbox is the seated signal.
- A delegated parent with no sub-issue filed yet gets no row until its
first one; the H45 registration half alone is too loose to make a row
(every seat-filed child carries a session on its signature line).
- Epic parent numbers are repo-relative while the `epic:#N` lane is not;
a mailbox is matched to a parent by number across the repos read. No two
live parents share a number today.
## Verification
Local gate union on head `27657d802c` (`dispatch-gates.mjs --commands
--repo objectstack-ai/objectstack`, 38 derived families), each exit
captured before any pipe; `--ran` reconciliation: `✓ dispatch-gates
--ran: 38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a
DERIVED zero — all 38 recorded an exit code and none of them is 3).`
<details><summary>Derived families and exits</summary>
All 38 exit 0. On the first pass, nine exited 3 (PREREQUISITE NOT MET:
no `node_modules`, and `@objectstack/formula` / `@objectstack/lint`
unbuilt) and `check-self-test-workflow-commands.mjs` exited 1 on
`release-pending-publish.mjs` failing to import `@changesets/cli` — all
environment, none measured anything. After `pnpm install
--frozen-lockfile` and `turbo run build --filter=@objectstack/formula
--filter=@objectstack/lint` (lock VERDICT command-exit 0) every one
re-ran to exit 0. `pnpm check:pm-dispatch-gates`: `✓ dispatch-gates
self-test (fast tier): 1937 cases pass; 7 slow section(s) deferred.`
Among them, the four the order names: `pnpm check:pm-skill-ratchet` 0
(project-forms.md 54 lines, ceiling 54), `pnpm check:pm-skill-id-lint`
0, `pnpm check:skill-frame-sync` 0. Outside the derived set, also run:
`pnpm check:pm-governed-prose` 0, and both scripts' `--self-test` 0.
</details>
No changeset: `scripts/pm/**` and `.claude/**` publish nothing
(`skip-changeset`).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1617b7f commit b9b877c
4 files changed
Lines changed: 141 additions & 43 deletions
File tree
- .claude/skills/pm-dispatch/references
- scripts/pm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
| |||
28 | 35 | | |
29 | 36 | | |
30 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
31 | 42 | | |
32 | 43 | | |
33 | 44 | | |
| |||
40 | 51 | | |
41 | 52 | | |
42 | 53 | | |
| 54 | + | |
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
| |||
52 | 64 | | |
53 | 65 | | |
54 | 66 | | |
| 67 | + | |
55 | 68 | | |
56 | 69 | | |
57 | 70 | | |
| |||
0 commit comments