WIP(p18): record-truth survivors — 4 more (desk's "one" undercounted by 3)

Desk re-gate found ONE survivor (client.ts:19, the header-chokepoint doc-block). Applying the desk's own
instrument — dumb-wide `refus|unattributable|identity_mismatch|401|409` + READ + classify, run rigorously
with a 401/409-in-comments sub-pass — found THREE MORE of the same class the desk's "one survivor" read
missed. Comment-only, zero production logic:

- cli/src/client.ts:19 (desk's find) — senderIdentityHeaders() doc-block, "refuses-unattributable LOUD"
  → DELIVERS + claimed:v1; no-actor → 400 actor_required.
- daemon/src/routes/review.ts:143 — resolveActorWithDeferral "409-on-mismatch" → wire supersedes (409
  retired, ruling A). A 5th phrasing.
- cli/src/mcp-server.ts:386 — "a hardcoded 'mcp' would 409" → would be SUPERSEDED (transport:v1). 6th phrasing.
- cli/src/commands/chatroom.ts:63 — "a hardcoded 'cli' would 409 against the header" → SUPERSEDED. Same.

The recursion the desk predicted: four censuses, five+ phrasings, each instrument matching the FORM its
author pictured. Terminated here by reading the raw hits, not a cleverer pattern. Final passes CLEAN across
daemon+cli src: PASS-A (unattributable/identity_mismatch/refuse-loud/would-409), PASS-B (401/409-in-comments),
token-free (reject/deny/turn-away near sender) — only legit keepers remain (transport.ts boundary,
require-sender-identity.ts historical, other-subsystem identity_mismatch, unrelated 409-conflict routes,
token auth, Slack registration, my correct deliver-and-label prose).

daemon tsc 0, cli tsc 0. Zero overlap w/ main's ACTIVITY 5 files. Branch-only. NOT guard-accepted. Never pushed.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
v-openrig-buildandClaude Opus 4.8 committed 2026-08-11 06:41:41 +00:00
1 parent d4efa4cfdb
commit 6045ea62e0
4 files changed
+9 -5

No files matched your search

+2 -1
View File
@@ -16,7 +16,8 @@ export const SENDER_IDENTITY_HEADER = "X-OpenRig-Session";
* P18 sender-provenance — derive the caller's identity from the seat ENV (never a request-body
* claim). Routes that record authorship into the channel of record read ONLY this header, so a
* buggy/stale caller cannot write false history by fat-fingering or stale-copying a body field.
* Absent env ⇒ no header ⇒ the daemon refuses-unattributable LOUD (the approve-actor pattern). One
* Absent env ⇒ no header ⇒ the daemon DELIVERS and labels the write `claimed:v1` (P18 deliver-and-label;
* a write with no actor at all is 400 actor_required — parameter completeness, not a refusal). One
* chokepoint: `DaemonClient.fetch` stamps this on every request; callers never set it by hand.
*/
export function senderIdentityHeaders(originSelfHostId?: string): Record<string, string> {
+2 -1
View File
@@ -60,7 +60,8 @@ export function chatroomCommand(depsOverride?: StatusDeps): Command {
}
// P21: no body sender — the daemon derives it from the transport header (X-OpenRig-Session,
// stamped by DaemonClient from the seat env). A hardcoded 'cli' would 409 against the header.
// stamped by DaemonClient from the seat env). A hardcoded 'cli' differing from the header would be
// SUPERSEDED by it (transport:v1), not persisted (P18: the 409 mismatch is retired).
const res = await client.post<Record<string, unknown>>(
`/api/rigs/${encodeURIComponent(rigId)}/chat/send`,
{ body: message },
+2 -1
View File
@@ -383,7 +383,8 @@ export function createMcpServer(client: DaemonClient): McpServer {
const rigId = matches[0]!.id;
// P21: no body sender — the daemon derives it from the transport header (X-OpenRig-Session,
// stamped by the MCP server's DaemonClient from its seat env). A hardcoded 'mcp' would 409.
// stamped by the MCP server's DaemonClient from its seat env). A hardcoded 'mcp' differing from the
// header would be SUPERSEDED by it (transport:v1), not persisted (P18: the 409 mismatch is retired).
const res = await client.post(`/api/rigs/${encodeURIComponent(rigId)}/chat/send`, {
body,
});
+3 -2
View File
@@ -139,8 +139,9 @@ export function reviewRoutes(): Hono {
// end-to-end (Packet 1 FR-9 mission semantics); slice is the v1 surface.
return c.json({ error: "freeze_request_invalid", hint: 'required: {"scope":"slice","name":"<slice>","actor":"<session>"}' }, 400);
}
// P21 I5: review freeze is a founder-visible surface — resolveActorWithDeferral: header present ⇒
// derive + transport:v1 + 409-on-mismatch (CLI); header absent (browser UI) ⇒ claimed-era, never-break.
// P21 I5: review freeze is a founder-visible surface — resolveActorWithDeferral, P18 deliver-and-label:
// header present ⇒ derive + transport:v1, the wire SUPERSEDES a mismatched body (409 retired, ruling A);
// header absent (browser UI) ⇒ claimed:v1, never-break.
const identity = resolveActorWithDeferral(c, { verb: "review freeze", bodyClaim: body.actor });
if (!identity.ok) return identity.response;
const ctx = gatherer.composeSliceWithContext(body.name);