Skip to content

feat(pm): close the mailboxes to outsiders — lock each mailbox PR and count a knock only from the fleet or a maintainer - #33972

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-mjmt4v
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-mjmt4v

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Part of #33789
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:信箱 PR 开出后立刻锁定讨论(只有有写权限的账号能评论),旧信箱可用 --lock N 补锁;每次锁定后中继立即在信箱发一条自检评论,发不出就自动解锁并报错;读敲门的工具只认车队机器人与维护者账号,其余作者一律忽略、正文不读。
  • 为什么改:仓库公开,任何 GitHub 用户都能在信箱下留一条伪造的敲门,白白进入座位会话、耗 token;本卡把「作者决定性质」从规则变成硬闸。
  • 风险与回滚:锁定后车队机器人能否继续评论尚未实测,但每次锁定都由自检评论当场实测,失败即解锁,不会留下收不到敲门的信箱;中继只对带 pm:mailbox 的开放 PR 加锁或解锁。回滚 = revert 本 PR。
  • 先看:scripts/pm/mailbox-open.mjs 的 lockStroke / canaryStroke;scripts/pm/fleet-write/execute.mjs 的 mailboxLockPreflight;scripts/pm/record-recognisers.mjs 的 readMailboxComment。
  • 两分钟验证:node scripts/pm/mailbox-open.mjs --repo objectstack-ai/objectstack --lock 32588 --dry-run,应看到一个 conversation_lock 动作、不发任何请求。
  • 需要你做的:受管面(.claude/**)PR,等 GOVERNED_APPROVERS 批准或席位达档复核;合并后由席位跑一次补锁所有已开信箱的中继扫射。

What changes

Items 1 and 2 of the card land here; item 3 (the knock's session must match the named seat's post or mailbox opening) is left open, so this PR is Part of the card. What item 3 needs is under Acceptance notes.

Item 1 — the mailbox conversation is locked.

  • scripts/pm/fleet-write/ops.mjs: two new relay rows.
    • conversation_lock takes issue alone and becomes ONE PUT /repos/{o}/{r}/issues/{n}/lock whose body is the table's one reason, { lock_reason: 'resolved' } (CONVERSATION_LOCK_REASON). The caller cannot send a reason.
    • conversation_unlock takes issue alone and becomes ONE DELETE of the same path, with no body. It exists so that a lock is never one-way (see the canary below).
    • GitHub's server-to-server permission ledger (github/docs src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json, read 2026-11-15) lists the endpoint under issues: write and again under pull_requests: write. Both are literal grants on every stroke, so both rows spend issues and .github/workflows/fleet-write.yml is untouched.
  • scripts/pm/fleet-write/execute.mjs (review S2): the executor fences both rows on its own GET of the pull, the last read before the write, as it fences mailbox_branch_delete. It refuses with nothing sent unless the number is a pull request (an issue's number answers 404 on the pulls path), the pull is open, and it carries pm:mailbox. Each row lands only when the issue reads back with locked as asked. A write the platform refused whose conversation already reads that way is an idempotent landing; any other read is FAILED.
  • scripts/pm/mailbox-open.mjs:
    • The open gains step ⑤. Once ④ has read the new pull's number back, a second relay stroke sends conversation_lock on that number, and the pull is then read back locked: true. The lock cannot ride the pr_create stroke because an action names its pull by number, and the number exists only after the create answers.
    • A lock that fails leaves the mailbox open and unlocked. The open then exits non-zero and names the one re-send.
    • The canary (review S1). Once the pull reads back locked, a third relay stroke posts ONE comment on it: MAILBOX_LOCK_CANARY above the bare footer. The relay reads it back byte for byte. If the canary is refused, a fourth stroke sends conversation_unlock, the pull is read back unlocked, and the run exits 3 with a loud line: the lock was taken back, and no other mailbox is locked until the refusal is understood. If the unlock fails too, the line says the mailbox may stay locked and names the maintainer's "Unlock conversation".
    • Shape chosen: the canary is a fixed line, not a doorbell key (it opens with no To:). Its time stamp is the comment's own created_at, so the line carries no clock of its own. It rides its own stroke rather than the lock's, so a refusal is read as the canary's alone and the unlock is sent only for a lock that read back.
    • --lock N locks a mailbox opened before this change, with the same canary. It is the one spelling the post-merge sweep uses. It reads the pull first and refuses (exit 4) unless the pull is an open pm:mailbox PR, the same read --close makes. A pull that already reads locked costs zero writes and gets no canary.

Item 2 — a knock counts only from the fleet bot or a maintainer.

  • scripts/pm/record-recognisers.mjs: readMailboxComment(row) fences the doorbell on the comment's author. A knock is read only when user.login is in MAILBOX_KNOCK_AUTHORS, which is [RELAY_COMMENT_AUTHOR, ...GOVERNED_APPROVERS]. It is judged by the queue guard's own predicate recordAuthorTrusted, and no login is typed here. Any other row reads exactly { state: 'ignored', reason: 'ignored: not a fleet or maintainer author' }, and its body is never handed to the parser, so no line, key or seat of it can be echoed.
  • mailboxEvents lists ignored rows apart, as ignored with comment id, time and author only. They are never an event or a half-state, so check-half-states H72 does not list them (pinned end to end).
  • --mailbox-keys prints who may ring.
  • The relay's lock canary (the line alone above footer lines, one leading signature line allowed) reads { state: 'canary' }. It is never an event and never a half-state, so H72 does not list it; mailboxEvents lists it apart as canaries. The same line from a maintainer, with a second line, or under a To: line reads as before.
  • Import edge: check-governed-queue-guard.mjs imports nothing of this graph at module scope, so the new static edge adds no cycle. Measured: the queue guard, post-stamped and recognisers self-tests pass, and check-half-states.mjs and check-handover.mjs load.

Skill text (governed, .claude/**): one line each. The pm-dispatch ratchet is paid by deletions in the same files:

File Line added Line deleted Where the deleted rule still lives Lines before → after
references/untrusted-text.md mailboxes are locked; a knock counts only from objectstack-fleet[bot] and GOVERNED_APPROVERS the pointer that an adopted fork diff's internal PR waits for the maintainer's own approval references/external-contributions.md ③ (lines 13–14, the rule itself) 54 → 54
references/seat-post-protocol.md knocks are judged on the author field like audit and claim comments (readMailboxComment) the back-pointer sentence "见 seat-lifecycle.md 〈座位贴协议〉…" and the blank line under it references/seat-lifecycle.md:23 points to this file itself; other references name it by purpose 88 → 87

Tests

Every number below was read at head 5fca76d, after the last commit (round 1, review S1 and S2).

  • node scripts/pm/mailbox-open.mjs --self-test: 103 cases in 11 batteries pass (was 90 in 10 before this PR). The battery "the lock" pins the one conversation_lock action the relay validator accepts, ⭐ the PUT the relay sends from it with the pull handed to the relay's fence, the open-mailbox read it runs behind, the --lock arguments, the re-send line and the open plan's step ⑤. Round 1 adds: ⭐ the canary is ONE relay comment, its first line MAILBOX_LOCK_CANARY, then the bare footer, accepted by the validator; ⛔ it is no doorbell key; ⭐ the unlock is one conversation_unlock and the DELETE the relay sends from it; the canary-failure line in both variants (taken back, or a maintainer's hand); and the --lock plan's canary step. The CLI battery has the --lock dry run with no gh or git on PATH.
  • node scripts/pm/fleet-write/validate.mjs --self-test: 435 cases across 23 batteries pass (was 428 across 22). The lock battery now covers both rows: closed keys (a caller-sent lock_reason refused), ⭐ the action shape each sends, issues write as a literal grant, and exactly two ops naming a lock, each request carrying the executor's fence.
  • node scripts/pm/fleet-write/execute.mjs --self-test: 423 cases across 31 batteries pass (was 415 across 30). New battery "the mailbox conversation lock": ⭐ lock and unlock each read the pull, send one write under the App token and read the issue back. ⛔ An issue's number, a closed pull, an unlabelled pull and an unread pull are each refused with nothing sent, for the lock and for the unlock. A 204 that does not read back as asked is FAILED. A refused write already in the asked state is idempotent. mailbox-open's lock, unlock and canary plans run through the executor.
  • node scripts/pm/record-recognisers.mjs --self-test: 400 cases pass (was 389); the doorbell battery floor is 44 → 55. ⭐ A fleet knock is read and a maintainer's knock is read. ⛔ A drive-by knock, spelled perfectly, reads only the ignored verdict, with the body marker absent from the result. Look-alike or missing authors are ignored, ignored rows are listed apart, the printout names who may ring, and H72 never lists a drive-by row. Round 1 adds: ⭐ the relay's canary reads canary (with or without a signature line); ⛔ the same line from a maintainer, with a second line or under To: reads as before, and an outsider's is ignored; mailboxEvents lists it apart; H72 does not list it.
  • dispatch.mjs (418), check-governed-queue-guard.mjs (530) and post-stamped.mjs (787) --self-test all pass unchanged, and check-half-states.mjs and check-handover.mjs load.

Forced test edits (named): in the recognisers' doorbell battery, the fixture row author DB_ROW changed from os-bill to the relay's identity, because a knock arrives as the relay's comment. Under the new fence an os-bill row is ignored. The one case asserting by === 'os-bill' now asserts the relay's login. The H72 end-to-end case is otherwise unchanged and still lists the same three comments. In round 1, two pins changed because the rows changed: the lock's request shape now carries the mailboxLock fence descriptor (mailbox-open and validate), and validate's "no unlock row" case became "exactly two ops name a lock". In execute.mjs the row text for an idempotent landing is now taken from the confirming function when it names one (idempotentText); the branch delete's text is unchanged.

Acceptance notes

  • The relay App commenting on a locked conversation is still not measured by hand, but no lock this code makes can leave a deaf mailbox: every lock is followed by the canary, and a refused canary takes the lock back. The sweep's first --lock N is that measurement. If its canary is refused, the sweep stops there.
  • The one-off sweep over every open mailbox is a relay run for the seat after merge (mailbox-open.mjs --lock N per open pm:mailbox PR). It is not run here. Each lock posts one canary, so each subscribed seat gets one PR-activity event, which its doorbell reader names a canary.
  • The relay fence is a label fence: it stops a mistyped or injected number, not a hostile seat, which could add the label first.
  • Item 3, what it needs:
    • A reader of the named seat's sessions, from its pm:seat post stub (session ID, Successor-of:) and its mailbox opening (the body footer's session URL).
    • A predicate over readSignatureLine that compares the knock's signature session with that set and reports "unverified seat signature".
    • A consumer that reads it, the receiving seat's knock read. That consumer is a board read, which this PR's pure reader does not do.
  • seat-post-protocol.md now stands at 87 lines under a ceiling of 88 (headroom 1). The pin lives in scripts/pm/check-skill-line-ratchet.mjs, outside this card's file surface, so review nit N2 is not taken here.
  • execute.mjs joined the file surface in round 1 (claim amendment 6896718263). PR pm: the low-risk arm lands an add-only ADR note as Tier S; any other ADR change stays H #33975 touches its self-test fixture too; a later lander resolves the conflict.

Verification

Local gates at 5fca76d (round 1)

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 47 commands at 5fca76d (46 at 5039a67, plus pnpm check:pm-write-pace for execute.mjs); each was run and its exit code captured before any pipe:

0 10s node scripts/check-closing-keyword-parity.mjs
0 3s node scripts/check-closing-keyword-parity.mjs --self-test
0 191s node scripts/check-comment-mask-corpus.mjs
0 0s node scripts/check-declaration-mirrors.mjs
0 1s node scripts/check-declaration-mirrors.mjs --self-test
0 1s node scripts/check-self-test-wired.mjs
0 6s node scripts/check-self-test-wired.mjs --self-test
0 139s node scripts/check-self-test-workflow-commands.mjs
0 5s node scripts/check-self-test-workflow-commands.mjs --self-test
0 2s node scripts/check-whole-set-label-write.mjs
0 0s node scripts/check-whole-set-label-write.mjs --self-test
0 0s node scripts/ci/plan-test-core-shards.mjs --self-test
0 30s node scripts/pm/bare-root-worklist.mjs --self-test
0 5s node scripts/pm/check-harness-current.mjs --self-test
0 10s pnpm --filter @objectstack/lint run check:doc-formula-expressions
0 3s pnpm check:agent-test-spelling
0 1s pnpm check:bash32-floor
0 3s pnpm check:ci-filter-parity
0 15s pnpm check:cli-command-ids
0 33s pnpm check:cross-package-test-inputs
0 6s pnpm check:doc-authoring
0 3s pnpm check:driver-memory-census
0 33s pnpm check:entry-guard
0 1s pnpm check:gitlink-declared
0 4s pnpm check:nul-bytes
0 3s pnpm check:parse-guard
0 1s pnpm check:pm-close-cards
0 369s pnpm check:pm-dispatch-gates
0 5s pnpm check:pm-fleet-write-dispatch
0 4s pnpm check:pm-fleet-write-execute
0 1s pnpm check:pm-fleet-write-validate
0 7s pnpm check:pm-governed-merges
0 1s pnpm check:pm-issue-create
0 1s pnpm check:pm-issue-transfer
0 1s pnpm check:pm-label-write
0 2s pnpm check:pm-post-stamped
0 5s pnpm check:pm-record-recognisers
0 1s pnpm check:pm-skill-id-lint
0 0s pnpm check:pm-skill-ratchet
0 4s pnpm check:pm-write-pace
0 2s pnpm check:pnpm-filter-targets
0 5s pnpm check:pnpm-flag-spellings
0 3s pnpm check:ratchet-remedy-authority
0 23s pnpm check:refd-timer-probe
0 7s pnpm check:scripts-symbol-anchors
0 1s pnpm check:skill-frame-sync
0 5s pnpm check:watch-hint-literal

--ran reconciliation: ✓ dispatch-gates --ran: 47 derived famil(ies) accounted for — 47 run, 0 NOT-MEASURED (a DERIVED zero — all 47 recorded an exit code and none of them is 3).

Round 0 (5039a67): 46 of 46 exit 0. Its first commit 8e20953 had check:pm-dispatch-gates red (1 of 2205): the census pins scripts/pm/record-recognisers.mjs:77 self-test-reads by line, and a header line had moved the marker to 78. That was fixed by folding the header entry into the line above; round 1 adds no line above 77. check:doc-formula-expressions exited 3 (prerequisite: @objectstack/formula and @objectstack/lint unbuilt) until those two were built under the lock (VERDICT command-exit 0).


Generated by Claude Code

A conversation_lock row in the fleet-write op table (PUT issues/N/lock,
lock_reason resolved, issues write), the open's step 5 that locks the
mailbox it just opened, and --lock N for a mailbox opened before.

Claude-Session: https://claude.ai/code/session_01ADHkmPAZjatd5E4EVfAi5F
Co-authored-by: Claude <noreply@anthropic.com>
readMailboxComment fences the doorbell on the comment's author: the relay's
identity or a GOVERNED_APPROVERS account, judged by the queue guard's own
predicate. Any other author reads ignored, its body never read; mailboxEvents
lists such rows apart, never as an event or a half-state.

Claude-Session: https://claude.ai/code/session_01ADHkmPAZjatd5E4EVfAi5F
Co-authored-by: Claude <noreply@anthropic.com>
…-post-protocol

One line each, paid in the same files: untrusted-text drops the fork-adoption
pointer whose rule lives in external-contributions.md step 3; seat-post-protocol
drops its back-pointer sentence to seat-lifecycle, which points here itself.

Claude-Session: https://claude.ai/code/session_01ADHkmPAZjatd5E4EVfAi5F
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 15, 2026
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation labels Nov 15, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-steve · session_01ADHkmPd7uRqHauEehGPr19

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 5039a6783f4f118e7cef8fb542e3621ec7c0c1ff
Local-runs: none
Scope: .claude/skills/pm-dispatch/references/untrusted-text.md, .claude/skills/pm-dispatch/references/seat-post-protocol.md + scripts/pm/record-recognisers.mjs, scripts/pm/mailbox-open.mjs, scripts/pm/fleet-write/ops.mjs, scripts/pm/fleet-write/validate.mjs

① Derived judgments

  • Read: the card body and both comments (claim 6895826066, os-dev-report 6896645434), the PR body and its 6-file list, the net diff origin/main...5039a678 (merge-base 895783a = main at read time, 247 insertions, 38 deletions), and the head's check-runs. Outside the diff, read only to judge it: recordAuthorTrusted and GOVERNED_APPROVERS in check-governed-queue-guard.mjs, RELAY_COMMENT_AUTHOR in ops.mjs, the response handling of fleet-write/execute.mjs, and H72 in check-half-states.mjs.
  • Check-runs on this head at read time: 17 completed success (Governed Surface Queue Guard, PR-body guards, Check Changeset, Check PR Size, Lint · scoped · tooling self-tests, Lint · ESLint, Type Check · workspace / source gates / debt ledger, Test Core 2/8, among them), zero failures. ⚠️ Six still PENDING: Lint · PM dispatch-gates, Lint · repo & tooling gates, Lint · CI, release & engine gates, Lint · docs & code guards, Type Check · consumer gates, Test Core (1/8). Lint · PM dispatch-gates is the one that was red on the dev's first round (the line-pinned census); its verdict on this head is NOT in yet, and this record does not stand in for it. The rest are skipped by path filter.
  • The dev's self-test counts (98 / 433 / 396) are the dev's local reading; this review re-ran nothing. The CI job that runs the tooling self-tests is green on this head.
  • The diff matches its declared file surface exactly: six files, no file outside the claim.
  • The PR carries items 1 and 2 of the card and is Part of, so the card stays open with item 3 and the one-off sweep (and its record on the card) still owed.

② Semver level

  • No published package, schema or runtime path is touched: scripts/pm/** tooling and two .claude/skills/pm-dispatch/references/** lines. No changeset is owed; Check Changeset is success on this head. Clause-②: no and Metadata-protocol: none on the PR body agree with the tree.

③ Boundary flags

  • PR author: objectstack-fleet[bot] (relay-opened, attributed to os-steve), draft, base main. Not a fork. The governed surface (.claude/**) is in the diff, so the merge leg waits on a GOVERNED_APPROVERS approval or this at-tier record; unchanged by this review.
  • SQL push-down: n/a, no query path.
  • Dev open question 1 (can the relay App still comment on a locked mailbox; NOT MEASURED): ANSWERED with a changed plan and ESCALATED, see S1. Option A as written is not enough, because step ⑤ locks every NEW mailbox from the moment of merge, before any sweep or canary runs.
  • Dev open question 2 (item 3 left out): option A ACCEPTED. Item 3 guards one fleet seat writing another seat's signature through the relay; it needs relay access, which no outside account has, so it is not on the path this card closes. Its consumer is a board read, outside a pure reader. Part of keeps the card open. The follow-up card is owed by the lane seat and is not filed yet.
  • Dev open question 3: the relay-side pm:mailbox fence is S2 (follow-up card, escalated to the lane seat); the un-lowered ratchet pin is nit N2.
  • security_findings: none in the dev report: this review found no path by which an outside account passes the author fence.

④ Design judgment

Author fence (record-recognisers.mjs), tried against the card's goal:

  • readMailboxComment judges row.user.login, the platform-stamped field, through recordAuthorTrusted: a string, non-empty, an exact includes in [RELAY_COMMENT_AUTHOR, ...GOVERNED_APPROVERS]. It never reads the signature line or any body text to decide. HOLDS.
  • Spoofing: a missing row, missing user, a null user (a deleted account), an empty login, objectstack-fleet without the suffix, a trailing space, a case variant, and a seat account all read ignored. The match is exact and fails closed. A [bot] login cannot be registered by a user and App slugs are unique, so no second account can carry the relay's login; no user.type check is needed.
  • Edited comment: the field read is the comment's creator, which an edit does not change. An outsider cannot edit a fleet or maintainer comment. An account with write access can edit one, but every such account is inside the fleet. HOLDS for the card's threat.
  • The ignored body: it is never handed to readMailboxLine; the verdict is a two-key constant object, and mailboxEvents stamps only comment id, time and login onto it. H72 reads events, which no longer holds ignored rows, so the body cannot reach a printout. The self-test pins the marker absent. HOLDS.
  • Limit, stated so nobody over-reads the fence: its one live consumer is H72 (report-only). A seat hears a knock as a PR-activity event from the harness, which this reader does not sit in front of. So for the session's context the LOCK is the gate and the fence is the rule plus the tooling reading. Until the sweep runs, every mailbox opened before this merge still takes outside comments. The sweep is load-bearing, not housekeeping.

Lock (ops.mjs, validate.mjs, mailbox-open.mjs):

  • The row takes issue alone; a caller-sent lock_reason or any other key is refused; one PUT, body fixed by the table; issues is a literal grant so the mint widens nothing; no unlock row. The executor already lands a bodiless 204 as accepted for any row, so the lock's 204 (first or repeated) reads as a landing. HOLDS.
  • --lock N reads the pull first, refuses unless open and pm:mailbox, and writes nothing when already locked. The open reads the pull back locked: true and exits non-zero naming the re-send when it is not. HOLDS.

Findings:

  • S1 (should-fix) — the unmeasured App-comment risk ships on the OPEN path, not only on the sweep. From merge, every new mailbox is locked at step ⑤ with no canary, and the relay has no unlock. If an installation token cannot comment on a locked conversation, each new mailbox is deaf at birth and each one needs a maintainer's hand to unlock. The failure would be loud (the knock's relay stroke fails) and bounded, and write-permission Apps are expected to pass, which is why this is not a must-fix; but it is cheap to remove entirely. Plan: BEFORE merge, a maintainer locks ONE existing mailbox by hand (one click, undone by the same hand), a seat sends one relay knock to it, and the stroke's result is recorded on the card. Landed: merge, then sweep every open pm:mailbox PR with --lock N and record the list on the card. Refused: do not merge step ⑤ as written. If the hand probe is not available, the first live act after merge is --lock on one mailbox plus one knock, before any seat opens a new mailbox. Escalated to the lane seat to ask the maintainer alongside the governed approval.
  • S2 (should-fix) — conversation_lock can be aimed at any issue or pull; only the CLI caller fences on pm:mailbox. The dev's argument (a seat may already close any issue) misses one asymmetry: a close is undone through the relay, a lock is not, so a mistyped or injected number is a one-way act that only a maintainer reverses, and if S1's probe fails it also silences the relay on that thread. mailbox_branch_delete is the precedent for a fence in the executor on the executor's own read. A label fence stops mistakes, not a hostile seat (a seat can add the label first), so the security gain is modest. Disposition: a follow-up tooling card for the fence in execute.mjs, outside this card's surface; does not block this head.
  • N1 (nit) — mailboxEvents returns ignored, and nothing prints it. A seat account that knocks directly instead of through the relay is now dropped without a word to anyone. A one-line count in H72 would make that visible.
  • N2 (nit) — seat-post-protocol.md is at 87 under a pin of 88. The saving is not locked in until the pin drops.
  • N3 (nit) — the sweep should also list outside-authored comments already on open mailboxes; they stay in the thread after the lock.

Skill text and ratchet:

  • untrusted-text.md 54 → 54 and seat-post-protocol.md 88 → 87: lines in the family do not rise, each addition paid in its own file.
  • Cut rule 1 (an internal PR adopting a fork diff waits for the maintainer's own approval) keeps its home in external-contributions.md ③, which states the rule itself. Cut rule 2 was a back-pointer sentence, not a rule; seat-lifecycle.md still points to this file.
  • Both added lines agree with the code they teach: the two author sources by name, the reader by name, body not read. No issue number in either line.

No must-fix. Two should-fix (S1, S2), three nits.

Implemented-by: claude/project-thread-mjmt4v
Reviewed-by: session_01ADHkmPd7uRqHauEehGPr19

VERDICT: PASS

…h a canary

S2: conversation_lock is fenced by the executor on its own read of the pull
(open, pm:mailbox; an issue's number answers 404 on the pulls path), as
mailbox_branch_delete is, and lands only when the issue reads back locked.
S1: a conversation_unlock row, fenced the same way, so a lock is never
one-way; mailbox-open posts one relay canary comment on every conversation
it locks (the open's step 5 and --lock N) and takes the lock back, loudly,
exit 3, when the canary is refused. The doorbell reader names the relay's
canary a canary, never a knock or a half-state.

Claude-Session: https://claude.ai/code/session_01ADHkmPAZjatd5E4EVfAi5F
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-steve · session_01ADHkmPd7uRqHauEehGPr19

席位核对 · ACCEPT · head 5fca76d488406261778004e11ecc6b079cc7664c · 2026-11-15T15:47Z

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 15, 2026 15:48
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit bc6b7ff Nov 15, 2026
49 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-mjmt4v branch November 15, 2026 16:04
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
… relay's own comment (objectstack-ai#34022)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi99Z1mjGd2zxMaR5rH5Z1Ada)_
Part of objectstack-ai#33789
Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:开信箱不再锁定讨论,干净开出即正常退出;删掉补锁命令、自检评论和中继的加锁/解锁操作。
- 为什么改:实测锁定后连车队机器人自己也无法在信箱评论(GitHub 返回 403),锁住的信箱收不到任何敲门;合并 objectstack-ai#33972
后每次开信箱都会报失败。
- 风险与回滚:外人仍可在信箱留言,但读敲门的工具只认车队机器人与维护者,其余留言忽略且不读正文;回滚 = revert 本
PR(会恢复必失败的锁定步骤)。
- 先看:`scripts/pm/mailbox-open.mjs` 头部〈Never locked —
measured〉;`scripts/pm/fleet-write/ops.mjs` 头部为何没有加锁行。
- 两分钟验证:`node scripts/pm/mailbox-open.mjs --repo
objectstack-ai/objectstack --seat triage --login os-steve
--dry-run`,计划里只有 `pr_create`,没有锁定步骤。
- 需要你做的:受管面(`.claude/**`)PR,等 GOVERNED_APPROVERS 批准或席位达档复核。

## What changes

PR objectstack-ai#33972 landed items 1 and 2 of the card. Its canary then measured
item 1 on a live mailbox, objectstack-ai#33915 (card comment 6897369511): the lock
landed and read back `locked: true`, then the relay App's comment
answered HTTP 403 "Unable to create comment because issue is locked",
and the take-back unlocked it. The App holds write access, but GitHub
still refuses its comment on a locked conversation. So a locked mailbox
hears no knock. Item 1 is retired on that measurement, and since objectstack-ai#33972
merged, every `mailbox-open` run has locked, failed the canary, unlocked
and exited 3. Item 2 (the knock author fence) stays as landed and is now
the defence. Item 3 goes to a follow-up card filed by the seat.

- `scripts/pm/mailbox-open.mjs`: the open path is ①–④ again, with no
lock and no canary, so a clean open exits 0. `--lock N`, `planLock`,
`planCanary`, `planUnlock`, `lockRemedy`, `lockRefusal`,
`canaryFailureText` and `MAILBOX_LOCK_CANARY` are removed with their
self-test rows. The file is the pre-objectstack-ai#33972 version plus one header
section, 〈Never locked — measured〉, which cites the measurement and says
⛔ do not add a lock back without a new measurement of the relay
commenting on a locked conversation. It also adds one self-test row.
- `scripts/pm/fleet-write/ops.mjs`, `validate.mjs`, `execute.mjs`: the
`conversation_lock` and `conversation_unlock` rows,
`CONVERSATION_LOCK_REASON`, the executor's `pm:mailbox` fence and
read-back (`mailboxLockPreflight`, `confirmMailboxLock`,
`mailboxLockFenceFailures`) and the per-confirm idempotent row text are
removed with their batteries. Each file is its pre-objectstack-ai#33972 version, and
`ops.mjs` gains three header lines on why the table has no lock row.
- `scripts/pm/record-recognisers.mjs`: the `canary` reading
(`isLockCanary`, `mailboxEvents.canaries`) and its five self-test rows
are removed. The author fence (`readMailboxComment`,
`MAILBOX_KNOCK_AUTHORS`) is unchanged; its doc comment now says a
mailbox is never locked and the fence is the defence.
- `.claude/skills/pm-dispatch/references/untrusted-text.md`: the line
"信箱 PR 锁会话;…" now reads "信箱 PR 不锁会话:锁后中继亦不能评论;敲门只认中继与维护者,余者忽略、⛔ 不读正文。"
It names the relay ("中继"), not "车队", because the line above counts seat
accounts as fleet accounts and a seat account's knock is ignored. The
full logins stay in `seat-post-protocol.md`'s knock line. 54 → 54 lines,
118 bytes.

Why each piece was removed rather than kept as a tool:

- `--lock N` and the canary: a lock this code makes either deafens the
mailbox or is taken back at once, so there is nothing correct left to
run.
- The two relay rows: their only legal target is an open `pm:mailbox` PR
(the executor fence), which is exactly what must not be locked. Nothing
calls them any more, and a lock is not undone through any other path.
Keeping them would leave an armed, uncalled write.
- The canary reading: it only exists to read the canary.

`security-findings.md` (checked): it says nothing about mailboxes being
locked; its one "锁定" is about rate limiting and lockout as a class of
finding, so it is unchanged. `git grep -n "lock" -- .claude scripts/pm`
turns up no other line in a mailbox context.

## Tests

Every number below was read at head e06eca4.

- `node scripts/pm/mailbox-open.mjs --self-test`: 91 cases in 10
batteries pass (90 in 10 before objectstack-ai#33972, 103 in 11 at its last head). The
new row is ⛔ "the open sends no lock": the open plan's one action is
`pr_create`, its printed plan names no lock, and the relay table has no
op whose name contains `lock`.
- `node scripts/pm/fleet-write/validate.mjs --self-test`: 428 cases
across 22 batteries pass (the pre-objectstack-ai#33972 count).
- `node scripts/pm/fleet-write/execute.mjs --self-test`: 415 cases
across 30 batteries pass (the pre-objectstack-ai#33972 count).
- `node scripts/pm/record-recognisers.mjs --self-test`: 396 cases pass;
the doorbell floor is back to 51. The author-fence rows from objectstack-ai#33972
(fleet read, maintainer read, drive-by ignored with the body never
echoed, look-alikes ignored, listed apart, H72 never lists a drive-by)
all still run.
- `dispatch.mjs` (418), `check-governed-queue-guard.mjs` (530) and
`post-stamped.mjs` (787) `--self-test` pass unchanged.

No forced test edits: every removed row tested removed code, and the
remaining rows are unchanged.

## Acceptance notes

- The open path sends no `conversation_lock`: pinned in mailbox-open's
self-test (above).
- No mailbox is locked on the board: the seat's sweep stopped at its
canary, and 20 open `pm:mailbox` PRs read `locked: false` before and
after (card comment 6897369511).
- An outsider can still comment on a mailbox and wake the subscribed
seat once. The reader ignores that comment and never reads its body;
that is the card's remaining defence.
- `seat-post-protocol.md` stands at 87 lines under a ceiling of 88;
lowering the pin is outside this surface.

## Verification

<details><summary>Local gates at e06eca4</summary>

`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 47 commands at e06eca4; each was
run and its exit code captured before any pipe:

```text
0 2s node scripts/check-closing-keyword-parity.mjs
0 4s node scripts/check-closing-keyword-parity.mjs --self-test
0 178s node scripts/check-comment-mask-corpus.mjs
0 0s node scripts/check-declaration-mirrors.mjs
0 0s node scripts/check-declaration-mirrors.mjs --self-test
0 2s node scripts/check-self-test-wired.mjs
0 5s node scripts/check-self-test-wired.mjs --self-test
0 145s node scripts/check-self-test-workflow-commands.mjs
0 4s node scripts/check-self-test-workflow-commands.mjs --self-test
0 2s node scripts/check-whole-set-label-write.mjs
0 0s node scripts/check-whole-set-label-write.mjs --self-test
0 0s node scripts/ci/plan-test-core-shards.mjs --self-test
0 26s node scripts/pm/bare-root-worklist.mjs --self-test
0 5s node scripts/pm/check-harness-current.mjs --self-test
0 7s pnpm --filter @objectstack/lint run check:doc-formula-expressions
0 2s pnpm check:agent-test-spelling
0 2s pnpm check:bash32-floor
0 2s pnpm check:ci-filter-parity
0 16s pnpm check:cli-command-ids
0 33s pnpm check:cross-package-test-inputs
0 7s pnpm check:doc-authoring
0 3s pnpm check:driver-memory-census
0 33s pnpm check:entry-guard
0 1s pnpm check:gitlink-declared
0 3s pnpm check:nul-bytes
0 2s pnpm check:parse-guard
0 1s pnpm check:pm-close-cards
0 358s pnpm check:pm-dispatch-gates
0 5s pnpm check:pm-fleet-write-dispatch
0 4s pnpm check:pm-fleet-write-execute
0 1s pnpm check:pm-fleet-write-validate
0 6s pnpm check:pm-governed-merges
0 2s pnpm check:pm-issue-create
0 1s pnpm check:pm-issue-transfer
0 0s pnpm check:pm-label-write
0 2s pnpm check:pm-post-stamped
0 6s pnpm check:pm-record-recognisers
0 0s pnpm check:pm-skill-id-lint
0 1s pnpm check:pm-skill-ratchet
0 4s pnpm check:pm-write-pace
0 2s pnpm check:pnpm-filter-targets
0 5s pnpm check:pnpm-flag-spellings
0 3s pnpm check:ratchet-remedy-authority
0 22s pnpm check:refd-timer-probe
0 8s pnpm check:scripts-symbol-anchors
0 0s pnpm check:skill-frame-sync
0 5s pnpm check:watch-hint-literal
```

`--ran` reconciliation: `✓ dispatch-gates --ran: 47 derived famil(ies)
accounted for — 47 run, 0 NOT-MEASURED (a DERIVED zero — all 47 recorded
an exit code and none of them is 3).`

</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmPAZjatd5E4EVfAi5F)_

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants