Skip to content

Commit b9b877c

Browse files
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/project-forms.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
## 信箱 PR
3535

36-
- 每席一个 draft PR,键是席位 ⛔ 非账号:分支 `mailbox/<login>/<slug>`,标签 `pm:mailbox`+`pinned`。
36+
- 每席一个 draft PR,键是席位 ⛔ 非账号,epic 席 `epic:#<n>#<k>` 同样开;标签 `pm:mailbox`+`pinned`。
3737
- 正文首行 `Mailbox-of: <席位> · <login>`;坐席即开(`mailbox-open.mjs`)并订阅,存根记 `Mailbox:`。
3838
- 永不合并,不欠 CI,落地与台账查询排除它;移交或换账号关旧开新;评论首行 `To: <席位>`。
3939
- 次行恒为一键,下列事件必敲;一事一行 ≤200 字节,只写键与编号;表外即半态。

‎scripts/pm/fleet-roster.fixture.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
{ "number": 6015, "title": "[PM seat] triage (objectstack-wide) — 🟢 Routine · session_01AavokzJ5DndAwitDXvKy4U · trig_01NcnCtMS2tH46nUg1a5TaMJ (hourly)", "body": "", "labels": [{ "name": "pm:seat" }], "assignees": [], "updated_at": "2026-10-23T12:59:06Z" },
1111
{ "number": 999, "title": "Fleet seat registry", "body": "", "labels": [{ "name": "pm:seat" }], "assignees": [], "updated_at": "2026-10-01T00:00:00Z" }
1212
],
13+
"epics": [
14+
{ "number": 27293, "title": "[Epic] Marketplace and connector auto-shelf", "body": "epic:#27293#1 · sunhaolin · session_017xRBcVBKAFk1ntXSjvPt7U\n\n## Epic PM registration", "labels": [{ "name": "pm:epic" }], "sub_issues_summary": { "total": 31 }, "updated_at": "2026-10-20T09:00:00Z" },
15+
{ "number": 26676, "title": "epic: record page v2", "body": "Reserved for the epic PM session `session_cdb7a717-def7`.", "labels": [{ "name": "pm:epic" }], "sub_issues_summary": { "total": 20 }, "updated_at": "2026-10-22T09:00:00Z" },
16+
{ "number": 28647, "title": "a child of #27293", "body": "epic:#27293#1 · sunhaolin · session_017xRBcVBKAFk1ntXSjvPt7U", "labels": [{ "name": "pm:epic" }], "sub_issues_summary": { "total": 0 }, "updated_at": "2026-10-23T09:00:00Z" },
17+
{ "number": 28800, "title": "[Epic] delegated, no sub-issue filed yet", "body": "epic:#28800#2 · os-tesla · session_01FreshEpicPm", "labels": [{ "name": "pm:epic" }], "sub_issues_summary": { "total": 0 }, "updated_at": "2026-10-23T10:00:00Z" },
18+
{ "number": 27108, "title": "[Epic] not yet delegated", "body": "Owner: undecided.", "labels": [{ "name": "pm:epic" }], "sub_issues_summary": { "total": 3 }, "updated_at": "2026-10-23T09:00:00Z" }
19+
],
1320
"dispatched": [
1421
{ "number": 25416, "labels": [{ "name": "pm:dispatched" }, { "name": "domain:devx" }, { "name": "tooling" }], "assignees": [{ "login": "os-elon-musk" }], "updated_at": "2026-10-23T13:28:00Z" },
1522
{ "number": 25300, "labels": [{ "name": "pm:dispatched" }, { "name": "domain:devx" }], "assignees": [{ "login": "os-sales" }], "updated_at": "2026-10-23T02:00:00Z" },
@@ -28,6 +35,10 @@
2835
{ "number": 25394, "state": "open", "head": { "ref": "mailbox/os-sales/devx-2" }, "body": "", "labels": [{ "name": "pm:mailbox" }] },
2936
{ "number": 25395, "state": "open", "head": { "ref": "claude/project-thread-eeee" }, "body": "To: os-sales\n\nThe mailbox of the seat held by `os-sales`", "labels": [{ "name": "pm:mailbox" }, { "name": "pinned" }] },
3037
{ "number": 25396, "state": "open", "head": { "ref": "claude/project-thread-ffff" }, "body": "Mailbox-of: domain:spec#5 · os-tesla", "labels": [{ "name": "pm:mailbox" }] },
38+
{ "number": 25397, "state": "open", "head": { "ref": "mailbox/sunhaolin/epic-27293-1" }, "body": "Mailbox-of: epic:#27293#1 · sunhaolin", "labels": [{ "name": "pm:mailbox" }, { "name": "pinned" }] },
39+
{ "number": 25399, "state": "open", "head": { "ref": "mailbox/os-tesla/epic-28800-2" }, "body": "Mailbox-of: epic:#28800#2 · os-tesla", "labels": [{ "name": "pm:mailbox" }, { "name": "pinned" }] },
40+
{ "number": 25400, "state": "open", "head": { "ref": "mailbox/os-bill/epic-27293-2" }, "body": "", "labels": [{ "name": "pm:mailbox" }] },
41+
{ "number": 25398, "state": "open", "head": { "ref": "mailbox/os-zhuang/epic-28130-1" }, "body": "Mailbox-of: epic:#28130#1 · os-zhuang", "labels": [{ "name": "pm:mailbox" }, { "name": "pinned" }] },
3142
{ "number": 25433, "state": "open", "head": { "ref": "claude/project-thread-cccc" }, "body": "Fixes #25417", "labels": [] }
3243
],
3344
"comments": {
@@ -40,6 +51,7 @@
4051
{ "number": 5560, "title": "[PM seat] domain:ui @ objectui — 🟢 os-sales · 由Sales账户的项目负责", "body": "## 1. Current PM\n\n- **Wall:** limit reached, resets at 15:00Z\n", "labels": [{ "name": "pm:seat" }], "assignees": [{ "login": "os-sales" }], "updated_at": "2026-10-22T18:06:56Z" },
4152
{ "number": 10243, "title": "[PM seat] domain:ui · seat 4 — 🟢 os-sales · session_01SJn1GE · ui lane", "body": "", "labels": [{ "name": "pm:seat" }], "assignees": [{ "login": "os-sales" }], "updated_at": "2026-10-17T16:05:27Z" }
4253
],
54+
"epics": [],
4355
"dispatched": [
4456
{ "number": 13330, "labels": [{ "name": "pm:dispatched" }, { "name": "domain:ui" }], "assignees": [{ "login": "os-sales" }], "updated_at": "2026-10-23T13:28:00Z" }
4557
],
@@ -52,6 +64,7 @@
5264
{ "number": 2180, "title": "[PM seat] repo:hotcrm · seat 2 — ⏳ vacant", "body": "", "labels": [{ "name": "pm:seat" }], "assignees": [], "updated_at": "2026-10-21T08:38:12Z" },
5365
{ "number": 1353, "title": "[PM seat] repo:hotcrm — 🟢 os-elon-musk · 由 os-elon-musk 账户的项目负责", "body": "", "labels": [{ "name": "pm:seat" }], "assignees": [{ "login": "os-elon-musk" }], "updated_at": "2026-10-22T14:39:07Z" }
5466
],
67+
"epics": [],
5568
"dispatched": [
5669
{ "number": 2253, "labels": [{ "name": "pm:dispatched" }], "assignees": [{ "login": "os-elon-musk" }], "updated_at": "2026-10-23T13:50:00Z" }
5770
],

0 commit comments

Comments
 (0)