Repository navigation
Commit f4826f8
fix(pm): mailbox doorbell key fields read the seat with seatKey, which refuses reserved domain lane names (#27986)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DGworhuv2mwSdzy4ZEH46c4)_
Fixes #27891
## What changes
- `scripts/pm/record-recognisers.mjs`: the seven doorbell keys' `LANE#N`
fields (`Notify: seat-online`, `seat-offline`, `split`) are read with
`seatKey`, imported from `mailbox-open.mjs`. The second, looser seat
shape `SEAT_REF` is deleted. The short form `skills#2` is now refused in
a key field (`unreadable`, "does not spell its template"), exactly as it
is on the `To:` line. An absent number reads as seat 1 (`triage` →
`triage#1`), and the `seat` reading carries the canonical `key` beside
`lane` and `n`.
- `scripts/pm/mailbox-open.mjs`: `seatKey` refuses a `domain:` lane
named after a reserved lane word — `domain:triage`, `domain:director`,
`domain:repo-…` — whose slug would be another seat's (`triage-1`,
`repo-cloud-1`). The lane words are lifted into the exported
`SEAT_LANE_KINDS` and `SEAT_BARE_LANES`, the one spelling that
`SEAT_SHAPE` and the reserved set are both built from. A name that
merely contains a reserved word (`domain:triage-tools`,
`domain:directory`) still reads.
- Pins: 4 new cases in the mailbox-open self-test (short form refused,
reserved name refused, containing-a-word still reads, the shape and the
reserved set share one list), 3 new and 1 reworded in the recognisers'
doorbell battery (well-formed `domain:X#N` reads as before with its
`key`; the short form refused in a key field and on `To:`; a reserved
name refused in both places).
## Why
PR #27881 (card #27637) keyed the mailbox by seat and read the `To:`
line with `seatKey`, but left the key fields on `SEAT_REF`, which
accepted `skills#2`. One message could then name a seat `To:` refused —
two grammars for one thing. The contract review of #27881 (record
6513700361, should-fixes 1 and 4) asked for one grammar and for the
reserved-word refusal the `mailbox-open.mjs` header assumed but did not
enforce; triage 6513886980 ruled both in, and ruled that a well-formed
`To: domain:X#N` line behaves exactly as before.
`Clause-②: no` — the accepted set narrows (the short form and the
reserved names are refused; nothing new is accepted). No gate, workflow
or queue guard reads a mailbox, so nothing lands or fails differently.
`.claude/skills/pm-dispatch/references/project-forms.md` 〈信箱 PR〉 is
untouched: it spells `LANE#N` and `To: <席位>`, neither of which now reads
wrong.
## Verification
- `node scripts/pm/mailbox-open.mjs --self-test` — 71 cases in 10
batteries pass (was 67).
- `node scripts/pm/record-recognisers.mjs --self-test` — 329 cases pass
(was 326).
- Ablations, each run once and the tree restored: dropping the reserved
refusal in `seatKey` fails the two reserved pins in mailbox-open and the
reserved pin in the recognisers; letting `readSeat` fall back to the old
loose shape fails the short-form pin and the reserved pin; dropping
`key` from the reading fails the three `key`-carrying pins. Nothing else
moves.
- Gate families derived by `node scripts/pm/dispatch-gates.mjs
--commands` (2 paths vs merge base 9cd54fa): 31 families
(`check-closing-keyword-parity`, `check-declaration-mirrors`,
`check-self-test-wired`, `check-self-test-workflow-commands`,
`check-whole-set-label-write`, `plan-test-core-shards --self-test`,
`bare-root-worklist --self-test`, `check:pm-record-recognisers`,
`check:pm-dispatch-gates`, `check:scripts-symbol-anchors`,
`check:entry-guard`, `check:parse-guard` and the rest of the derived
list) all exit 0 after `pnpm install --frozen-lockfile
--ignore-scripts`; `--ran` with the recorded codes: 31 accounted for, 31
run, 0 NOT-MEASURED. `eslint` on the two files exit 0. `git merge-tree`
against `origin/main` 4a5396b clean; no commit on main since the base
touches either file.
Clause-②: no
Metadata-protocol: none
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes on the two files.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset. (nothing
publishes: `scripts/pm/**` only, `skip-changeset`)
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
## 维护者速读
- 改了什么:信箱门铃七键里的 `LANE#N` 字段改用 `seatKey` 读,短写 `skills#2` 一律拒收;`seatKey`
另拒收撞保留车道词的 `domain:` 名(`domain:triage`、`domain:repo-…`)。
- 为什么改:#27881 之后 `To:` 行与键字段各用一套席位语法,一条消息可能一边读通一边拒收;分诊 6513886980
裁定统一到一套。
- 风险与回滚:只收窄接受集;无门禁、workflow 或队列守卫读信箱,落地行为不变。回滚即 revert 本 PR。
- 先看:`scripts/pm/record-recognisers.mjs` 的 `readSeat`,与
`scripts/pm/mailbox-open.mjs` 的 `seatKey`。
- 两分钟验证:`node scripts/pm/mailbox-open.mjs --self-test && node
scripts/pm/record-recognisers.mjs --self-test`。
- 需要你做的:无。契约复审欠席位(contract review
owed);落地档以登记簿为准(`check-governed-merges.mjs --pr`)。
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016WV4d1a5iE1F79QjJupxQe
Co-authored-by: Claude <noreply@anthropic.com>1 parent 6dc06b2 commit f4826f8
2 files changed
Lines changed: 40 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
164 | 174 | | |
165 | 175 | | |
166 | 176 | | |
167 | 177 | | |
168 | 178 | | |
169 | 179 | | |
170 | 180 | | |
171 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
172 | 185 | | |
173 | 186 | | |
174 | 187 | | |
175 | 188 | | |
| 189 | + | |
176 | 190 | | |
177 | 191 | | |
178 | 192 | | |
| |||
519 | 533 | | |
520 | 534 | | |
521 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
522 | 540 | | |
523 | 541 | | |
524 | 542 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1266 | 1266 | | |
1267 | 1267 | | |
1268 | 1268 | | |
1269 | | - | |
1270 | | - | |
1271 | 1269 | | |
1272 | 1270 | | |
1273 | 1271 | | |
1274 | 1272 | | |
1275 | 1273 | | |
1276 | 1274 | | |
1277 | | - | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
1278 | 1281 | | |
1279 | | - | |
1280 | | - | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
1281 | 1286 | | |
1282 | 1287 | | |
1283 | 1288 | | |
| |||
2572 | 2577 | | |
2573 | 2578 | | |
2574 | 2579 | | |
2575 | | - | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
2576 | 2583 | | |
2577 | 2584 | | |
2578 | 2585 | | |
| |||
2603 | 2610 | | |
2604 | 2611 | | |
2605 | 2612 | | |
2606 | | - | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
2607 | 2617 | | |
2608 | 2618 | | |
2609 | 2619 | | |
| |||
0 commit comments