Skip to content

Add claude/snapshot — persistent memory across sessions - #396

Merged
joelteply merged 1 commit into
mainfrom
feature/claude-snapshot
Mar 25, 2026
Merged

joelteply merged 1 commit into
mainfrom
feature/claude-snapshot

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

Second self-built tool. ./jtag claude/snapshot saves structured work-state to ~/.continuum/claude/snapshots/latest.json. Next session reads it to resume instantly.

Captures: summary, pending work, next steps, key decisions, issues touched, git state (branch, uncommitted, recent commits). All automatic except the summary param.

Pair with claude/context

# End of session — save state
./jtag claude/snapshot --summary="..." --nextSteps="..."

# Start of next session — load state
./jtag claude/context
cat ~/.continuum/claude/snapshots/latest.json

Test plan

  • npm run build:ts — compiles clean
  • npm start — deploys, command registered
  • ./jtag claude/snapshot --summary="test" — saves snapshot, creates latest.json
  • Snapshot contains git branch, uncommitted files, recent commits automatically

Closes #395 (partially — context + snapshot done, resume and deeper integration remain)

Saves structured work-state snapshots to ~/.continuum/claude/snapshots/.
Each snapshot captures: what was being worked on, pending work, next
steps, key decisions, issues touched, and automatic git state.

latest.json always points to the most recent snapshot. Next session
reads it to resume without context loss. This is the second self-built
tool — moving from primitive MEMORY.md toward real persistent state.
Copilot AI review requested due to automatic review settings March 25, 2026 03:12
@joelteply
joelteply merged commit 9577619 into main Mar 25, 2026
@joelteply
joelteply deleted the feature/claude-snapshot branch March 25, 2026 03:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new claude/snapshot JTAG command intended to persist Claude’s current work state to disk so future sessions can resume quickly, complementing the existing claude/context tooling.

Changes:

  • Registers the new claude/snapshot command in generated command registries/schemas/constants.
  • Implements the command (server writes snapshot JSON + latest.json; browser delegates to server) and introduces shared types + generator spec.
  • Adds command package scaffolding (README, npm metadata, unit/integration test files).

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/shared/generated-command-constants.ts Adds CLAUDE_SNAPSHOT command constant.
src/server/generated.ts Registers server-side command class for claude/snapshot.
src/browser/generated.ts Registers browser-side command class for claude/snapshot.
src/generator/specs/claude-snapshot.json New generator spec describing params/results/examples.
src/generated-command-schemas.json Adds generated schema entry for claude/snapshot.
src/commands/claude/snapshot/shared/ClaudeSnapshotTypes.ts Defines params/results and factory helpers + typed executor.
src/commands/claude/snapshot/server/ClaudeSnapshotServerCommand.ts Implements snapshot creation, git introspection, and filesystem persistence.
src/commands/claude/snapshot/browser/ClaudeSnapshotBrowserCommand.ts Browser delegation wrapper via remoteExecute.
src/commands/claude/snapshot/README.md Command documentation (usage, params, testing).
src/commands/claude/snapshot/package.json Command package metadata + scripts.
src/commands/claude/snapshot/.npmignore Publish ignore rules for the command package.
src/commands/claude/snapshot/test/unit/ClaudeSnapshotCommand.test.ts Added unit-test scaffold (currently script-style).
src/commands/claude/snapshot/test/integration/ClaudeSnapshotIntegration.test.ts Added integration-test scaffold (live-system runner).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +62 to +65
// Save to ~/.continuum/claude/snapshots/
const homeDir = process.env.HOME || '/tmp';
const snapshotDir = path.join(homeDir, '.continuum', 'claude', 'snapshots');
fs.mkdirSync(snapshotDir, { recursive: true });

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snapshot path resolution uses process.env.HOME || '/tmp', which is not reliable cross-platform (e.g. Windows) and can unexpectedly write to /tmp. The repo already centralizes the Continuum home root via SystemPaths/GlobalPaths (based on os.homedir()); use that as the base for claude/snapshots so snapshots always land under the canonical ~/.continuum root.

Copilot uses AI. Check for mistakes.
pendingWork: params.pendingWork || null,
nextSteps: params.nextSteps || null,
decisions: params.decisions || null,
issuesWorked: params.issuesWorked ? params.issuesWorked.split(',').map(s => s.trim()) : [],

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issuesWorked parsing will include empty strings when the input has extra commas/whitespace (e.g. "376, ,"), which then gets persisted into the snapshot. Consider trimming and filtering out empty entries so the stored array only contains real issue identifiers.

Suggested change
issuesWorked: params.issuesWorked ? params.issuesWorked.split(',').map(s => s.trim()) : [],
issuesWorked: params.issuesWorked ? params.issuesWorked.split(',').map(s => s.trim()).filter(Boolean) : [],

Copilot uses AI. Check for mistakes.
Comment on lines +65 to +79
fs.mkdirSync(snapshotDir, { recursive: true });

const filePath = path.join(snapshotDir, `${snapshotId}.json`);
fs.writeFileSync(filePath, JSON.stringify(snapshot, null, 2));

// Also write latest.json for easy access
const latestPath = path.join(snapshotDir, 'latest.json');
fs.writeFileSync(latestPath, JSON.stringify(snapshot, null, 2));

return createClaudeSnapshotResultFromParams(params, {
success: true,
snapshotId,
filePath,
timestamp,
});

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File writes here are synchronous and unguarded; any filesystem error (permissions, disk full, invalid home dir) will throw and the command won’t return a structured ClaudeSnapshotResult.error. Consider wrapping the mkdir/write steps in try/catch and returning success:false with a PersistenceError (or using the artifacts layer / an atomic write pattern) so callers get a consistent, serializable error and latest.json can’t be left partially-written.

Suggested change
fs.mkdirSync(snapshotDir, { recursive: true });
const filePath = path.join(snapshotDir, `${snapshotId}.json`);
fs.writeFileSync(filePath, JSON.stringify(snapshot, null, 2));
// Also write latest.json for easy access
const latestPath = path.join(snapshotDir, 'latest.json');
fs.writeFileSync(latestPath, JSON.stringify(snapshot, null, 2));
return createClaudeSnapshotResultFromParams(params, {
success: true,
snapshotId,
filePath,
timestamp,
});
let filePath: string | null = null;
try {
fs.mkdirSync(snapshotDir, { recursive: true });
filePath = path.join(snapshotDir, `${snapshotId}.json`);
fs.writeFileSync(filePath, JSON.stringify(snapshot, null, 2));
// Also write latest.json for easy access
const latestPath = path.join(snapshotDir, 'latest.json');
fs.writeFileSync(latestPath, JSON.stringify(snapshot, null, 2));
return createClaudeSnapshotResultFromParams(params, {
success: true,
snapshotId,
filePath,
timestamp,
});
} catch (err) {
return createClaudeSnapshotResultFromParams(params, {
success: false,
snapshotId,
filePath,
timestamp,
error: {
type: 'PersistenceError',
message: 'Failed to persist Claude snapshot to disk.',
details:
err instanceof Error
? { name: err.name, message: err.message }
: String(err),
},
});
}

Copilot uses AI. Check for mistakes.
### Save end-of-session snapshot

```bash
undefined

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Examples section currently renders undefined, so users don’t have a working CLI example to follow. Replace this with a real ./jtag claude/snapshot --summary=... invocation (and optionally show --nextSteps, etc.).

Suggested change
undefined
./jtag claude/snapshot \
--summary="Wrapped up work on payment retries and logging" \
--pendingWork="Refactor retry backoff, add more test coverage" \
--nextSteps="Implement exponential backoff, ship hotfix" \
--decisions="Chose to log retry attempts at INFO level" \
--issuesWorked="376,335,317"

Copilot uses AI. Check for mistakes.
Comment on lines +103 to +106
```bash
# Run unit tests (no server required)
npx tsx commands/Claude Snapshot/test/unit/ClaudeSnapshotCommand.test.ts
```

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documented unit-test command uses commands/Claude Snapshot/... (with a space/capitalization), which doesn’t match the actual repo path (commands/claude/snapshot/...) and will fail if copied verbatim. Update the path in the README to the real location under src/commands/claude/snapshot/....

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +10
"test": "npm run test:unit && npm run test:integration",
"test:unit": "npx vitest run test/unit/*.test.ts",
"test:integration": "npx tsx test/integration/ClaudeSnapshotIntegration.test.ts",

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test:unit runs vitest, but this file is a self-executing tsx script (no describe/it), so vitest run test/unit/*.test.ts will discover 0 tests and won’t exercise the command logic. Either convert this to proper Vitest tests or change the script to run the file with tsx so CI/local runs actually validate behavior.

Copilot uses AI. Check for mistakes.
* This is a REFERENCE EXAMPLE showing best practices for command testing.
*
* Generated by: ./jtag generate
* Run with: npx tsx commands/Claude Snapshot/test/unit/ClaudeSnapshotCommand.test.ts

Copilot AI Mar 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The header comment suggests running npx tsx commands/Claude Snapshot/..., but the actual path is commands/claude/snapshot/... under src/. This mismatch makes the “Run with” instruction incorrect when copied verbatim.

Suggested change
* Run with: npx tsx commands/Claude Snapshot/test/unit/ClaudeSnapshotCommand.test.ts
* Run with: npx tsx src/commands/claude/snapshot/test/unit/ClaudeSnapshotCommand.test.ts

Copilot uses AI. Check for mistakes.
joelteply added a commit that referenced this pull request Aug 10, 2026
…ll-uuid | short-id | name, fail loud on a dead ref (#396)

benchmark/run and cognition/eval took persona_id as a loose String and did a bare
Uuid::parse_str: a valid-but-DEAD full UUID parsed fine, then died ~10s later at the
fork wait with a MISLEADING "its mind was not assembled at spawn (register_from_cfg)"
— which I misread all night as a build regression (#397). The loose-String identity
boundary IS the defect class (Joel: "always uuid... typed AircIdentityId... so you
can't screw it up").

Fix — ONE formal resolution boundary on the workspace registry (the authority on who
is forkable), composing the shared id_resolve primitive:
- PersonaWorkspaceRegistry::resolve_persona(full-uuid | 8-char short-id | persona NAME)
  → typed Uuid. A well-formed full UUID passes THROUGH without a liveness check, so a
  persona whose template is still assembling (the post-reboot register_from_cfg race
  the fork wait absorbs) is never false-rejected — race safety stays in the wait, not
  here. Short-id + name resolve against the forkable set; garbage fails LOUD naming the
  online roster ("Online now: Asha (90e758b2), Atlas (e5f4141d)").
- template_ids() accessor for the forkable candidate set.
- eval.rs routes persona_id through resolve_persona (benchmark/run + agent/solve inherit
  it — one seam, all callers), and the 4 post-wait "no workspace template" messages now
  say "persona X is not online — call persona/instances/list" instead of the internal
  register_from_cfg note that read as a regression.

This same seam serves BigMama's Hermes/openclaw + ACP peers — she hit the identical
parse-accepts-then-dies-later shape (AcpAgent::from_str parses a nonexistent program,
spawn fails later as "program not found").

Name resolution (Asha->id) here is UUID+short-id+name; the broader AircIdentityId newtype
+ clippy-deny ratchet remain the #396 tail.

// what this catches: resolve_persona_takes_uuid_short_id_or_name_and_fails_loud

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 10, 2026
…ll-uuid | short-id | name, fail loud on a dead ref (#396)

benchmark/run and cognition/eval took persona_id as a loose String and did a bare
Uuid::parse_str: a valid-but-DEAD full UUID parsed fine, then died ~10s later at the
fork wait with a MISLEADING "its mind was not assembled at spawn (register_from_cfg)"
— which I misread all night as a build regression (#397). The loose-String identity
boundary IS the defect class (Joel: "always uuid... typed AircIdentityId... so you
can't screw it up").

Fix — ONE formal resolution boundary on the workspace registry (the authority on who
is forkable), composing the shared id_resolve primitive:
- PersonaWorkspaceRegistry::resolve_persona(full-uuid | 8-char short-id | persona NAME)
  → typed Uuid. A well-formed full UUID passes THROUGH without a liveness check, so a
  persona whose template is still assembling (the post-reboot register_from_cfg race
  the fork wait absorbs) is never false-rejected — race safety stays in the wait, not
  here. Short-id + name resolve against the forkable set; garbage fails LOUD naming the
  online roster ("Online now: Asha (90e758b2), Atlas (e5f4141d)").
- template_ids() accessor for the forkable candidate set.
- eval.rs routes persona_id through resolve_persona (benchmark/run + agent/solve inherit
  it — one seam, all callers), and the 4 post-wait "no workspace template" messages now
  say "persona X is not online — call persona/instances/list" instead of the internal
  register_from_cfg note that read as a regression.

This same seam serves BigMama's Hermes/openclaw + ACP peers — she hit the identical
parse-accepts-then-dies-later shape (AcpAgent::from_str parses a nonexistent program,
spawn fails later as "program not found").

Name resolution (Asha->id) here is UUID+short-id+name; the broader AircIdentityId newtype
+ clippy-deny ratchet remain the #396 tail.

// what this catches: resolve_persona_takes_uuid_short_id_or_name_and_fails_loud

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 11, 2026
… the paid market (#396 lane)

My half of the cross-class-churn defense (BigMama takes the capability filter). The mint stake is
NOT a currency bond — the entry cost is REAL delivered work, never burnt hashing (anti-Bitcoin by
construction, and exactly Joel's "minting identities buys a bounded number of probes").

graduated(rep, probe_quota) = rep.honored >= probe_quota. run_paid_market offers a paid job only to
GRADUATED participants; an ungraduated identity — including every freshly-minted shell — cannot bid
on paid work at all. So a cheap-spec cross-class liar never graduates (it never honors a probe) and
never reaches the paid market no matter how cheaply it advertises; minting N identities costs
N × probe_quota real deliveries a churner never pays.

This is the SECOND, independent defense against the cross-class residual that trust_lower_bound alone
did not bound: the capability filter removes the hiding terrain, the gate requires proven delivery to
enter paid work. Two tests, both run:
  - the_mint_stake_keeps_ungraduated_shells_out_of_the_paid_market: a cheap-liar attempts its probes,
    fails all, never graduates, earns 0 on paid work; the graduated incumbent takes the market.
  - the_gate_admits_a_proven_newcomer_it_never_excludes: a fresh identity that DELIVERS its probes
    graduates and earns — the gate is a doorway, not a wall (avoids the price-unknown-as-worst failure).

8/8 green (cargo test -p continuum-core --lib capacity::market --features metal,accelerate).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 11, 2026
…ll-uuid | short-id | name, fail loud on a dead ref (#396)

benchmark/run and cognition/eval took persona_id as a loose String and did a bare
Uuid::parse_str: a valid-but-DEAD full UUID parsed fine, then died ~10s later at the
fork wait with a MISLEADING "its mind was not assembled at spawn (register_from_cfg)"
— which I misread all night as a build regression (#397). The loose-String identity
boundary IS the defect class (Joel: "always uuid... typed AircIdentityId... so you
can't screw it up").

Fix — ONE formal resolution boundary on the workspace registry (the authority on who
is forkable), composing the shared id_resolve primitive:
- PersonaWorkspaceRegistry::resolve_persona(full-uuid | 8-char short-id | persona NAME)
  → typed Uuid. A well-formed full UUID passes THROUGH without a liveness check, so a
  persona whose template is still assembling (the post-reboot register_from_cfg race
  the fork wait absorbs) is never false-rejected — race safety stays in the wait, not
  here. Short-id + name resolve against the forkable set; garbage fails LOUD naming the
  online roster ("Online now: Asha (90e758b2), Atlas (e5f4141d)").
- template_ids() accessor for the forkable candidate set.
- eval.rs routes persona_id through resolve_persona (benchmark/run + agent/solve inherit
  it — one seam, all callers), and the 4 post-wait "no workspace template" messages now
  say "persona X is not online — call persona/instances/list" instead of the internal
  register_from_cfg note that read as a regression.

This same seam serves BigMama's Hermes/openclaw + ACP peers — she hit the identical
parse-accepts-then-dies-later shape (AcpAgent::from_str parses a nonexistent program,
spawn fails later as "program not found").

Name resolution (Asha->id) here is UUID+short-id+name; the broader AircIdentityId newtype
+ clippy-deny ratchet remain the #396 tail.

// what this catches: resolve_persona_takes_uuid_short_id_or_name_and_fails_loud

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 11, 2026
… the paid market (#396 lane)

My half of the cross-class-churn defense (BigMama takes the capability filter). The mint stake is
NOT a currency bond — the entry cost is REAL delivered work, never burnt hashing (anti-Bitcoin by
construction, and exactly Joel's "minting identities buys a bounded number of probes").

graduated(rep, probe_quota) = rep.honored >= probe_quota. run_paid_market offers a paid job only to
GRADUATED participants; an ungraduated identity — including every freshly-minted shell — cannot bid
on paid work at all. So a cheap-spec cross-class liar never graduates (it never honors a probe) and
never reaches the paid market no matter how cheaply it advertises; minting N identities costs
N × probe_quota real deliveries a churner never pays.

This is the SECOND, independent defense against the cross-class residual that trust_lower_bound alone
did not bound: the capability filter removes the hiding terrain, the gate requires proven delivery to
enter paid work. Two tests, both run:
  - the_mint_stake_keeps_ungraduated_shells_out_of_the_paid_market: a cheap-liar attempts its probes,
    fails all, never graduates, earns 0 on paid work; the graduated incumbent takes the market.
  - the_gate_admits_a_proven_newcomer_it_never_excludes: a fresh identity that DELIVERS its probes
    graduates and earns — the gate is a doorway, not a wall (avoids the price-unknown-as-worst failure).

8/8 green (cargo test -p continuum-core --lib capacity::market --features metal,accelerate).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 11, 2026
…d bullet)

Closes the CLI blind spot that made a benchmark/dispatch hard to verify: there was no
way to ask "who is online on THIS machine, and what work is staged in their workspaces?"
(the roster read verb scoped under #396). It is a thin projection of
PersonaAircRuntimeRegistry::roster_snapshot — the SAME snapshot benchmark/dispatch
resolves its assignees against — plus, per citizen, the SWE instances already staged in
her workspace (dirs under workspace/swe/<id> that carry a .git). That staged column is
what distinguishes a fresh clone from a REUSE: a non-empty list means dispatch found the
checkout and skipped cloning.

Read-only ActionCommand (Privileged — it exposes peer_ids + workspace staging, the infra
a curator/dispatch sees; room/members stays the citizen-facing roster). Aliases
persona/list + roster. Constructed in WorkModule::commands() where the registry lives,
same dep-ownership pattern as benchmark/dispatch (keeps it out of the
registered-but-unroutable class, #344).

Tests: row-shape wire contract + empty-registry → count=0 (the honest "nobody online,
dispatch would be Denied" signal). ts-rs bindings generated. cargo check + tests green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 11, 2026
…ll-uuid | short-id | name, fail loud on a dead ref (#396)

benchmark/run and cognition/eval took persona_id as a loose String and did a bare
Uuid::parse_str: a valid-but-DEAD full UUID parsed fine, then died ~10s later at the
fork wait with a MISLEADING "its mind was not assembled at spawn (register_from_cfg)"
— which I misread all night as a build regression (#397). The loose-String identity
boundary IS the defect class (Joel: "always uuid... typed AircIdentityId... so you
can't screw it up").

Fix — ONE formal resolution boundary on the workspace registry (the authority on who
is forkable), composing the shared id_resolve primitive:
- PersonaWorkspaceRegistry::resolve_persona(full-uuid | 8-char short-id | persona NAME)
  → typed Uuid. A well-formed full UUID passes THROUGH without a liveness check, so a
  persona whose template is still assembling (the post-reboot register_from_cfg race
  the fork wait absorbs) is never false-rejected — race safety stays in the wait, not
  here. Short-id + name resolve against the forkable set; garbage fails LOUD naming the
  online roster ("Online now: Asha (90e758b2), Atlas (e5f4141d)").
- template_ids() accessor for the forkable candidate set.
- eval.rs routes persona_id through resolve_persona (benchmark/run + agent/solve inherit
  it — one seam, all callers), and the 4 post-wait "no workspace template" messages now
  say "persona X is not online — call persona/instances/list" instead of the internal
  register_from_cfg note that read as a regression.

This same seam serves BigMama's Hermes/openclaw + ACP peers — she hit the identical
parse-accepts-then-dies-later shape (AcpAgent::from_str parses a nonexistent program,
spawn fails later as "program not found").

Name resolution (Asha->id) here is UUID+short-id+name; the broader AircIdentityId newtype
+ clippy-deny ratchet remain the #396 tail.

// what this catches: resolve_persona_takes_uuid_short_id_or_name_and_fails_loud

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 11, 2026
… the paid market (#396 lane)

My half of the cross-class-churn defense (BigMama takes the capability filter). The mint stake is
NOT a currency bond — the entry cost is REAL delivered work, never burnt hashing (anti-Bitcoin by
construction, and exactly Joel's "minting identities buys a bounded number of probes").

graduated(rep, probe_quota) = rep.honored >= probe_quota. run_paid_market offers a paid job only to
GRADUATED participants; an ungraduated identity — including every freshly-minted shell — cannot bid
on paid work at all. So a cheap-spec cross-class liar never graduates (it never honors a probe) and
never reaches the paid market no matter how cheaply it advertises; minting N identities costs
N × probe_quota real deliveries a churner never pays.

This is the SECOND, independent defense against the cross-class residual that trust_lower_bound alone
did not bound: the capability filter removes the hiding terrain, the gate requires proven delivery to
enter paid work. Two tests, both run:
  - the_mint_stake_keeps_ungraduated_shells_out_of_the_paid_market: a cheap-liar attempts its probes,
    fails all, never graduates, earns 0 on paid work; the graduated incumbent takes the market.
  - the_gate_admits_a_proven_newcomer_it_never_excludes: a fresh identity that DELIVERS its probes
    graduates and earns — the gate is a doorway, not a wall (avoids the price-unknown-as-worst failure).

8/8 green (cargo test -p continuum-core --lib capacity::market --features metal,accelerate).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 11, 2026
…d bullet)

Closes the CLI blind spot that made a benchmark/dispatch hard to verify: there was no
way to ask "who is online on THIS machine, and what work is staged in their workspaces?"
(the roster read verb scoped under #396). It is a thin projection of
PersonaAircRuntimeRegistry::roster_snapshot — the SAME snapshot benchmark/dispatch
resolves its assignees against — plus, per citizen, the SWE instances already staged in
her workspace (dirs under workspace/swe/<id> that carry a .git). That staged column is
what distinguishes a fresh clone from a REUSE: a non-empty list means dispatch found the
checkout and skipped cloning.

Read-only ActionCommand (Privileged — it exposes peer_ids + workspace staging, the infra
a curator/dispatch sees; room/members stays the citizen-facing roster). Aliases
persona/list + roster. Constructed in WorkModule::commands() where the registry lives,
same dep-ownership pattern as benchmark/dispatch (keeps it out of the
registered-but-unroutable class, #344).

Tests: row-shape wire contract + empty-registry → count=0 (the honest "nobody online,
dispatch would be Denied" signal). ts-rs bindings generated. cargo check + tests green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 11, 2026
…ll-uuid | short-id | name, fail loud on a dead ref (#396)

benchmark/run and cognition/eval took persona_id as a loose String and did a bare
Uuid::parse_str: a valid-but-DEAD full UUID parsed fine, then died ~10s later at the
fork wait with a MISLEADING "its mind was not assembled at spawn (register_from_cfg)"
— which I misread all night as a build regression (#397). The loose-String identity
boundary IS the defect class (Joel: "always uuid... typed AircIdentityId... so you
can't screw it up").

Fix — ONE formal resolution boundary on the workspace registry (the authority on who
is forkable), composing the shared id_resolve primitive:
- PersonaWorkspaceRegistry::resolve_persona(full-uuid | 8-char short-id | persona NAME)
  → typed Uuid. A well-formed full UUID passes THROUGH without a liveness check, so a
  persona whose template is still assembling (the post-reboot register_from_cfg race
  the fork wait absorbs) is never false-rejected — race safety stays in the wait, not
  here. Short-id + name resolve against the forkable set; garbage fails LOUD naming the
  online roster ("Online now: Asha (90e758b2), Atlas (e5f4141d)").
- template_ids() accessor for the forkable candidate set.
- eval.rs routes persona_id through resolve_persona (benchmark/run + agent/solve inherit
  it — one seam, all callers), and the 4 post-wait "no workspace template" messages now
  say "persona X is not online — call persona/instances/list" instead of the internal
  register_from_cfg note that read as a regression.

This same seam serves BigMama's Hermes/openclaw + ACP peers — she hit the identical
parse-accepts-then-dies-later shape (AcpAgent::from_str parses a nonexistent program,
spawn fails later as "program not found").

Name resolution (Asha->id) here is UUID+short-id+name; the broader AircIdentityId newtype
+ clippy-deny ratchet remain the #396 tail.

// what this catches: resolve_persona_takes_uuid_short_id_or_name_and_fails_loud

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 11, 2026
… the paid market (#396 lane)

My half of the cross-class-churn defense (BigMama takes the capability filter). The mint stake is
NOT a currency bond — the entry cost is REAL delivered work, never burnt hashing (anti-Bitcoin by
construction, and exactly Joel's "minting identities buys a bounded number of probes").

graduated(rep, probe_quota) = rep.honored >= probe_quota. run_paid_market offers a paid job only to
GRADUATED participants; an ungraduated identity — including every freshly-minted shell — cannot bid
on paid work at all. So a cheap-spec cross-class liar never graduates (it never honors a probe) and
never reaches the paid market no matter how cheaply it advertises; minting N identities costs
N × probe_quota real deliveries a churner never pays.

This is the SECOND, independent defense against the cross-class residual that trust_lower_bound alone
did not bound: the capability filter removes the hiding terrain, the gate requires proven delivery to
enter paid work. Two tests, both run:
  - the_mint_stake_keeps_ungraduated_shells_out_of_the_paid_market: a cheap-liar attempts its probes,
    fails all, never graduates, earns 0 on paid work; the graduated incumbent takes the market.
  - the_gate_admits_a_proven_newcomer_it_never_excludes: a fresh identity that DELIVERS its probes
    graduates and earns — the gate is a doorway, not a wall (avoids the price-unknown-as-worst failure).

8/8 green (cargo test -p continuum-core --lib capacity::market --features metal,accelerate).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 11, 2026
…d bullet)

Closes the CLI blind spot that made a benchmark/dispatch hard to verify: there was no
way to ask "who is online on THIS machine, and what work is staged in their workspaces?"
(the roster read verb scoped under #396). It is a thin projection of
PersonaAircRuntimeRegistry::roster_snapshot — the SAME snapshot benchmark/dispatch
resolves its assignees against — plus, per citizen, the SWE instances already staged in
her workspace (dirs under workspace/swe/<id> that carry a .git). That staged column is
what distinguishes a fresh clone from a REUSE: a non-empty list means dispatch found the
checkout and skipped cloning.

Read-only ActionCommand (Privileged — it exposes peer_ids + workspace staging, the infra
a curator/dispatch sees; room/members stays the citizen-facing roster). Aliases
persona/list + roster. Constructed in WorkModule::commands() where the registry lives,
same dep-ownership pattern as benchmark/dispatch (keeps it out of the
registered-but-unroutable class, #344).

Tests: row-shape wire contract + empty-registry → count=0 (the honest "nobody online,
dispatch would be Denied" signal). ts-rs bindings generated. cargo check + tests green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 14, 2026
… spike instrumentation, wire perf (#2284)

* fix(ids): UUIDs are not strings — mint real ones, and stop typing ids as text (#274/#396)

Joel, 2026-08-13: "Always use uuid and never corrupt them with random prefixes" and
"UUID's are NOT strings. If you're using strings for id you are writing slop."
Both landed on code written minutes earlier, and the grep that followed found the
same defect older and wider than my one file.

Three fixes, in order of how badly they were wrong:

1. The four shipped recipe ids were hand-drawn patterns (c0de0001-0000-4000-...),
   a name wearing a UUID's costume — readable, collidable, and fake. Replaced with
   genuine v4s in both the authored JSON and the `shipped::` constants, written
   grouped (0xfed332c3_383c_45bb_...) so the two are checkable by eye.

2. comms::{MessageId, CorrelationId} were `String` newtypes. `MessageId::new("msg-1")`
   let any caller invent a namespace that collides with every other caller's. Both
   are now `Uuid`: MessageId::new() MINTS (no caller-supplied form exists), and
   CorrelationId::of_exchange(id) states the derivation the old
   `CorrelationId(id.0.clone())` left implicit. Still distinct TYPES — the compiler,
   not a naming convention, is what stops one being passed as the other.

3. EndpointId is deleted. Its values were `EndpointId::new("browser")` and
   `("rust-core")` — a client-kind label standing in for an identity, and with it
   the assumption that the web client is a distinguished endpoint. It is one client
   among many (mobile, SDK, TUI, another node's core). TransportEnvelope.source and
   .target are now PeerId, the substrate's one actor identity per identity/mod.rs.
   Zero callers outside comms/mod.rs; the stale generated binding goes too.

Also closes the on-disk authoring hole the required `id` field opened: a recipe file
that names no id now gets one DERIVED from its purpose (RFC 4122 v5 under a frozen
namespace), so "author a file, zero code" keeps meaning zero code — no uuidgen — and
every node that loads the same file agrees on its identity with nothing to reconcile.
A recipe that DOES carry an id keeps it verbatim.

Tests: comms 23 pass (envelope wire shape now asserts ids round-trip as their own
UUIDs; minted_message_ids_are_unique pins the collision fix), experience 43 pass
including the previously-failing an_experience_authored_on_disk_needs_no_rust.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(CLAUDE.md): headless Rust core is the system — Node is ONE client, not the deploy path

Joel, 2026-08-13: "Headless rust period. No need for node to run everything except
for the web interface which is one of many, including mobile apps/sdk." — and then,
because I kept treating the correction as a code-only matter: "Fix these severe
misunderstandings ... regardless of where they are."

This file is where the misunderstanding REPRODUCES. It is loaded into every agent
session, and it opened with "EVERY TIME YOU EDIT CODE: Run `npm start` (MANDATORY)"
under `cd src` — a directory that no longer exists — plus "ALL Rust binaries MUST be
built via npm start". A fresh agent under amnesia reads that and concludes Node runs
the system. It doesn't, and `continuum --help` has been saying so in its own first
line the whole time: "build + run the headless Rust core".

Rewrote the CRITICAL WORKFLOW section around what is actually true, and swept the
other 11 Node-as-deploy claims scattered through the file:

- The core is Rust and boots with no Node. Node builds the WEB desktop, which is one
  client among several (mobile, SDK, TUI, MCP, another node's core over the grid).
  Named the consequence, because it already cost us: a feature that lives in a client
  exists only for that client — how voice ended up web-only with every other citizen
  structurally mute (#58). Behaviour goes in the core; clients render.
- The deploy path is `continuum reboot` (Rust build + relaunch + running-SHA verify),
  with `deploy-verify` and the version trio called out — that verification exists
  because a reboot once shipped a stale binary and reported success (#194).
- `cargo build` stays discouraged for the RIGHT reason (a hand-built binary exists
  only on your machine, and a fresh clone must work with no manual steps, #291) —
  not the old implication that Rust must be built through npm. `cargo check` is
  named as the correct type-check-while-you-work tool, with the shared CARGO_TARGET_DIR.
- `npm run build:ts` now says what it actually covers: the web client, and nothing
  about whether the core compiles.
- Flagged `./jtag` inline as the legacy Node CLI. Left the invocations that follow,
  since their command NAMES are still accurate — it is the driver that is stale.

No code change; the one surviving "npm start" is the sentence warning you off it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cli): `uu` is the alias — `cu` is UUCP, and every harness defaulted to a binary that does not exist

Joel: "Cu conflicts with some Unix program. Fix for all cases including windows"
and "It's a bug Claude" — it is, and worse than doc drift.

`cu` is /usr/bin/cu (UUCP call-unix) on every Unix. `uu` — the double-U of
contin-UU-m — is THE official short alias, and start-server.sh has installed
exactly that (plus a squatter guard) since 2026-08-01, with a comment naming this
very collision. Nothing in the tree installs `cu`. But the REFERENCES never
followed:

- Six benchmark harnesses defaulted to `~/.continuum/cache/cargo-target/{release,debug}/cu`.
  Neither file exists — the only built CLI is `release/continuum`. So the default
  resolved to nothing and every default-args run died at the first invocation.
  matrix.py even carries a comment about this exact class of failure biting once
  before (2026-07-22, stale debug-only default silently no-opping the sweep).
- Fixed by RESOLVING rather than renaming: a shared `_resolve_cli()` prefers what
  is actually installed on PATH (`uu`, then `continuum`) and falls back to the
  release build — so it works from a fresh clone, an installed box, or a dev tree,
  on any platform, instead of hard-coding one machine's layout.
- Flag renamed `--cu` → `--uu` with all in-repo call sites updated
  (sweep_all → matrix → headtohead → preflight_gpu chain).

Also swept 53 `cu <command>` occurrences in docs, Rust comments, and generated-TS
doc comments to `uu`. Left the ones that are ABOUT the collision (memory-bridge
README's "never bare `cu`", WAKEUP-AND-JOIN's rename note) — those are correct as
written, and legacy/ stays quarantined.

README dev section reworked in the same pass: the boot path is `continuum start` /
`continuum reboot` / `continuum ping`, with Node named as what it actually is —
the web client's build dependency, one client among mobile/SDK/TUI/MCP, not the
thing that runs the system.

Verified: all six harnesses compile (py_compile), cargo check clean, zero
`target/{release,debug}/cu` paths left in the tree.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(core): the last Python in the runtime path — one vestigial, one silently swallowing the job

Joel: "Fix all nodejs and python dependencies that are breaking our headless rust
core ... we must find all smell all the time and never ignore it."

AUDIT RESULT FIRST, because one half is good news:

  Node spawns from the running core: ZERO. `Command::new("node"|"npm"|"npx"|
  "deno"|"bun")` has no occurrences anywhere in continuum-core. The core is
  genuinely headless Rust at runtime; Node exists only to build the web client.

  Python spawns from the running core: FOUR sites, and neither kind was honest.

1. THREE were vestigial and were hiding untested code. `file_engine.rs` had three
   `#[test]`s opening with `if Command::new("python3").arg("--version").output()
   .is_err() { return; }` — a skip-guard from when the syntax gate shelled out to
   `python3 -m py_compile`. That interpreter is GONE: the production path is
   `code::syntax::validator_for` → `unbound_calls`, pure Rust. So on any box
   without python3 — a CI runner, a fresh clone — three tests reported PASS while
   asserting nothing at all. Guards removed; all 55 file_engine tests pass without
   an interpreter present, which is the proof they never needed one.
   Also corrected the doc on `introduced_undefined_calls`, which still told the
   reader the analysis returns None when there is "no python". There is no python.

2. ONE is a REAL runtime dependency, and it was failing silently. `forge/start`
   spawns `python3 <alloy_executor>` — a script that lives in the SIBLING
   sentinel-ai repo, which a fresh clone of continuum does not have. When
   `find_alloy_executor()` returned None the handler used pid 0 and wrote
   `state: "queued"` — indistinguishable from a job legitimately waiting its turn.
   So on every machine that had only cloned this repo, `forge/start` returned
   SUCCESS for work that nothing would ever run. Now it fails loud, names the
   missing script, says where to get it, and states plainly that the job was NOT
   queued. The dependency itself is still there — excising it to Rust is #52/#99
   — but it can no longer pretend to have worked.

The pattern in both: a Python dependency that had already been removed or had
never been satisfiable, still shaping behaviour through a stale guard and a
fallback. `[[fallbacks-are-illegal-fail-loud]]`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(identity): PersonaRef vs PeerId — a reference is not an identity, and the compiler now knows

Joel: "UUID's are NOT strings … Well defined and named structs by reference must be
used." Chasing that through persona_id turned up something sharper than the count.

THE FINDING. `PersonaWorkspaceRegistry::resolve_persona` exists specifically to close
what its own doc calls "the loose-`String` id boundary … the defect class that fed a
dead id to a doomed eval." It has SEVEN call sites. SIX are its own tests. ONE is
production (eval.rs). Against 55 `persona_id: String` fields. The check was correct
and essentially nothing called it — a correct check nothing calls is nastier than a
missing one, because it reads as covered.

Nothing forced the call, because both sides were `String`.

THE FIX — two types, one door:
- `PersonaRef` (new, in identity/): what a CALLER writes — full UUID, 8-char short-id,
  or name. Explicitly NOT an identity. Its only accessor is `as_str()`; there is no
  `as_peer_id()`, because a name is ambiguous, mutable, and meaningless without a
  roster.
- `PeerId` (existing canonical actor identity): what everything downstream holds.
- `resolve_persona(&PersonaRef) -> Result<PeerId, _>` is now the ONLY bridge. Taking
  the newtype rather than `&str` is what makes resolution unskippable.

`From<PeerId> for PersonaRef` exists (an identity is always a valid reference to
itself); the reverse deliberately does not — it requires a roster.

Wire shape is unchanged: `#[serde(transparent)]` over the same string callers already
send, so no client, recipe, or stored payload changes. Short-id and name PX (#161)
keeps working — that ergonomics is the whole reason a reference type has to exist
separately rather than everything becoming a UUID.

Converted, types pushed DOWN rather than laundered at the seam:
- `CognitionEvalParams.persona_id` → `PersonaRef`
- `restore_persona_workspace(&PersonaRef)` (was `&str`)
- `append_failed_ledger(&PersonaRef, …)` (was `&str`)

HELD, and stated rather than fudged: `CognitionEvalResult.persona_id` stays `String`.
The struct derives `Default` across 21 fields and a persona reference has no sensible
default — an empty one is a nonsense value that reads as a real answer. The real fix
is splitting the fire-and-poll HANDLE from the completed RESULT (a handle knows only
the requested ref; a result knows the resolved id), which is its own slice. Inventing
a default to satisfy the type checker is the `unwrap_or` reflex: compiler quiet,
runtime wrong. The reason is recorded at the field.

Tests: persona_workspace 10, eval 22, identity 23 — all pass; full lib test build clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(memory): the memory layer takes PersonaRef, not loose text — 21 sites

Second slice of the id-typing migration. All ten `commands/memory/*` params plus the
`MemoryManager` API they call now carry `PersonaRef` instead of `String`/`&str`:
append_memory, append_event, load_corpus, has_corpus, get_corpus, multi_layer_recall,
consciousness_context, persona_db_handle, hydrate_corpus_if_missing.

Types went DOWN into the layer rather than being unwrapped at each call — the whole
point of the previous slice. `.as_str()` now appears only where the value is genuinely
being USED as text (a map key, a `starts_with` shape check, a directory handle), never
to satisfy a signature one call later.

Two `Default` derives removed (`ConsciousnessContextParams`, `LoadCorpusParams`)
rather than giving `PersonaRef` a default. No caller used `::default()` on either, and
an empty persona reference is a nonsense value that reads as a real answer — same
reasoning as the eval result field held in the previous commit.

What this makes visible, and does not yet fix: these commands still never RESOLVE.
They accept a reference and hand it straight to the storage layer as a key, so a name
or short-id reaches the DB unresolved. That was invisible while everything was
`String`; it is now legible in the signatures. Wiring `resolve_persona` into the memory
command path is the next slice (#164/#396).

Tests: memory 219, rag 150 — all pass. Full lib test build clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(commands): persona params carry PersonaRef — agent/solve, persona/*, cognition/observe

Third slice. Seven more command param structs stop typing a persona reference as
`String`: agent/solve, persona/identity/{get,set}, persona/instances/{get,despawn},
persona/wall/pin, cognition/observe (params + the `assemble` signature + its `Meta`,
so the type is consistent through the result rather than converted on the way out).

Same discipline as the memory slice: `.as_str()` appears only where the value is
being USED as text — `id_resolve::resolve` takes a `&str` by design because it also
serves rooms and cards — never to satisfy a signature.

Running total across the three slices: 39 persona params + the memory API + the
resolver itself. `persona_id: String` is down from 55 to 16 in the crate, and every
one that remains is an internal struct holding an already-resolved id (those want
`PeerId`, the next slice) rather than an unresolved caller reference.

Tests: full lib test build clean, commands suite passes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(rag/introspect): last persona PARAMS typed — and the RAG source path carries it down

Fourth slice. `CognitionTraceParams`, the four other introspect params,
`CognitionReplayParams` + result, `RagComposeRequest`, and `DatasetFromTurnsParams`
now carry `PersonaRef`.

The RAG one went two levels deep rather than stopping at the param: `load_source`,
`load_memory_source`, and `load_consciousness_source` all take `&PersonaRef` now, which
deleted the two `&persona_id.into()` conversions the memory slice had left at those
call sites. That is the shape to aim for — when the type reaches the bottom, the
adapters in the middle disappear rather than accumulating.

`persona_id: String` in continuum-core: 55 → 8. Every remaining one is an internal
RECORD (memory/types, should_respond's AIDecisionContext, live/types, projection,
shell_types, ai/types, sentinel) holding a value copied from a param.

Those are deliberately NOT converted to `PeerId` yet. They hold whatever the caller
sent, and nothing on those paths resolves — typing them as an identity today would
assert something the code does not do, which is worse than leaving them `String`.
They become `PeerId` in the same slice that wires `resolve_persona` into those paths,
not before (#164/#396).

Tests: replay 3, rag 18, full lib test build clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(test): 5 supervisor tests have been panicking since #398 slice 3 — the stub's premise expired

`StubAircCitizen::subscribe_all_rooms` was an `unreachable!()` justified by a comment
that said no test drives it. That was true when written and stopped being true at
bf11a66a7 (#398 slice 3), which gave `PersonaSupervisor::materialize` a
`subscribe_all_rooms` call to wire the doctrine/wall cache invalidators. Every
supervisor test that materializes an adapter has been dying in that panic since —
5 of the 10, and they only surface on a FULL-suite run, which is how they sat unnoticed.

Found while verifying my own id-typing slices: full suite came back 7073 passed /
5 failed, and the first question was whether I caused it. I did not — the diff of my
five commits touches `commands/persona/*` only, never `persona/supervisor.rs` or
`persona/airc_citizen.rs`, and `git log` on those two files points at #398.

Fix: return `AircError::Transport` instead of panicking. This is NOT a fallback —
the caller already handles that exact case explicitly (keeps both sources uncached,
"correct, just slow", logs loud), so the tests now exercise the real degradation
branch rather than aborting, and a stub still never pretends to hold a live stream.
An empty stream WOULD have been the fallback: it would have looked like a working
subscription that silently never invalidates.

Comment rewritten to state what is true now, including why the old assertion was
right when it was written. An assertion that outlives its premise is worse than no
assertion — it reads as a guarantee.

persona::supervisor: 10/10 pass.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(test): pin the stub's REFUSAL contract — the old test asserted the panic I removed

`stub_subscribe_panics_loudly` existed to prove the `unreachable!()` fired, so removing
that panic left the assertion failing for the right reason. Rewritten to pin what the
contract actually is now:

  Err(Transport) — required
  Err(anything else) — fail (the caller branches on Transport specifically)
  Ok(stream) — fail LOUDEST, because that is the real fallback: a stub handing back a
               stream looks like a live subscription that silently never invalidates

Matched rather than `expect_err`d because `FilteredEventStream` is not `Debug`.

FULL LIB SUITE NOW GREEN: 7078 passed, 0 failed, 42 ignored. Before this session's
last two commits it was 7073/5 — five supervisor tests panicking since #398 slice 3,
only visible on a full run.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* test(identity): CI guard — a String-typed identity field must be DECLARED, or the build fails

Joel: "eliminate all smell or you will copy it." That is literally the mechanism —
a model reading this tree learns its conventions FROM it, and `persona_id: String`
was 55 sites teaching that ids are text. I did exactly that this session: minted
`c0de0001-…` fake UUIDs because fake-looking ids were already normal here. Prose in
CLAUDE.md does not stop that. A failing test does.

Three tests in identity/mod.rs, running on every PR via the existing
`cargo test -p continuum-core --lib` workflow (no skip pattern matches them):

1. `every_string_typed_identity_field_is_declared` — walks src/, finds any
   `<identity-name>_id: String | Option<String>` field, and fails unless it appears
   in LOOSE_IDS. Comments stripped first, so a doc line can never register as a
   field. The error names the file:field and tells the reader which typed form to
   reach for (`PeerId` for an actor, `PersonaRef` for an unresolved reference, a
   `*Id(Uuid)` newtype otherwise).
2. `no_declaration_outlives_its_defect` — a declaration whose field HAS been fixed
   fails too. Learned directly from `StubAircCitizen::subscribe_all_rooms`, whose
   comment stayed true-sounding for months after its premise expired and cost 5
   silently-failing tests.
3. `declarations_carry_a_real_reason` — every entry starts with external:/pending:/
   defect: and is longer than a shrug, the same bar the module-wiring audit (#344)
   holds.

73 declarations, honestly categorized:
- **external** — LiveKit participant/room ids, log-envelope correlation fields.
  Another system owns the wire format.
- **pending** — ours, but nothing on that path RESOLVES yet. Typing it as an
  identity today would assert something the code does not do. Converts in the slice
  that wires resolution (#164/#396).
- **defect** — `peer_id: String` × 5. These ARE `PeerId`. I attempted the conversion
  in this session and reverted it: `PeerId` has no `JsonSchema` impl and the
  construction sites hold `&str`, so it needs its own slice rather than a rushed
  cascade. Declared as a defect so it stays visible instead of blending in.

POSITIVE CONTROL, because a guard nobody has watched fail is the exact shape of
defect I found earlier today: added `struct PositiveControlProbe { pub owner_id:
String }`, confirmed the guard failed naming `identity/mod.rs: owner_id`, removed it,
confirmed green. The guard also caught 12 sites my own inventory grep had missed —
it is already strictly better than the method I was auditing with.

Full lib suite: 7081 passed, 0 failed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cli): `continuum start` execs the installed server — building is now --from-source

`start` shelled unconditionally into tools/scripts/start-server.sh, which runs a
full cargo build. A "governed" lifecycle verb was a wrapper around a bash file
that only exists inside a repo checkout (BigMama's find, 2026-08-13):

  - a user holding ONLY the installed binary, with no source tree, could not
    start a core at all;
  - the CLI printed one line then went silent for the length of a compile —
    called hung three separate times;
  - the façade's honesty depended entirely on the script underneath.

Same class as the rest of the night's defects: a governed surface over a
hand-rolled path.

Now: `launch_core` locates the installed `continuum-core-server`
(CONTINUUM_CORE_SERVER override → next to the running exe → ~/.continuum/bin →
target/{release,debug} walking up) and execs it directly, keeping the existing
detach/log/pidfile handling unchanged. Building is an EXPLICIT request
(`continuum start --from-source`), never the silent default, and the
no-binary fallback says WHY it fell back and that it compiles first, rather
than going quiet for minutes.

The override refuses loudly when set but not a file — a wrong override must not
look like an absent one.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(core): tree is GREEN again — 7081/0 (peer_id → PeerId finished, guard debt cleared)

The working tree could not build tests. This finishes the identity-typing work
that broke it and clears the guard debt it left behind. `cargo test -p
continuum-core --lib --features metal,accelerate`: 7081 passed, 0 failed.

PEER_ID IS A TYPE, NOT TEXT. The production conversions landed earlier; the
test fixtures were left holding `&str`, so the crate compiled and the test
target did not. Fixtures now derive a real UUID from the literal they used to
carry (v5 under NAMESPACE_OID), which preserves every cross-site equality the
tests depended on — "peer-a" in two places is still the same peer, it is just
an id now instead of a name in costume.

CAUGHT BY DOING IT: contracts/verification had the manifest keyed by a derived
PeerId while the EVENT still claimed a raw string signer. The lookup is BY that
signer, so converting one side made every verification test fail as
MissingPeerManifest. One `test_peer_id` / `test_peer_str` pair now feeds both
sides — the same shape of defect the newtype exists to prevent, reproduced in
the fixtures while removing it from production.

REAL HARDENING, not just fixture churn: `AircPeerManifest::validate` had DROPPED
its empty-peer_id check on the theory that typing the field made it impossible.
Typing killed `""`. It did NOT kill `Uuid::nil()`, which is still constructible
and still means nobody — the type narrowed the hole rather than closing it. The
guard is back, at the remaining expressible form.

GUARD DEBT CLEARED: loose_id_guard's `no_declaration_outlives_its_defect` went
red, correctly — four `peer_id` entries in LOOSE_IDS described fields that are
now `PeerId`. Removed. The guard failing here is it working: a declaration list
that can rot into a graveyard is worth nothing.

Also includes the accumulated session tree: the Joel→Operator fixture sweep (no
person's name hardcoded in test data), ts-rs regeneration, and rustfmt across
the crate. That is why this touches ~717 files; the behavioural change is the
identity typing and the nil-PeerId guard.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(tests): a subsystem-named room does not belong in a fixture either

`k3-serving` had no lifetime because it was named for a SUBSYSTEM, so it
never died — a month-old durable subscription whose board reads were all
corpses. Parted from both scopes.

It also sat in TEST FIXTURES, which is the transmission vector: fixtures
teach the next reader the convention, so a fixture naming a room after a
subsystem teaches that rooms are named for subsystems. Renamed to
`bench-swe-run-1` — an activity with a lifetime, which is what a room IS.

The two remaining mentions in work.rs are the INCIDENT RECORD (4 of 12
cards there carried a 134h-expired lease) and are kept, now annotated
RETIRED so nobody copies the naming from them.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(benchmark): an UNGRADEABLE grade is an ABSENCE, not a capability zero — carry it on the wire and the board

`SweGradeResult.error` documents its own contract: "a result with `error` is an
ABSENCE, not a zero, and must never be tallied as a failed attempt." The grader
earns that honestly — for the env class it re-runs the PRISTINE tree before
declaring a fault, so a genuinely broken patch is never mislabelled.

Then both consumers dropped the classification:

- `benchmark.attempt.end` / `benchmark.autograde` published `resolved=false
  gate_ok=false` and nothing else. Every wire consumer (probe router → rooms,
  exam-room widgets, pulse monitors) reads that as a citizen who tried and lost.
- `fold_run_card` read the RESULT's `infra_error` but never the GRADE's `error`,
  so the board folded `resolved: false` + phase `failed` for the same runs.

The attempt loop already broke correctly on `g.error.is_some()` (attempts 2 and 3
were never burned) — the loss was purely in what got PUBLISHED, which is the part
anything downstream can actually read.

Measured on this box 2026-08-13: 8 of 36 distinct instances (14 of 91 receipts,
22%) grade UNGRADEABLE — requests, pylint, pytest and sympy. Every one of those
zeros was indistinguishable from a capability failure on the wire, so the
denominator of any rate computed off this stream was poisoned. Found by digging
into sympy__sympy-11400: p2p 0/29 on the PRISTINE tree, i.e. the suite does not
run in that environment at all. (#380/#383 own fixing the environments; this
commit owns never again reporting their faults as scores.)

- attempt.end + autograde now carry `ungradeable` + `grade_error`
- `infra_error` takes the grade's error too — one field meaning "no valid
  verdict, and why", fed by both sources rather than a second parallel field
- `resolved` returns to `None` when ungradeable — the same "no verdict" a
  pre-grade card carries, because that is the truth
- new phase `ungradeable`, ordered ahead of `failed` (a run can carry both a
  failed marker and an ungradeable grade; the absence is the truer of the two)

Test asserts absence-not-zero on the real sympy-11400 shape, with a positive
control (same shape, no grade error) that must still fold as a capability zero
— so the test cannot pass by simply never reporting failure.

This is the #384/#386 class one layer up: those classified INFRA at the solve
level, this classifies it at the GRADE level and gets it onto the wire.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(swe): gold-gate the harness — refuse an env whose pytest cannot RUN, instead of caching a tree that grades every attempt UNGRADEABLE

Root cause of the 22% ungradeable rate, glass-boxed on sympy__sympy-11400.

The era pin at the top of this block downgrades pytest to the instance's own
date, which is right when the era INTERPRETER rung (#2253) found a matching
interpreter. When it can't — no Python 3.5 on a modern macOS — the venv falls
back to a modern interpreter while pytest stays pinned to the instance's year,
and the resulting PAIR can be structurally unable to run.

Measured: pytest 2.9.2 (correct for 2016) on Python 3.9.6 dies in
`pytest_configure` with INTERNALERROR before collecting anything — reproduced on
a two-line trivial test, outside the repo, no conftest, no sympy involved. Every
test then "fails", the pristine p2p reads 0/29, the tree grades UNGRADEABLE.
8 of 36 distinct instances on this box are in that state.

So: prove the harness executes before handing the env to a citizen. A version
pin is a GUESS about compatibility; running it is the evidence. `--version` is
not enough — it answers happily for a pytest that dies on any real run.

This REFUSES rather than self-heals, and that is measured, not assumed. The
obvious repair (reinstall a modern pytest) was tried against this exact tree and
does NOT work:

  pytest 8.4.2 → loads, dies in sympy 1.0's 2016 conftest on the `py.path` hook
                 API removed in pytest 7
  pytest 6.2.5 → dies on `py.test.mark.slow`, removed in pytest 4
  pytest 2.9.2 → cannot run on Python 3.9 at all

The band that both RUNS on 3.9 and LOADS a 2016 conftest is EMPTY. No version
choice rescues this class, so an auto-repair would silently trade one void tree
for another.

What DOES work, verified on this tree — 30/30 passing — is sympy's OWN runner
(`sympy.test(...)`) on the same interpreter. That is #383's shape ("django needs
its OWN test runner") generalised: the runner is a property of the repo era, not
a pytest version to search for. `run_tests` is pytest-only today, so until it
grows a runner seam this env genuinely cannot produce a verdict — and it now says
so loudly, naming the incompatibility and pointing at the runner gap, instead of
caching a broken env for every later run to inherit.

[[brittleness-is-the-highest-priority-work-there-is]] — heal what is known-safe,
REPORT what needs a human decision.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(arch): benchmarks are ADAPTERS into recipes/activities — never a parallel runner (Joel's ruling, + STOP gate)

The consequence that makes it law: the learning flywheel consumes ROOM TURNS (L1
lifts tool-traces from captured turns, L2 triggers on turn-completion). A detached
agent/solve writing progress/<run>.grade.json produces NO turns — so a citizen can
burn 12 acts, write a patch, take a graded verdict, and none of it reaches the
curriculum. Maximum effort, zero learning. That, not the pass rate, is why
benchmarks have failed.

Names what is parallel today (ledger files, scraped probes, a second board
projection in fold_run_card, private grade.json), the target shape (import
task+oracle only → project into a recipe → the ROOM is the runner → grading is the
activity outcome → learning falls out because the work happened as turns), and a
one-line acceptance test: can a citizen standing in the room perceive the run's
state through the same ViewState pipe the human's screen uses?

Adds a CLAUDE.md STOP gate over benchmark.rs / agent/solve.rs / swe_bench.rs so an
agent arriving under amnesia must read it before touching run state. Written
because that is exactly what happened: this session shipped two correct fixes that
HARDEN the parallel path instead of dissolving it, including adding a field to a
benchmark probe so external consumers could parse it better — which is the smell
the doc now names.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(activity): a room's recipe binding finally has a READER — every room resolves to what it IS (#6/#274/#329)

`activity/spawn` has always published a room→recipe binding to the wall, and its own
doc says why: "Without this the room forgets which recipe it is and every client falls
back to projecting it as a plain chat room." That was accurate. The binding had NO
READER. `RECIPE_WALL_CATEGORY` appeared in exactly one file — the writer — plus a test
asserting the string equals "recipe".

So the whole recipe layer was live and inert at once: recipes authored as data, a
`RecipeExperienceSource` projecting them, four shipped manifests including a benchmark
carrying scoreboard/central/feed regions — and `DefaultRoomPurpose` answering "chat"
for every room in existence, so none of it ever resolved. A benchmark run's room and a
chat room were the same object to every renderer AND to the citizen standing inside
one. That is what "benchmarks are a parallel system" looks like at the substrate: not
a missing feature, a write with no reader
([[a-correct-check-that-nothing-calls-is-nastier-than-a-missing-one]]).

- `experience/binding.rs` — `RoomRecipeBinding` + `project_binding`, the typed body and
  the one rule for turning a room's wall into its identity. Sibling of `standing.rs`,
  same shape and the same fail-loud stance: no binding is `Ok(None)` (a bare `airc
  join` makes a chat room), an UNREADABLE binding is an error, never a silent downgrade
  to chat.
- `ipc/recipe_room_purpose.rs` — `RecipeRoomPurpose`, the `RoomPurposeSource` impl the
  seam's own doc has been waiting for. Event-invalidated cache, not a per-read fetch:
  `purpose_for` is sync and sits on the projection's store path, so an owner task folds
  `wall:changed` and re-reads the authoritative binding (the supersede chain is
  airc-owned and cannot be reconstructed from a delta — same discipline as the wall
  projector). Seeds every subscribed room at boot so an activity spawned before this
  core booted resolves without waiting for someone to re-pin something.
- `activity/spawn` now SERIALIZES the shared type instead of a hand-authored `json!`.
  Both sides agree by construction — which mattered exactly zero while nothing read it,
  and matters permanently now.
- `positron_source::spawn` takes the purpose source by injection; boot passes the live
  index when a daemon is present, `default_source()` (every room → chat) when headless.

Honest edges, all pinned by tests: an unbound room, an unreadable binding, and a failed
read all resolve to "chat" — the seam is total — but the two failures say so LOUDLY on
the probe stream (`activity.purpose.unreadable_binding`, `activity.purpose.read_failed`).
A binding naming a purpose no recipe declares resolves verbatim, and
`RecipeExperienceSource` then honestly returns no manifest rather than substituting one.

Known follow-up, named rather than hidden: this adds a FOURTH node airc reader
(presence/wall/kanban/purpose). Consolidating them onto one attach is real work and is
not this commit.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(activity): the purpose index must SAY it ran — a silent fold is indistinguishable from a dead one

First live test of the purpose index produced zero probes, and I could not tell from
the evidence whether that meant "attached, seeded, nothing bound" or "never spawned".
The store on disk settled it, but only because I went looking for a sqlite file — the
component itself said nothing either way. That ambiguity is the defect
([[a-correct-check-that-nothing-calls-is-nastier-than-a-missing-one]]).

- attach logs like its three sibling node readers (presence/wall/kanban all do)
- `activity.purpose.seeded` on every boot with {rooms, bound} — "0 bound of 1" is a
  FACT, and a different fact from silence
- `activity.purpose.refreshed` on every wall-change cue, so the invalidation path is
  observed rather than inferred (wall changes are rare; the probe costs nothing)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(persona): RAG is a RenderTarget — one ViewState renders to eyes AND mind (the pattern)

`ACTIVITY-ROOM-PATTERNS.md` has said this since it was written:

  "the same transform serves a human's eyes and a persona's mind, because RAG is a
   render target, not a separate pipeline" … "the human's UI and the persona's
   grounding are the same projection rendered two ways — they cannot drift, because
   there is one definition" … "Never render the two from separate code."

The code rendered them from separate code anyway. The human's roster comes from
`RosterViewState` on the served Substrate; the citizen's came from
`persona::room_roster_source` — a second reader, own fetch, own freshness, own
failure modes. Same for the board (`KanbanViewState` vs `room_board_source`) and the
wall. Three parallel pairs, and one of them was MEASURED delivering a live peer's
name ZERO times into a citizen's prompt while the browser rendered that peer fine.

This is the compression, not new architecture:

- `RagRenderable` — a tiny per-kind impl: KIND (the SAME const the web subscribes
  to), block label, expand verb, measured floor, salience-ordered units, room scope.
- `ViewStateRagSource<V>` — ONE generic adapter making any such kind a `RagSource`.
  Budgeting, packing, cursors, token estimation, honest-empty, and the room gate are
  written once. N kinds cost N small impls and zero new plumbing.

Properties that fall out rather than being bolted on:
- **Cannot drift** — the adapter reads the SAME Substrate the WS server serves.
- **Freshness** — no second fold to lag, so the #346 staleness class (citizen trusts
  an empty board while the announcement is fresh) can't recur here by construction.
- **Degrades** — units pack most-salient-first, so a tight window yields FEWER
  members, never a chopped one (the property `floor_tokens` exists to protect).
- **One room gate** — reuses `room_scope_allows`, the shared predicate, rather than
  a second copy of the same decision.

Outlier-validated per CLAUDE.md's methodical process, both in one file so a bad
abstraction fails immediately:
- A: `RosterViewState` — people, identity, room-scoped. The measured defect's cure.
- B: `BenchViewState` — numbers, no identity, per-row verdicts, node-scoped.

B needed ZERO adapter changes, which is the whole test. chat / kanban / wall /
serving / nav / foundry are now registrations, not builds.

5/5 tests green, each with a `// what this catches:`. One test's arithmetic was wrong
on the first run (budget 12 fit all three ~4-token member lines); the PACKING was
correct and the test was fixed to 8 — noted in the test itself, because "make the
failing assert pass" is how a real invariant gets quietly weakened.

NOT YET WIRED into prompt assembly — the seam exists and is proven; swapping the
three bespoke sources over is the next commit, so the swap can be reviewed as a
behavior change on its own.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(persona): name the substrate prerequisite IN the module, before someone swaps a source onto it

The obvious next move on `viewstate_rag` is to rebind `room_roster_source` at
supervisor.rs onto the new adapter. Reading the substrate first showed that would
be a REGRESSION, so the module now says so at the top where a future reader will
actually be standing.

The `Substrate` cache is keyed by KIND ALONE — positron's own `revisions.rs` names
the `(room_id, kind)` tuple as a future extension. So the node substrate holds ONE
room's roster: the focused room's. Swapping today means this adapter's room gate
correctly abstains for every persona whose turn is in a different room, and personas
are first-class MULTI-room subscribers. Most citizens would go BLIND rather than
mis-sighted — trading "sometimes wrong" for "reliably empty" is not a repair.

Filed the prerequisite as #408 (per-room substrate key) with the acceptance test:
two personas in DIFFERENT rooms each receive THEIR room's roster in one tick.

This is the note I would have wanted before shipping the swap, not after.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(positron): per-ROOM substrates — the keystone that lets a citizen read HER room (#408)

The node's cache is keyed by KIND ALONE. `scoping.rs` said it in its own words —
"Everything else is per-room and stays on the node substrate" — which is the bug in
one sentence: those kinds are TREATED as per-room but share ONE store, so the node
holds whichever room wrote last (the FOCUSED room) and every other room reads empty.

That is what blocks the citizen side of positron. `persona/viewstate_rag.rs` makes
any ViewState a RagSource so a citizen and a browser read ONE definition — but a
persona is a first-class MULTI-room subscriber, so under one shared slot most
citizens would get an EMPTY roster rather than a wrong one. "Reliably blind" is
worse than "sometimes wrong", which is why that swap was NOT made first.

The fix is not new machinery — it is the SECOND INSTANCE of a pattern already here:
`PER_USER_KINDS` + `PerUserSubstrates` already solve "N scopes share a kind
namespace" for citizens (nav). This adds the room axis in the same shape:

- `PER_ROOM_KINDS = [chat, roster, kanban, wall]` — open by data, like PER_USER_KINDS
- `PerRoomSubstrates::for_room(room)` — one substrate per room, created on first use
- `CompositeCache` routes THREE scopes: per-user → citizen store, per-room → room
  store, everything else (bench, serving, system-metrics) → the node store, because
  those describe the NODE and have no scope to route to.

ADDITIVE ON PURPOSE. `CompositeCache::new` is preserved verbatim and still resolves
room kinds from the node store, so every existing caller keeps today's behavior;
scoping is opt-in via `CompositeCache::scoped`. A migration that silently re-pointed
every reader would make "did this change anything?" unanswerable.

8/8 green. The acceptance test is the one that matters:
`two_rooms_each_keep_their_own_state_in_the_same_tick` — two rooms, each reads ITS
OWN state, neither overwritten. Plus: writer and reader of one room share ONE store
(no second fold to go stale — the #346 class), the unscoped constructor is unchanged,
and the three-way route neither merges nor leaks across scopes.

No positron-core change, no wire change, no tag bump — entirely in-tree. My first
estimate of this task understated it and my second overstated it as a cross-language
contract change; reading `scoping.rs` settled it as an in-tree application of an
existing pattern.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(positron): the chat projection writes per-ROOM as well as node — one fold, two sinks (#408)

Per-room substrates existed as of the previous commit and were EMPTY: nothing wrote
to them, so they were a correct mechanism with no data — the same write-with-no-reader
shape as the recipe binding, inverted.

`ChatProjection::store` now mirrors every per-room envelope (chat, roster, the
Experience manifest) into that room's own store via ONE helper, `store_room_scoped`.
One place decides the dual-sink rule, so a future kind cannot be added to one sink and
forgotten in the other.

ONE FOLD, TWO SINKS — not two folds. The projection computes the view once and the
SAME `StateEnvelope` (same revision) lands in both stores. A second FOLD is what goes
stale (#346, where a citizen trusted an empty board while the announcement was fresh);
a second SINK of one fold cannot drift from itself.

Web behavior is untouched: the node substrate still receives everything exactly as
before, so the focused-room session reads what it always read. The per-room stores are
additive and, until a consumer names its room, unread. `rooms: None` in tests and
headless keeps today's path.

19/19 green. The new test is the crux: two rooms speak, B last; the NODE ends on B
(unchanged focused-room behavior) while room A's OWN store still holds A's view with
A's message. That is precisely the state the single-slot cache used to destroy, and
it is what `ViewStateRagSource` needs in order to hand a citizen HER room.

Still not wired to a consumer — ipc/mod.rs must construct the registry and pass it in,
then the roster source can flip. Kept separate so the wiring is reviewable as its own
behavior change.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(persona): a citizen reads WHO IS PRESENT from the same projection the browser renders (#408)

The last two wires. The roster a persona grounds on is no longer a second reader of
airc — it is `ViewStateRagSource<RosterViewState>` over HER room's own store, which
is the SAME `RosterViewState` the web roster renders.

- `ipc::global_room_substrates()` — the process-global `PerRoomSubstrates`, same
  `OnceLock` shape as `global_nav_focus`. The WRITER (the chat projection, in the WS
  boot block) and the READER (a persona's grounding, bound at spawn in supervisor)
  are constructed in different places and MUST land on one registry; two registries
  would be two stores, which is the exact defect being removed.
- `positron_source::spawn` takes the registry and threads it to the projection.
- `supervisor` binds the ViewState-backed roster instead of `RoomRosterSource`.

This is the repair for the measured defect: a live peer's name appeared ZERO times in
a citizen's prompt while the browser rendered that peer fine, because the two read
different code. Now there is one definition and two render targets — eyes and mind
cannot drift, because there is nothing to drift from.

`room_roster_source` is left in the tree untouched (still used by the presence
emitter and the experience resolver); it is simply no longer the persona's roster.
No dead-code scaffolding was added to "preserve a rollback" — `git revert` is the
rollback, and a dead fn kept for comfort is clutter.

24/24 green across positron_source + viewstate_rag. NOT yet live-verified — the
acceptance test is a real turn's prompt capture containing a peer's name, which is
the next step and the only evidence that counts here ([[never-blind]]: a fix I cannot
prove reached the running binary is a fix I have not made).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cli): restore the deploy path — reboot builds again, and the socket reaches the server

Two defects, both introduced by 7e0c5469a ("`continuum start` execs the installed
server"), both in the ONE function `start` and `reboot` share. The change was right
for `start` and wrong for `reboot`, and `launch_core` had no way to tell them apart.

1. THE SOCKET WAS NEVER PASSED. The direct-exec path handed the socket to the server
   over CONTINUUM_CORE_SOCKET and omitted the positional argument. `main.rs` requires
   argv[1] and exits 1 with its usage text without it — so on any machine with an
   installed binary, every `start` and every `reboot` died ~2s in, having written

     Usage: continuum-core-server [--mode=<MODE>] <socket-path>

   into the start log and nothing else. Measured here tonight: the reboot killed the
   old core's claim on the swap, the new one never came up, and only the surviving old
   process kept the system answering.

2. REBOOT STOPPED BUILDING. `reboot` is THE deploy path ("edit → reboot → exercise").
   Preferring the installed artifact made it structurally unable to ship an edit: it
   printed "building fresh binary, then swapping" and exec'd a binary from Jul 13.
   Every fix made since would have been invisible to the running core, and the only
   thing standing between that and a false success line was #194's provenance check.

The fix makes the source policy an explicit argument instead of an ambient default,
because the two callers want opposite things: `start` wants a core RUNNING (installed
artifact is correct, and the no-source-tree user 7e0c5469a was written for keeps
working), `reboot` wants the core built FROM THIS CHECKOUT. `plan_launch` resolves
(policy, env override, script?, artifact?) as a pure function — 7 tests, one per branch,
each naming the failure it prevents. A reboot on an installed node with no checkout
still restarts the artifact, but through a distinct variant that forces the CLI to SAY
nothing was rebuilt rather than let a restart pass as a deploy.

Server side: `continuum-core-server` was the one component in the tree hand-rolling its
own socket resolution (argv or die) while `continuum`, `continuum-mcp` and every library
caller go through `endpoint_paths::core_socket_path()`. argv[1] still wins; absent it,
the server now agrees with everyone else instead of exiting. That disagreement is what
let defect 1 exist at all — the launcher communicated over a channel the listener had
never been told to read.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(deploy): publish the verified core binary to the installed path every deploy

`continuum start` execs the INSTALLED continuum-core-server (building is reserved for
`reboot`), and the resolver checks ~/.continuum/bin BEFORE any cargo target dir. But
that copy was written once by install.sh and never refreshed by a deploy — so on a
machine that has been deploying for a month, `continuum start` silently boots a
month-old core while the freshly-built one sits unused in the cache.

Measured on the M5 tonight: installed artifact dated Jul 13, running build 4705, HEAD
4712. And it was not theoretical — a stray auto-start off that stale copy during a
reboot is exactly what tripped the #194 deploy-provenance mismatch and cost an hour of
misreading a deploy that had actually built fine.

This script already publishes the CLI into ~/.local/bin on every deploy, with a comment
arguing precisely this ("refreshes each deploy so PATH always points at the current
build"). The core-server was simply omitted from that reasoning. Now it isn't.

Placed AFTER the #194 freshness guard and before exec, so the installed artifact is only
ever replaced by a binary just proven to match source — never a stale or half-built one.
Atomic temp+mv so a concurrent `continuum start` cannot exec a half-written file.
Non-fatal, and it says out loud when it cannot publish, because the consequence the
operator needs to hear is "`continuum start` may boot an OLDER core than this one".

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(persona): one contract, one spelling — a ViewState states its floor the way every other RagSource does

CI red on PR #2282, my defect. `cargo test -p continuum-core --lib` failed one test out
of 7,042:

    cognition::context_budget::tests::no_new_hardcoded_context_or_prompt_size_constant_anywhere_in_the_crate

The guard (context_budget.rs:356-365) matches any `const` whose name contains
WINDOW|CONTEXT|CTX|TOKEN|PROMPT|CHARS, of an integer type, assigned a bare decimal
literal. `const FLOOR_TOKENS: u32 = 10` (roster) and `= 18` (bench) matched on TOKEN.

The number was never the problem — it is a per-UNIT content floor ("one roster line
costs ~10 tokens"), not a context bound, and it does not scale with the served window.
The problem is that I expressed it in a SHAPE nobody else uses. Every other source
states the same fact as a function:

    room_board_source.rs:293    fn floor_tokens(&self) -> u32 { 32 }
    room_roster_source.rs:286   fn floor_tokens(&self) -> u32 { 0 }
    room_doctrine_source.rs:151 fn floor_tokens(&self) -> u32 { 0 }
    rag_budget.rs:475           fn floor_tokens(&self) -> u32;      // the contract

So `RagRenderable` grew a SECOND spelling of one contract — an associated const beside
the trait method it feeds. That is the duplication the compression principle forbids,
and it landed in the very file meant to be the template every future ViewState source
gets copied from. The guard fired on the new shape, which is exactly its job.

Fix: `const FLOOR_TOKENS: u32` becomes `fn floor_tokens() -> u32`, matching the
established idiom. One contract, one spelling; the guard passes as a CONSEQUENCE of
saying it the normal way rather than as the goal.

Deliberately NOT done: no `// context-budget-exempt:` line (the escape hatch exists, but
an exemption would preserve the second spelling — the actual defect), and no weakening
of the guard.

Guard test: 1 passed. viewstate_rag tests: 5 passed. Clean `cargo check --lib`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* glass-box(persona): say WHAT the rejected event was, not just which branch refused it (#410)

Measured today: every `airc msg` a human sends reaches EVERY citizen's subscribe stream
(12/12 raw_events, sender 7711fe60) and is dropped as `no_continuum_body_hint`. Cause is
in `realtime_wire::envelope_from_event` (:58-68) — it returns Ok(None) unless
HEADER_FORGE_BODY_HINT == CONTINUUM_BODY_HINT, a stamp only continuum's OWN clients
apply. The message is refused before its content is ever read, so a human talking to the
room over the CLI is structurally unheard while the browser renders it fine
(`airc.chat.projected` fires every time).

The fix is one more arm in `room_turn_from_event`. It needs the CLI's actual body shape,
and the probe could not supply it: `reason` names the BRANCH that refused the event,
never the SHAPE that was refused. Attempts to recover the shape out-of-band failed —
`airc events list --kind message` returns 0 in BOTH the project and machine-account
scopes while returning 60 system-kind events, so the persisted view disagrees with what
delivery demonstrably did.

So instrument rather than guess. A decoder arm written against a GUESSED body is exactly
how presence and control frames become fabricated perception — the hazard the existing
named-skip contract exists to prevent. Next session reads one real body and writes the
arm against a fact.

Adds `event_kind` (the TranscriptKind, which IS the receive-side discriminator — note
FrameKind lives on Frame and does NOT survive to TranscriptEvent) and a 160-char
`body_preview` to the ALREADY-firing filtered_non_turn line. No new probe class, no new
event, and the stream-chunk skip above stays deliberately unprobed — this cannot
reintroduce the flood that skip removes.

Behaviour unchanged: diagnostics only.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(inference): a context overflow is a TYPE, not a prose string — and stop deep-cloning every wire body

Two defects, one cause: information that was already structured got flattened
into a String (or copied wholesale) at a boundary, and every consumer downstream
had to guess or pay for it.

1. INFERENCE ERRORS WERE STRINGS. `ai/openai_adapter.rs` returns
   `Err(format!("... returned 400 ..."))`; there was no typed inference error
   anywhere in the core (grep: 0 hits for `enum InferenceError|AdapterError|
   GenerateError`). So `cognition::act_observe::settle` could not distinguish a
   transient backend wedge from a deterministic context overflow, and retried
   BOTH blind. Blind retry is right for the wedge (#386 measured ~2/3 recovery)
   and catastrophic for the overflow: same prompt, same slot, same 400, forever.

   Measured live 2026-08-13 on the Devstral lane — four overflows, each
   overshooting by a small margin, each retried to exhaustion, each burning a
   whole turn:
       request (15697 tokens) exceeds the available context size (15104 tokens)
       request (16751 tokens) exceeds the available context size (16384 tokens)

   llama-server hands us the machine-readable tag AND both numbers. We
   format!-ed them into prose and threw the structure away.

   `ai/inference_error.rs` parses that body ONCE, at the seam, into
   `ContextExceeded { requested, available }` / `Unavailable` / `Transient` /
   `Protocol`, and exposes the predicate the settle loop could not express:
   `is_retryable_unchanged()`. No consumer of this type ever matches on prose;
   if you want to, the missing thing is a variant.

   Cost: the JSON parse is gated on 400 — the only status that can BE an
   overflow — so every other failure classifies without touching the body, and
   nothing runs on the success path.

2. EVERY CONTINUUM WIRE BODY WAS DEEP-CLONED TO READ IT.
   `airc/realtime_wire.rs` did `serde_json::from_value(value.clone())` —
   `from_value` consumes by value, so the clone was reflexive. That is a full
   copy of the payload per event PER PERSONA, since every citizen's subscribe
   stream sees every event. `&Value` is itself a Deserializer, so the envelope
   is now read in place.

   This is the same O(personas x payload) waste the stream-chunk header guard
   directly above already exists to avoid (documented there: 2644 of 4776
   filtered events were chunks, decoded-then-discarded by each of four
   personas). The header decides; the body is never copied to find out.

NOT fixed here, deliberately: `SettleStep::InferenceFailed` still carries a
String, so settle.rs:337 still retries overflows blind. Threading the type
through `workspace.rs` changes the adapter trait signature
(`Result<_, String>` -> `Result<_, InferenceError>`, 15 sites in adapter.rs
alone) and is its own commit. This one lands the keystone + tests so that
threading is a mechanical change against a proven type.

Verified: cargo check clean (no new warnings); 7 new tests green, each with a
`// what this catches:` naming the live defect or the over-eager-classification
hazard it guards.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* perf(wire): borrow-decode the two hottest payloads — stop deep-cloning the whole prompt per generation

Same shape as 62547d09e, two more sites, found by auditing `from_value(x.clone())`
on per-event and per-turn paths. `serde_json::from_value` consumes by value, so
every one of these clones exists ONLY to satisfy that signature — `&Value` is
itself a Deserializer and decodes in place.

- `runtime/airc_interceptor.rs`: for `ai/generate` the command params ARE the
  TextGenerationRequest, i.e. the whole prompt. `params` is already `&Value`
  (line 114). We were deep-copying the largest payload in the system on EVERY
  generation, purely to hand it to `from_value`.

- `airc/inbound_attach.rs`: `payload.inline.clone()?` copied the whole inline
  capacity payload per inbound event. `.as_ref()?` borrows instead.

Two more of the identical shape remain, deliberately not touched here so this
stays one reviewable idea: `persona/viewstate_rag.rs:179` (per RAG render) and
`persona/service_loop.rs:1783` (per turn). Also worth a follow-up:
`runtime/command_envelope.rs:47` shows `from_value(params.clone())` in a DOC
COMMENT — the pattern is being taught, which is how it spread.

Verified: cargo check clean, no new warnings.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* glass-box(inference): classify the backend rejection at the seam and probe it — say WHICH failure this was

Follow-on to 62547d09e. `ai/inference_error.rs` existed but nothing on the live
path called it. Now the one site that still holds both the HTTP status and the
raw body (openai_adapter.rs, the non-success arm of the streaming chat request)
runs `InferenceError::from_http` and emits the classification as a probe:

    ai.request.rejected  provider status retryable_unchanged
                         requested_tokens available_tokens

SCOPE, stated honestly: this is INSTRUMENTATION, not the retry fix. The trait's
error type is still `String`, so `cognition::act_observe::settle` still cannot
match on the variant and still retries every fault blind. What changes is that
an operator reading the receipt can finally tell a transient wedge from a
deterministic context overflow — and for an overflow, sees BOTH token counts
instead of prose. Until the type reaches settle, this probe is the only place
that distinction is visible anywhere in the system.

Why that is worth landing alone: the #400 mechanism was misdiagnosed for days
(Metal wedge -> window-number bug -> estimator undercount, all disproven) purely
because every failure class looked identical downstream. The next 400 labels
itself.

`retryable_unchanged=false` on a receipt is the standing evidence that the
blind retry is burning a turn — it is the exact predicate the threading commit
will act on.

Verified: cargo check clean, no new warnings.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(inference): prefill is PROGRESS and queue wait is not SILENCE — stop killing healthy turns at 90s (#400/#385)

MEASURED on the live lane, and it reframes #400 entirely: the backend was never
wedged. WE were cancelling it.

llama-server's own log, task 775:
  n_tokens= 2048 progress=0.12 290 tok/s
  n_tokens= 6144 progress=0.36
  n_tokens=12288 progress=0.73 145 tok/s   <- healthy, still climbing
  W srv stop: cancel task, id_task = 775   <- ~90s in, OUR cancel

Task 776 identical. Each cancel also evicts the slot's prompt cache
("removing oldest entry (size = 2240.790 MiB)"), so the retry re-prefills from
zero and can never do better — which is where #266's 96.3%-prefill /
5.5%-cache-hit shape comes from.

TWO different silences were being policed by ONE 90s budget:

1. PREFILL. `return_progress` defaults false and we never set it, so the server
   says NOTHING between accepting the request and the first token. Measured: a
   ~20k-token prompt produced ZERO bytes for 286 SECONDS. A citizen at 89.5%
   window occupancy (delib.turn.demand: demand=25671 of context_window=28672)
   was structurally incapable of ever emitting a token.
   Fix: request `return_progress` (gated on the existing typed
   llamacpp_sampling_extensions capability, beside cache_prompt), parse the
   frame, and count a RISING `processed` as progress. Strictly `>`, so a frozen
   counter — the actual #385 wedge signature — still fails in 90s. The detector
   keeps its teeth; it just stops failing healthy work.

2. QUEUE WAIT. Measured positive control: a TINY 2,237-token prompt got its
   first byte of any kind at t=115.2s, then prefilled and answered within 7s.
   The slot was busy with a co-tenant for 115s. total_slots=1 with four
   citizens, so this expires the 90s budget routinely on a perfectly healthy
   lane — and it is contention, not death.
   Fix: before the slot starts our work the bound is PRE_STREAM_HEADER_TIMEOUT
   (300s), which already carries exactly this justification in its own doc
  …
joelteply added a commit that referenced this pull request Aug 14, 2026
…+ bounded SDK boot + shell convergence doc (#2294)

* feat(benchmark): a run gets its OWN room — dispatch spawns it and moves the citizens in (#329)

`benchmark/dispatch` had no way to say WHERE. So every suite, every run, forever,
piled into whichever room the curator happened to be standing in. Measured on one
37-minute window of that pile: 136 cards with 66 already CLOSED and still resident;
5,336 of 5,345 inbound events discarded as bookkeeping, NINE surviving as something
a mind could read (~14/hour); ~48 wake-ups per minute per citizen. Claim heartbeats
scale as O(claims x citizens), so the more work a citizen held, the less capacity it
had to do any of it — and the board only grew.

Joel named it: "are you just sticking them in the same identical room every time and
it's accumulating" — yes. And then: "use this thing normally like it's made."

It IS already made. `activity/spawn` births a room from a recipe, and `benchmark` is
one of its recipes. Dispatch simply never called it. So:

- `room: Option<String>` on dispatch. Omit for a FRESH room per run,
  `bench-<benchmark>-<epoch>`; pass a name to join an existing run.
- Spawned through `activity/spawn`'s own path, extracted as
  `activity::spawn_activity_room(airc, name, recipe, parent)` so there is ONE room-birth
  path with two callers rather than a second creator that drifts. A hand-made room
  carries no recipe binding and projects as a plain chat; this one projects as a benchmark.
- Every assignee is JOINED to the run — the members[] half of #274. A citizen who is not
  subscribed never sees the board, the kickoff, or the peers working beside her. Joel:
  "they're sitting in these old rooms flooded or ones with nothing."
- The board read, every create_work_card and every kickoff `say` are current-room
  operations, and `join` moves that pointer — so they all land in the run room with NO new
  airc API. The pointer move is a documented gap for other callers and the mechanism here.
- Idempotence + prune now reason about THIS run's board, so a run finally has its own
  honest denominator instead of a shared pile 136 deep.
- `repo` stays optional: when unnamed, the hint is read from the room the caller is
  standing in BEFORE the move. That is the only thing the old room still contributes.
- Result carries `room` + `room_id`; failed joins ride the same reported channel as failed
  kickoffs — a citizen who never made it in is as invisible as a kickoff that never landed,
  and neither may be silent.

NOT the flattening I wanted: the design of record is `academy/bench/<run>`, but airc's
ChannelName accepts only [a-z0-9_-] so `/` is rejected. Flattened to `-` and the test
asserts through airc's own constructor, so the two can never drift.

What I nearly shipped instead, and why it was wrong: a header-keyed door-skip for
heartbeat traffic. Real, still worth landing, but a MUFFLER — it makes the accumulation
quieter, not smaller. Order matters: (a) a run gets its own room [this], (b) a room has an
END, (c) THEN the door-skip so what remains is quiet.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(ids): a room id is a RoomId, not a String (#396)

Joel, on the previous commit: "Use handles uuids etc."

I had just introduced `room_id: String` on BenchmarkDispatchResult — a brand-new
loose-String id param, which is exactly the class #396 exists to kill, and I added it
while writing a room feature. `ActivitySpawnResult.room_id` was already a String and
was where mine came from, so both are typed now.

`airc_core::RoomId` is a `uuid_newtype!` with `#[serde(transparent)]`, so the WIRE is
unchanged — the bare hyphenated uuid either way. What changes is that Rust can no
longer confuse a room id with a peer id, a card id, or free text
([[uuids-are-not-strings-and-never-hand-drawn]]).

`#[ts(type = "string")]` follows the convention the tree already documents at
identity/mod.rs:83 — airc's id newtypes carry no `TS` derive by design — so the
generated TypeScript is byte-identical and no client changes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(ids): the activity graph's POINTERS are RoomIds, not strings (#396)

Joel: "Usually you try to force a string for no reason instead of a lookup or one
returned via handle. It's a desire to turn everything into shitty scripting languages."

He is describing a real habit and this file is the evidence. `RoomRecipeBinding.parent`
carried this doc, verbatim, directly above a `String`:

    /// Optional parent activity — activities spawn activities, and the graph is
    /// POINTERS, never nested blobs.
    pub parent: Option<String>,

A pointer typed as text is not a pointer. Nothing rejected `"the benchmark one"`. Both
ends are now `Option<RoomId>` — the binding and `ActivitySpawnParams`.

The proof it was always an id: the round-trip test's own fixture value was
`"f1a1b2c3-0000-4000-8000-000000000000"`. The value never changed. The type caught up
to it — which is the whole point of the correction: Rust wasn't in the way, it was
waiting.

Also `binding_post_id: String` → `uuid::Uuid`. Not a newtype, because airc's
`publish_wall_post` returns a bare `Uuid` and there is no `WallPostId` upstream to
borrow — carrying the value instead of stringifying it keeps it in the type system on
this side, and the missing newtype is named in the doc as an airc gap rather than
laundered into text.

Wire is unchanged throughout: `RoomId` is `#[serde(transparent)]`, `#[ts(type =
"string")]` per identity/mod.rs:83, and `#[schemars(with = "Option<String>")]` describes
the WIRE to the tool schema while Rust keeps the type — so a caller sends text, the
command receives a parsed id, and an unparseable one is rejected at the boundary
instead of flowing inward as a plausible-looking String.

1205 tests pass.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(benchmark): derive the repo key from the checkout's origin, not from a pile of cards (#329)

Regression I introduced one commit ago, found by running the thing twice.

Per-run rooms removed the repo inference's source BY CONSTRUCTION: dispatch inferred
`repo` from cards already on the board, which worked only while every run shared one
permanent pile. Now the FIRST dispatch leaves the curator standing in a fresh empty
bench room, so the SECOND one had nothing to infer from and died asking for `--repo`.
Measured live: `benchmark/dispatch --name=hard-rs` succeeded, the identical command
immediately after refused.

The fix is not a better fallback chain. The repo key is a FACT ABOUT THIS CHECKOUT —
`git remote get-url origin` — so it is derived from the real thing rather than retyped
by a caller. That also generalizes to any repo user on a fresh clone, the same reason
`resolve_dispatch_roster` refuses to bake in our citizen names.

Resolution order, most-explicit-first: caller's `repo` → the room they came from (the
legacy path, unchanged, so a re-dispatch never splits a live board) → `origin`. The new
step only fills the case that previously ERRORED; no existing behaviour moves.

`repo_slug_from_remote_url` is a pure parser so the part that actually breaks is
tested: scp-style `git@host:owner/name` has no scheme and uses `:` where the others use
`/`, which naive `split('/')` gets wrong. Host-agnostic (a GitLab remote is as valid a
key as GitHub) and takes the LAST two segments so subgroups still yield `group/name`.
Junk returns None so the caller is ASKED, never handed a fabricated key.

Honest about the one dependency: it reads process cwd, because git walks UP to find
`.git` so any directory inside the checkout answers. The core is launched from the repo
by start-server.sh and cognition/eval + gym resolve roots the same way. That is a real
cwd dependency of the #195 class, named in the comment rather than papered over — and
if the core is ever launched elsewhere it returns None and asks for `repo`, which is a
loud fallback, not a wrong board key.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* chore(protocol): regenerate ts-rs bindings for the per-run bench room (#329 a)

The Rust side landed in ca6a815 / ff27025 / 0d49407; the generated
TypeScript never got re-exported alongside it, so the checked-in bindings
were missing `room` / `room_id` on dispatch and still typed
`RoomRecipeBinding.parent` as a bare string. The ts-rs-binding-drift-guard
workflow exists to catch precisely this, and would have gone red on the
next run.

No behaviour change — `cargo test` regenerates these; this commit is the
regeneration.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cognition): the own-speech ring is per-ROOM — a fresh room is a fresh start

Glass-boxed live today, from her own capture. A citizen was dispatched into
a brand-new benchmark room by `benchmark/dispatch` (#329 a). On her FIRST
turn there — having said nothing whatsoever in that room — her prompt
carried:

  [repetition] 4 of your recent messages were nearly identical — you're
  circling, and restating what you've already said adds nothing. If you have
  nothing genuinely new to contribute right now, silence (PASS) is the
  honest response.

Those four utterances were spoken in #academy. `own_speech_rings` was keyed
by `PeerId` alone, so a MULTI-room citizen carried one room's withdrawal
pressure into every other room she entered.

The asymmetry made it obvious once found: `room_speech_rings`, the
room-side sibling ten lines below, has always keyed by room uuid. And the
say path was already room-correct — `say_in(turn_room, …)`, whose own
comment reads "never her ambient default, or she answers one room's
question to a different audience". Only the ring was blind.

Fix: key by `(PeerId, room)`. Every write site already knew which room it
spoke into (turn_room at the directed-say seam, default_room at the
self-tick seam, the message's own room at the hydration seam); every read
site already had the room in hand — llm_deliberation_faculty passed
`ws.room_id` to `recent_room_speech` on the very next line.

Persistence follows: `PersistedVolatile.own_speech` becomes room-keyed, with
an untagged `Legacy(Vec<String>)` arm so a pre-existing `volatile.json` still
PARSES. A torn mind-file is a silent blank wake, which is strictly worse than
a dropped scratchpad — and the legacy lines carry no room, so they are
dropped (with a probe) rather than mis-filed into a room she may never have
spoken in. `hydrate_speech_rings` re-seeds from the durable transcript, where
every message HAS a room (#265).

This does NOT weaken the brick: within a room it fires exactly as before
(own_speech_loop_renders_a_repetition_fact still green), and her history in
the room she actually spoke in is untouched — so it cannot be mistaken for
"clear the ring on room change".

NOT CLAIMED AS PROVEN: on that same run the citizen went
work/list(claimable) -> work/claim(3d1d9dbb) -> yield_turn{} and fell silent
for 10 minutes, with this brick in her context throughout recommending
exactly that silence. Mechanically coherent, and a plausible contributor to
the #390 / #264 withdrawal family — but one specimen is not a cause. The fix
stands on its own merits (the fact was simply FALSE about that room); it is
now also the test.

Regression test in the existing tests mod, asserting both directions: the
room she spoke in keeps her history, the room she has not spoken in reads
silent, and persistence carries the room key.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cognition): the steps ledger stops promising a recall path that does not exist

The all-aged branch told her "the details have aged out of working memory;
recall can retrieve them." That is FALSE by construction, and the chain is
all in-tree: every act becomes an `EngramOrigin::Tool` engram
(act_observe/apply.rs); `recall_candidates` carries an EXECUTING ASSERTION
that a Tool-origin receipt is NEVER in the semantic recall pool
(admission_state.rs); and recall_faculty.rs is the only production caller
of that gate, so the persona's own recall runs through it.

So the one fact whose entire job is ground truth was sending her after a
door that isn't there — a lying receipt of the #151/#357 class, in the
worst possible place. It says what happened plainly now: you did that work,
the details are gone and cannot be retrieved, re-check the workspace or the
board rather than trusting memory of them. An honest gap she can plan
around beats a promise that wastes a turn.

Scope, deliberately narrow: only the ALL-AGED branch is touched. The
some-visible branch already made no promise and was the honest one — a
previous note of mine had the fix direction backwards and would have
propagated the lie into it (#414).

Test extended with the negative assertion, so the promise cannot come back
by edit.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(identity): un-red the loose-id guard + give it eyes for parameters

RED TEST FIXED. `no_declaration_outlives_its_defect` has been failing since
0d49407 earlier today — that commit typed `modules/activity.rs: room_id` as a
RoomId and left its LOOSE_IDS exemption behind, so the guard's own anti-rot check
was correctly reporting a declaration that outlived its defect. `cargo test
-p continuum-core --lib` was red. Stale entry deleted.

PARAMETERS WERE INVISIBLE. `loose_id_fields` matches `line.strip_prefix("<name>:")`
with the whole remainder equal to `String,` — a predicate that cannot match a
function signature by construction. So every `peer_id: &str` in the crate was
outside a guard that reported clean. `loose_id_params` closes that: borrowed forms
(`&str`/`&String`) are always parameters (a field would need a lifetime); owned
forms count only mid-line, because a whole-line `room_id: String,` is what the
field audit already claims. Non-overlapping on purpose — double-reporting one site
makes it unfixable, since clearing it for one audit leaves the other red.

POSITIVE CONTROL, and it is the point of this commit as much as the detector.
While building this, a throwaway scan of the same shape returned 0 twice while the
real count was 33. A guard whose predicate matches nothing does not go quiet — it
reports the codebase CLEAN, which is worse than no guard, because it converts an
open defect into a green claim that the work is done. So the predicate now has to
prove it fires: on a plain param, mid-signature, and NOT on `signer_peer_id` (a
`_`-joined suffix — `char::is_alphanumeric` misses this, `_` is not alphanumeric),
NOT on whole-line owned decls, NOT in comments, NOT inside string literals.

That last one is not hypothetical: the first compiled run reported 36 pairs, three
of which were this audit matching its OWN fixtures in identity/mod.rs. Hence
`blank_string_literals` — a detector that cannot tell code from a string about
code. `loose_id_fields` needs no equivalent; it demands the whole trimmed line be
`name: String,`, which a quoted literal never is.

Measured: 33 (file, param) pairs. No LOOSE_ID_PARAMS table yet, so nothing is
enforced on params — the #[ignore]d dump test is the tool for writing it, and gets
deleted in the commit that lands the table.

NOTE for whoever writes that table: do NOT categorize the ~11 `live/*` entries as
`external`. I nearly did, on the basis that the folder is called live/. Joel: "it
uses the same room ids from airc" — and modules/live.rs says so itself at :51
("the server is now AUTHORITATIVE that a call IS its airc room"), :214 ("the airc
room_id is THE canonical call/session key"), :239 (`let call_id = room_id;`). The
value is an airc RoomId stringified by `p.str("room_id")?` and never parsed back.
They are `defect`, blocked on #193's client cutover — not another system's wire.

Guard suite: 4 passed, 0 failed, 1 ignored. cargo fmt clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(perception): personas are READERS — advance their per-room cursor, and land a fresh reader one page back

Two halves of one bug, and both are why a room storms.

`ChannelBookmarks` is a per-(persona, room) last-read cursor — a correct Slack-style
unread marker with a monotonic `advance`, written months ago. Its ONLY production
callers were both in `modules/nav.rs`, and both key on `ctx.user_id`: the authenticated
HUMAN, driven by `nav/mark-read` and by navigating away from a room.

A persona never navigates. So her `last_read` stayed at 0 forever — and `last_read`'s
own doc spells out what 0 means: "never read (everything is unread)". Every turn
re-delivered the ENTIRE paged history as UNREAD, each item at attention score 1.0
(airc_source.rs), with an EMPTY grounding split because `unread_start` lands at 0 when
`first_unread` does. The digest's whole read/unread structure was built, and then never
used for a persona.

That is the fuel supply for the mutual-excitation storm on #264 (25 turns in 85s, two
citizens each waking on the other): with nothing ever marked read, no message is ever
consumed, so nothing is ever old and there is never a moment where the room is quiet.

HALF 1 — the returning reader (persona/airc_source.rs). `deliver` now advances the
cursor after packing. `pack_digest` returns the READ-THROUGH lamport — the newest
element that actually entered her prompt — so she is marked read for what she was
GIVEN, never for what the budget fetched and dropped. Mark-read on DELIVERY, not on
reply, because delivery is when she saw it; `tip_lamport`'s own doc already said
"ignore/skip/respond all mark-read". `advance` is monotonic, so a repeat delivery or a
late lower lamport can never rewind her.

HALF 2 — the FRESH reader (cognition/channel_digest.rs). Advancing alone does not help
someone who has never read the room: bookmark 0 still means "all of it is unread". A
first sight now lands one page back from the tip (`FIRST_READ_PAGE`), which is how every
chat client has worked for thirty years — you join, you see the last page, you scroll
for more. The seed is persisted via `advance` ("you joined here" is a real fact about
this reader), and it applies to EVERY reader: a fresh human opening a busy room and a
fresh persona waking into one are the same case.

Not a filter and not a damper — no behaviour is gated, nothing is refused. The room is
simply read the way a reader reads it.

TESTS (existing mods extended, no new mod):
- a_fresh_reader_lands_one_page_back_not_on_the_whole_history — 3 pages retained, ONE
  page unread, seed persisted, and after the delivery-side advance the room goes quiet.
  Both halves are needed and the test exercises the composition.
- 15 channel_digest, 12 airc_source, 12 nav: all green, incl.
  caught_up_persona_sees_budget_worth_of_history_not_five_messages and the #367
  deliver_pages_the_turn_room_not_the_pointer.

Refs #264, #43, #367

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(cursor): DELETE ChannelBookmarks — the read cursor is airc's durable runtime_cursor, not a second store

Joel: "Airc has state for cursors in addition to other things built in duh" — and
"Delete your idiocy and use the right one or encapsulate it but only as a last resort
not laziness". Both correct. 140ad3b fixed the cursor never ADVANCING; this deletes
the parallel store it was advancing.

WHAT WAS WRONG: `cognition::channel_digest::ChannelBookmarks` was a
`DashMap<(persona, room), lamport>` — a SECOND cursor store beside the durable one airc
already owns. Being process memory it also died on every restart, so no reader ever
resumed. airc's own API doc states the intent verbatim: "for hooks/feeds/monitors that
need replay state; it is intentionally STORE-BACKED so runtime delivery state does not
sprawl into JSON sidecars." We sprawled it into a DashMap instead.

THE RIGHT ONE, used directly — not wrapped:
  Airc::load_runtime_cursor / save_runtime_cursor_for_event  (runtime_cursor: an ORM row
  keyed by consumer id, upserted). `_for_event` is airc's PREFERRED path because it
  carries the source event's room + kind and emits `SubscriptionAdvanced`, so a cursor
  move is visible to every other surface instead of private to one process.

WHERE IT LANDED: on `AircTranscriptReader` — the port continuum ALREADY has over airc's
transcript, whose real implementor IS `airc_lib::Airc`. Two methods (`read_cursor`,
`advance_read_cursor`), defaulted so the ~8 stub readers keep compiling. That is not
encapsulation-as-dodge: the cursor now lives where transcript access already lived, and
the only implementation delegates straight to airc.

CONSEQUENCES, each deliberate:
- `ChannelDigestBuilder` holds NO cursor state. `build` reads it from the reader;
  `build_from_events` takes `bookmark` as an explicit parameter. The split point is now
  visible at every call site instead of arriving from a process-wide map.
- `global_channel_bookmarks()` deleted from channel_substrate.
- The FIRST_READ_PAGE seed no longer self-persists — it is a WINDOWING decision only.
  The cursor moves exactly once, when `deliver` marks read what the reader was actually
  SHOWN. A hidden write inside a builder could mark a page read that the budget dropped.
- `pack_digest` returns the read-through ELEMENT, not a bare lamport, because airc wants
  the event.
- positron's nav projection reads the STAGED DIGEST's own `bookmark` — one value, two
  consumers (her window and the nav view), so they cannot disagree. It needed no cursor
  store at all.
- nav mark-read / room-switch write through the CALLER'S OWN airc scope.

⚠ #27 (self-peer) IS NOW VISIBLE, and left visible on purpose: a cursor can only be
written into a scope we can address, and today only CITIZENS have a registered airc
runtime. For the human operator there is nowhere correct to put it — writing into some
citizen's store would file the human's position under another being's identity. So nav
logs and reports 0 rather than fabricating a cursor, and the nav tests now PIN that
honesty. When #27 lands the same call returns the real lamport with no further change.

TESTS: 47 green across channel_digest, channel_digest_region, airc_source, nav,
positron_nav. Stub readers carry a cursor cell (`read_through`) so tests exercise the
real port; `advance_is_monotonic` now pins monotonicity THROUGH the port. Two region
tests were failing on my own dropped setup, not a production regression — fixed by
threading the reader's cursor, which is what the production path does.

Refs #43, #264, #27

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(serving): plan holds its ModelFootprint by value — kill the name-lookup that silently starved every lane (#368)

ServingPlan carried base_model_id: String and re-looked its own model up by
name; a miss made is_some_and silently false, suppressing every legitimate
switch-up. Live: Asha/Anwen homed to a phantom, 0 tokens, forever — and the
plan computed usable_gb=2 on a 64GB box, warming nobody (measured 2026-08-14,
zero persona.turn.start in the probe stream while WS answered in 1-3ms).

The plan now holds base_model: ModelFootprint (struct by value, per the
uuid/struct identity law); the upgrade check is a field read, not a search.
ts-rs exports ModelFootprint + camelCase ServingPlan to protocol/typescript.

1193 lib tests green (metal,accelerate). Deployed via verified reboot;
acceptance is the first persona.turn.start on the new build.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(sdk): bound the two unbounded boot awaits — a silent cache or silent socket now costs one retry, never a blank app

hydrateFromStorage awaited storage.load() guarded only by try/catch — which
covers a rejection, not a promise that never settles. A hung IndexedDB read
held connect() open forever: blank page, frozen banner (live 2026-08-14,
bisect-proven: storage removed → 274KB render; present → blank 6/7).
ensureConnected had the same hole one seam over: a WS ingress that accepts
TCP but never completes the upgrade fired neither open nor error (measured:
'last feed status: connecting', 1-in-5 boots).

HYDRATE_BUDGET_MS=1.5s and OPEN_BUDGET_MS=5s make StateStorage.ts's own
contract ('storage is an ACCELERANT, not a dependency') true rather than
aspirational; a timed-out handshake feeds the existing reconnect ladder.
New spec case is positive-controlled: red without the bound, green with it.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(web): arm the boot watchdog BEFORE awaiting connect, and make it name where a stuck boot is stuck

The 4s no-snapshot diagnostic was registered after 'await state.connect()' —
the one failure it existed to catch (a hung connect) made it unreachable, so
the banner froze on the pre-connect string with no diagnosis possible. Armed
first, it now reports last feed status (none=hydrate stuck, connecting=socket
stuck) — the instrument that located both SDK bounds.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(architecture): ACTIVITY-SHELL-CONVERGENCE — the measured defect map + R0-R5 repair plan for the positron shell

Eight measured defects with file:line receipts (single kind-keyed projection
cache wiped on focus, dead roster kind, whole-page error boundary, throwing
content registry, unkeyed lists, hardcoded right panel) and the repair lanes:
(room_id, kind) RoomViews, global kinds feed global widgets, three render
roots, right=ContextPanel per room, bench rooms under the academy section.
Owner rulings recorded: left rail invariant, right column tracks
content=tab=room=activity, all three SYS faces are graphs.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request Aug 15, 2026
… 21 sites

Second slice of the id-typing migration. All ten `commands/memory/*` params plus the
`MemoryManager` API they call now carry `PersonaRef` instead of `String`/`&str`:
append_memory, append_event, load_corpus, has_corpus, get_corpus, multi_layer_recall,
consciousness_context, persona_db_handle, hydrate_corpus_if_missing.

Types went DOWN into the layer rather than being unwrapped at each call — the whole
point of the previous slice. `.as_str()` now appears only where the value is genuinely
being USED as text (a map key, a `starts_with` shape check, a directory handle), never
to satisfy a signature one call later.

Two `Default` derives removed (`ConsciousnessContextParams`, `LoadCorpusParams`)
rather than giving `PersonaRef` a default. No caller used `::default()` on either, and
an empty persona reference is a nonsense value that reads as a real answer — same
reasoning as the eval result field held in the previous commit.

What this makes visible, and does not yet fix: these commands still never RESOLVE.
They accept a reference and hand it straight to the storage layer as a key, so a name
or short-id reaches the DB unresolved. That was invisible while everything was
`String`; it is now legible in the signatures. Wiring `resolve_persona` into the memory
command path is the next slice (#164/#396).

Tests: memory 219, rag 150 — all pass. Full lib test build clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 15, 2026
…rce path carries it down

Fourth slice. `CognitionTraceParams`, the four other introspect params,
`CognitionReplayParams` + result, `RagComposeRequest`, and `DatasetFromTurnsParams`
now carry `PersonaRef`.

The RAG one went two levels deep rather than stopping at the param: `load_source`,
`load_memory_source`, and `load_consciousness_source` all take `&PersonaRef` now, which
deleted the two `&persona_id.into()` conversions the memory slice had left at those
call sites. That is the shape to aim for — when the type reaches the bottom, the
adapters in the middle disappear rather than accumulating.

`persona_id: String` in continuum-core: 55 → 8. Every remaining one is an internal
RECORD (memory/types, should_respond's AIDecisionContext, live/types, projection,
shell_types, ai/types, sentinel) holding a value copied from a param.

Those are deliberately NOT converted to `PeerId` yet. They hold whatever the caller
sent, and nothing on those paths resolves — typing them as an identity today would
assert something the code does not do, which is worse than leaving them `String`.
They become `PeerId` in the same slice that wires `resolve_persona` into those paths,
not before (#164/#396).

Tests: replay 3, rag 18, full lib test build clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 15, 2026
…re k3-serving fixtures (#2280)

* refactor(memory): the memory layer takes PersonaRef, not loose text — 21 sites

Second slice of the id-typing migration. All ten `commands/memory/*` params plus the
`MemoryManager` API they call now carry `PersonaRef` instead of `String`/`&str`:
append_memory, append_event, load_corpus, has_corpus, get_corpus, multi_layer_recall,
consciousness_context, persona_db_handle, hydrate_corpus_if_missing.

Types went DOWN into the layer rather than being unwrapped at each call — the whole
point of the previous slice. `.as_str()` now appears only where the value is genuinely
being USED as text (a map key, a `starts_with` shape check, a directory handle), never
to satisfy a signature one call later.

Two `Default` derives removed (`ConsciousnessContextParams`, `LoadCorpusParams`)
rather than giving `PersonaRef` a default. No caller used `::default()` on either, and
an empty persona reference is a nonsense value that reads as a real answer — same
reasoning as the eval result field held in the previous commit.

What this makes visible, and does not yet fix: these commands still never RESOLVE.
They accept a reference and hand it straight to the storage layer as a key, so a name
or short-id reaches the DB unresolved. That was invisible while everything was
`String`; it is now legible in the signatures. Wiring `resolve_persona` into the memory
command path is the next slice (#164/#396).

Tests: memory 219, rag 150 — all pass. Full lib test build clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(rag/introspect): last persona PARAMS typed — and the RAG source path carries it down

Fourth slice. `CognitionTraceParams`, the four other introspect params,
`CognitionReplayParams` + result, `RagComposeRequest`, and `DatasetFromTurnsParams`
now carry `PersonaRef`.

The RAG one went two levels deep rather than stopping at the param: `load_source`,
`load_memory_source`, and `load_consciousness_source` all take `&PersonaRef` now, which
deleted the two `&persona_id.into()` conversions the memory slice had left at those
call sites. That is the shape to aim for — when the type reaches the bottom, the
adapters in the middle disappear rather than accumulating.

`persona_id: String` in continuum-core: 55 → 8. Every remaining one is an internal
RECORD (memory/types, should_respond's AIDecisionContext, live/types, projection,
shell_types, ai/types, sentinel) holding a value copied from a param.

Those are deliberately NOT converted to `PeerId` yet. They hold whatever the caller
sent, and nothing on those paths resolves — typing them as an identity today would
assert something the code does not do, which is worse than leaving them `String`.
They become `PeerId` in the same slice that wires `resolve_persona` into those paths,
not before (#164/#396).

Tests: replay 3, rag 18, full lib test build clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request Aug 19, 2026
…nd the dispatch takes a TYPED struct (#425)

MEASURED FIRST, because the doctrine doc's premise is wrong. Every workspace trace record
carries `room_id`; counting nil vs real across the 25 newest trace files:
**13,209 roomless turns vs 138,088 roomed (8.7%)**. Per citizen: 90e758b2 8,657 nil /
15,814 roomed — 35% of her cognition happened where no room could see it; a20b3ada 895 nil
/ 489 roomed, more roomless than roomed.

WHAT THE DOC OVERSTATES: "a detached agent/solve produces no turns, so none of it reaches
the curriculum." It DOES produce turns. `build_workspace_cycle` attaches a
`JsonlWorkspaceCaptureSink` for every cycle — live turn, eval fork and solve alike
(persona_workspace.rs:551-564); 1,258 trace files, 6.7 GB on disk. #427 is the
corroboration and I had already accepted it: its whole subject was benchmark forks writing
to the SAME traces file as live turns. You cannot contaminate a corpus you do not write to.

SO THE DEFECT IS NARROWER AND STILL SERIOUS: those turns are invisible to the ROOM. No act
receipts radiate (`apply_act` skips a nil room BY DESIGN), so no peer, no human and no
ViewState ever sees the work — a citizenship defect, not a curriculum-input one.

THE ROOM WAS NEVER UNKNOWN. Boards are PER-ROOM, so a card's activity is the room whose
board holds it — and the wrong-room claim retry directly above already resolved exactly
that, inline. Extracted as `room_holding_card`: ONE resolver, two consumers, replacing a
scan in one place and a shrug in the other. `work/claim` now resolves the card's room and
dispatches into it. A card no subscribed board holds gets NO detached fallback — the claim
stands and a `work.claim.unplaceable_card` probe says why, because inventing invisible work
is the thing being removed.

THE SIGNATURE, on Joel's two calls today.

"Make sure params are well formed structs and constants, good OOP, not random parameter
lists." The old one was `(ctx, airc, Uuid, WorkCardId, Option<Uuid>)` — two BARE UUIDs
separated only by argument POSITION, so transposing claimer and room compiled cleanly and
would have dispatched a citizen's solve under a room's id. Now `StagedSolveDispatch
{ claimer: PeerId, card: WorkCardId, room: RoomId }`: typed fields make the transposition a
compile error, and the next fact this dispatch needs is a FIELD, not a sixth argument.
`ctx` + `airc` stay separate parameters deliberately — ambient services, not facts about
the dispatch; folding them in turns a value object into a context bag.

"If something is required, remove the option… caught at compile time not runtime." `room`
was `Option<Uuid>` and `work/claim` passed `None` — the whole defect, expressed as a type
that permitted it. It is now `RoomId`, so the roomless dispatch is UNREPRESENTABLE: a
caller that cannot name the activity cannot construct the struct. The fallible part is the
LOOKUP, which is where fallibility belongs, and it is handled at the boundary before the
struct exists.

Adjacent smells named, not silently expanded: the dispatch roster still carries bare
`(String, Uuid)` tuples (#396's subject) so benchmark.rs types the id AT this boundary;
`AgentSolveParams::room` stays `Option` because `agent/solve` is also operator-invocable,
and narrowing that param is its own slice.

`cargo check -p continuum-core --features metal,accelerate` clean, zero errors.
LIVE PROOF OWED and NOT claimed: no dispatched claim has run on this build yet. The
falsifiable prediction is that a claim-fired solve's acts now radiate receipts into the
card's room, and that the nil-room share of new traces falls.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Aug 20, 2026
…#441) (#2339)

* fix(ids): UUIDs are not strings — mint real ones, and stop typing ids as text (#274/#396)

Joel, 2026-08-13: "Always use uuid and never corrupt them with random prefixes" and
"UUID's are NOT strings. If you're using strings for id you are writing slop."
Both landed on code written minutes earlier, and the grep that followed found the
same defect older and wider than my one file.

Three fixes, in order of how badly they were wrong:

1. The four shipped recipe ids were hand-drawn patterns (c0de0001-0000-4000-...),
   a name wearing a UUID's costume — readable, collidable, and fake. Replaced with
   genuine v4s in both the authored JSON and the `shipped::` constants, written
   grouped (0xfed332c3_383c_45bb_...) so the two are checkable by eye.

2. comms::{MessageId, CorrelationId} were `String` newtypes. `MessageId::new("msg-1")`
   let any caller invent a namespace that collides with every other caller's. Both
   are now `Uuid`: MessageId::new() MINTS (no caller-supplied form exists), and
   CorrelationId::of_exchange(id) states the derivation the old
   `CorrelationId(id.0.clone())` left implicit. Still distinct TYPES — the compiler,
   not a naming convention, is what stops one being passed as the other.

3. EndpointId is deleted. Its values were `EndpointId::new("browser")` and
   `("rust-core")` — a client-kind label standing in for an identity, and with it
   the assumption that the web client is a distinguished endpoint. It is one client
   among many (mobile, SDK, TUI, another node's core). TransportEnvelope.source and
   .target are now PeerId, the substrate's one actor identity per identity/mod.rs.
   Zero callers outside comms/mod.rs; the stale generated binding goes too.

Also closes the on-disk authoring hole the required `id` field opened: a recipe file
that names no id now gets one DERIVED from its purpose (RFC 4122 v5 under a frozen
namespace), so "author a file, zero code" keeps meaning zero code — no uuidgen — and
every node that loads the same file agrees on its identity with nothing to reconcile.
A recipe that DOES carry an id keeps it verbatim.

Tests: comms 23 pass (envelope wire shape now asserts ids round-trip as their own
UUIDs; minted_message_ids_are_unique pins the collision fix), experience 43 pass
including the previously-failing an_experience_authored_on_disk_needs_no_rust.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(CLAUDE.md): headless Rust core is the system — Node is ONE client, not the deploy path

Joel, 2026-08-13: "Headless rust period. No need for node to run everything except
for the web interface which is one of many, including mobile apps/sdk." — and then,
because I kept treating the correction as a code-only matter: "Fix these severe
misunderstandings ... regardless of where they are."

This file is where the misunderstanding REPRODUCES. It is loaded into every agent
session, and it opened with "EVERY TIME YOU EDIT CODE: Run `npm start` (MANDATORY)"
under `cd src` — a directory that no longer exists — plus "ALL Rust binaries MUST be
built via npm start". A fresh agent under amnesia reads that and concludes Node runs
the system. It doesn't, and `continuum --help` has been saying so in its own first
line the whole time: "build + run the headless Rust core".

Rewrote the CRITICAL WORKFLOW section around what is actually true, and swept the
other 11 Node-as-deploy claims scattered through the file:

- The core is Rust and boots with no Node. Node builds the WEB desktop, which is one
  client among several (mobile, SDK, TUI, MCP, another node's core over the grid).
  Named the consequence, because it already cost us: a feature that lives in a client
  exists only for that client — how voice ended up web-only with every other citizen
  structurally mute (#58). Behaviour goes in the core; clients render.
- The deploy path is `continuum reboot` (Rust build + relaunch + running-SHA verify),
  with `deploy-verify` and the version trio called out — that verification exists
  because a reboot once shipped a stale binary and reported success (#194).
- `cargo build` stays discouraged for the RIGHT reason (a hand-built binary exists
  only on your machine, and a fresh clone must work with no manual steps, #291) —
  not the old implication that Rust must be built through npm. `cargo check` is
  named as the correct type-check-while-you-work tool, with the shared CARGO_TARGET_DIR.
- `npm run build:ts` now says what it actually covers: the web client, and nothing
  about whether the core compiles.
- Flagged `./jtag` inline as the legacy Node CLI. Left the invocations that follow,
  since their command NAMES are still accurate — it is the driver that is stale.

No code change; the one surviving "npm start" is the sentence warning you off it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cli): `uu` is the alias — `cu` is UUCP, and every harness defaulted to a binary that does not exist

Joel: "Cu conflicts with some Unix program. Fix for all cases including windows"
and "It's a bug Claude" — it is, and worse than doc drift.

`cu` is /usr/bin/cu (UUCP call-unix) on every Unix. `uu` — the double-U of
contin-UU-m — is THE official short alias, and start-server.sh has installed
exactly that (plus a squatter guard) since 2026-08-01, with a comment naming this
very collision. Nothing in the tree installs `cu`. But the REFERENCES never
followed:

- Six benchmark harnesses defaulted to `~/.continuum/cache/cargo-target/{release,debug}/cu`.
  Neither file exists — the only built CLI is `release/continuum`. So the default
  resolved to nothing and every default-args run died at the first invocation.
  matrix.py even carries a comment about this exact class of failure biting once
  before (2026-07-22, stale debug-only default silently no-opping the sweep).
- Fixed by RESOLVING rather than renaming: a shared `_resolve_cli()` prefers what
  is actually installed on PATH (`uu`, then `continuum`) and falls back to the
  release build — so it works from a fresh clone, an installed box, or a dev tree,
  on any platform, instead of hard-coding one machine's layout.
- Flag renamed `--cu` → `--uu` with all in-repo call sites updated
  (sweep_all → matrix → headtohead → preflight_gpu chain).

Also swept 53 `cu <command>` occurrences in docs, Rust comments, and generated-TS
doc comments to `uu`. Left the ones that are ABOUT the collision (memory-bridge
README's "never bare `cu`", WAKEUP-AND-JOIN's rename note) — those are correct as
written, and legacy/ stays quarantined.

README dev section reworked in the same pass: the boot path is `continuum start` /
`continuum reboot` / `continuum ping`, with Node named as what it actually is —
the web client's build dependency, one client among mobile/SDK/TUI/MCP, not the
thing that runs the system.

Verified: all six harnesses compile (py_compile), cargo check clean, zero
`target/{release,debug}/cu` paths left in the tree.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(core): the last Python in the runtime path — one vestigial, one silently swallowing the job

Joel: "Fix all nodejs and python dependencies that are breaking our headless rust
core ... we must find all smell all the time and never ignore it."

AUDIT RESULT FIRST, because one half is good news:

  Node spawns from the running core: ZERO. `Command::new("node"|"npm"|"npx"|
  "deno"|"bun")` has no occurrences anywhere in continuum-core. The core is
  genuinely headless Rust at runtime; Node exists only to build the web client.

  Python spawns from the running core: FOUR sites, and neither kind was honest.

1. THREE were vestigial and were hiding untested code. `file_engine.rs` had three
   `#[test]`s opening with `if Command::new("python3").arg("--version").output()
   .is_err() { return; }` — a skip-guard from when the syntax gate shelled out to
   `python3 -m py_compile`. That interpreter is GONE: the production path is
   `code::syntax::validator_for` → `unbound_calls`, pure Rust. So on any box
   without python3 — a CI runner, a fresh clone — three tests reported PASS while
   asserting nothing at all. Guards removed; all 55 file_engine tests pass without
   an interpreter present, which is the proof they never needed one.
   Also corrected the doc on `introduced_undefined_calls`, which still told the
   reader the analysis returns None when there is "no python". There is no python.

2. ONE is a REAL runtime dependency, and it was failing silently. `forge/start`
   spawns `python3 <alloy_executor>` — a script that lives in the SIBLING
   sentinel-ai repo, which a fresh clone of continuum does not have. When
   `find_alloy_executor()` returned None the handler used pid 0 and wrote
   `state: "queued"` — indistinguishable from a job legitimately waiting its turn.
   So on every machine that had only cloned this repo, `forge/start` returned
   SUCCESS for work that nothing would ever run. Now it fails loud, names the
   missing script, says where to get it, and states plainly that the job was NOT
   queued. The dependency itself is still there — excising it to Rust is #52/#99
   — but it can no longer pretend to have worked.

The pattern in both: a Python dependency that had already been removed or had
never been satisfiable, still shaping behaviour through a stale guard and a
fallback. `[[fallbacks-are-illegal-fail-loud]]`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(identity): PersonaRef vs PeerId — a reference is not an identity, and the compiler now knows

Joel: "UUID's are NOT strings … Well defined and named structs by reference must be
used." Chasing that through persona_id turned up something sharper than the count.

THE FINDING. `PersonaWorkspaceRegistry::resolve_persona` exists specifically to close
what its own doc calls "the loose-`String` id boundary … the defect class that fed a
dead id to a doomed eval." It has SEVEN call sites. SIX are its own tests. ONE is
production (eval.rs). Against 55 `persona_id: String` fields. The check was correct
and essentially nothing called it — a correct check nothing calls is nastier than a
missing one, because it reads as covered.

Nothing forced the call, because both sides were `String`.

THE FIX — two types, one door:
- `PersonaRef` (new, in identity/): what a CALLER writes — full UUID, 8-char short-id,
  or name. Explicitly NOT an identity. Its only accessor is `as_str()`; there is no
  `as_peer_id()`, because a name is ambiguous, mutable, and meaningless without a
  roster.
- `PeerId` (existing canonical actor identity): what everything downstream holds.
- `resolve_persona(&PersonaRef) -> Result<PeerId, _>` is now the ONLY bridge. Taking
  the newtype rather than `&str` is what makes resolution unskippable.

`From<PeerId> for PersonaRef` exists (an identity is always a valid reference to
itself); the reverse deliberately does not — it requires a roster.

Wire shape is unchanged: `#[serde(transparent)]` over the same string callers already
send, so no client, recipe, or stored payload changes. Short-id and name PX (#161)
keeps working — that ergonomics is the whole reason a reference type has to exist
separately rather than everything becoming a UUID.

Converted, types pushed DOWN rather than laundered at the seam:
- `CognitionEvalParams.persona_id` → `PersonaRef`
- `restore_persona_workspace(&PersonaRef)` (was `&str`)
- `append_failed_ledger(&PersonaRef, …)` (was `&str`)

HELD, and stated rather than fudged: `CognitionEvalResult.persona_id` stays `String`.
The struct derives `Default` across 21 fields and a persona reference has no sensible
default — an empty one is a nonsense value that reads as a real answer. The real fix
is splitting the fire-and-poll HANDLE from the completed RESULT (a handle knows only
the requested ref; a result knows the resolved id), which is its own slice. Inventing
a default to satisfy the type checker is the `unwrap_or` reflex: compiler quiet,
runtime wrong. The reason is recorded at the field.

Tests: persona_workspace 10, eval 22, identity 23 — all pass; full lib test build clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(memory): the memory layer takes PersonaRef, not loose text — 21 sites

Second slice of the id-typing migration. All ten `commands/memory/*` params plus the
`MemoryManager` API they call now carry `PersonaRef` instead of `String`/`&str`:
append_memory, append_event, load_corpus, has_corpus, get_corpus, multi_layer_recall,
consciousness_context, persona_db_handle, hydrate_corpus_if_missing.

Types went DOWN into the layer rather than being unwrapped at each call — the whole
point of the previous slice. `.as_str()` now appears only where the value is genuinely
being USED as text (a map key, a `starts_with` shape check, a directory handle), never
to satisfy a signature one call later.

Two `Default` derives removed (`ConsciousnessContextParams`, `LoadCorpusParams`)
rather than giving `PersonaRef` a default. No caller used `::default()` on either, and
an empty persona reference is a nonsense value that reads as a real answer — same
reasoning as the eval result field held in the previous commit.

What this makes visible, and does not yet fix: these commands still never RESOLVE.
They accept a reference and hand it straight to the storage layer as a key, so a name
or short-id reaches the DB unresolved. That was invisible while everything was
`String`; it is now legible in the signatures. Wiring `resolve_persona` into the memory
command path is the next slice (#164/#396).

Tests: memory 219, rag 150 — all pass. Full lib test build clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(commands): persona params carry PersonaRef — agent/solve, persona/*, cognition/observe

Third slice. Seven more command param structs stop typing a persona reference as
`String`: agent/solve, persona/identity/{get,set}, persona/instances/{get,despawn},
persona/wall/pin, cognition/observe (params + the `assemble` signature + its `Meta`,
so the type is consistent through the result rather than converted on the way out).

Same discipline as the memory slice: `.as_str()` appears only where the value is
being USED as text — `id_resolve::resolve` takes a `&str` by design because it also
serves rooms and cards — never to satisfy a signature.

Running total across the three slices: 39 persona params + the memory API + the
resolver itself. `persona_id: String` is down from 55 to 16 in the crate, and every
one that remains is an internal struct holding an already-resolved id (those want
`PeerId`, the next slice) rather than an unresolved caller reference.

Tests: full lib test build clean, commands suite passes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(rag/introspect): last persona PARAMS typed — and the RAG source path carries it down

Fourth slice. `CognitionTraceParams`, the four other introspect params,
`CognitionReplayParams` + result, `RagComposeRequest`, and `DatasetFromTurnsParams`
now carry `PersonaRef`.

The RAG one went two levels deep rather than stopping at the param: `load_source`,
`load_memory_source`, and `load_consciousness_source` all take `&PersonaRef` now, which
deleted the two `&persona_id.into()` conversions the memory slice had left at those
call sites. That is the shape to aim for — when the type reaches the bottom, the
adapters in the middle disappear rather than accumulating.

`persona_id: String` in continuum-core: 55 → 8. Every remaining one is an internal
RECORD (memory/types, should_respond's AIDecisionContext, live/types, projection,
shell_types, ai/types, sentinel) holding a value copied from a param.

Those are deliberately NOT converted to `PeerId` yet. They hold whatever the caller
sent, and nothing on those paths resolves — typing them as an identity today would
assert something the code does not do, which is worse than leaving them `String`.
They become `PeerId` in the same slice that wires `resolve_persona` into those paths,
not before (#164/#396).

Tests: replay 3, rag 18, full lib test build clean.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(test): 5 supervisor tests have been panicking since #398 slice 3 — the stub's premise expired

`StubAircCitizen::subscribe_all_rooms` was an `unreachable!()` justified by a comment
that said no test drives it. That was true when written and stopped being true at
bf11a66a7 (#398 slice 3), which gave `PersonaSupervisor::materialize` a
`subscribe_all_rooms` call to wire the doctrine/wall cache invalidators. Every
supervisor test that materializes an adapter has been dying in that panic since —
5 of the 10, and they only surface on a FULL-suite run, which is how they sat unnoticed.

Found while verifying my own id-typing slices: full suite came back 7073 passed /
5 failed, and the first question was whether I caused it. I did not — the diff of my
five commits touches `commands/persona/*` only, never `persona/supervisor.rs` or
`persona/airc_citizen.rs`, and `git log` on those two files points at #398.

Fix: return `AircError::Transport` instead of panicking. This is NOT a fallback —
the caller already handles that exact case explicitly (keeps both sources uncached,
"correct, just slow", logs loud), so the tests now exercise the real degradation
branch rather than aborting, and a stub still never pretends to hold a live stream.
An empty stream WOULD have been the fallback: it would have looked like a working
subscription that silently never invalidates.

Comment rewritten to state what is true now, including why the old assertion was
right when it was written. An assertion that outlives its premise is worse than no
assertion — it reads as a guarantee.

persona::supervisor: 10/10 pass.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(test): pin the stub's REFUSAL contract — the old test asserted the panic I removed

`stub_subscribe_panics_loudly` existed to prove the `unreachable!()` fired, so removing
that panic left the assertion failing for the right reason. Rewritten to pin what the
contract actually is now:

  Err(Transport) — required
  Err(anything else) — fail (the caller branches on Transport specifically)
  Ok(stream) — fail LOUDEST, because that is the real fallback: a stub handing back a
               stream looks like a live subscription that silently never invalidates

Matched rather than `expect_err`d because `FilteredEventStream` is not `Debug`.

FULL LIB SUITE NOW GREEN: 7078 passed, 0 failed, 42 ignored. Before this session's
last two commits it was 7073/5 — five supervisor tests panicking since #398 slice 3,
only visible on a full run.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* test(identity): CI guard — a String-typed identity field must be DECLARED, or the build fails

Joel: "eliminate all smell or you will copy it." That is literally the mechanism —
a model reading this tree learns its conventions FROM it, and `persona_id: String`
was 55 sites teaching that ids are text. I did exactly that this session: minted
`c0de0001-…` fake UUIDs because fake-looking ids were already normal here. Prose in
CLAUDE.md does not stop that. A failing test does.

Three tests in identity/mod.rs, running on every PR via the existing
`cargo test -p continuum-core --lib` workflow (no skip pattern matches them):

1. `every_string_typed_identity_field_is_declared` — walks src/, finds any
   `<identity-name>_id: String | Option<String>` field, and fails unless it appears
   in LOOSE_IDS. Comments stripped first, so a doc line can never register as a
   field. The error names the file:field and tells the reader which typed form to
   reach for (`PeerId` for an actor, `PersonaRef` for an unresolved reference, a
   `*Id(Uuid)` newtype otherwise).
2. `no_declaration_outlives_its_defect` — a declaration whose field HAS been fixed
   fails too. Learned directly from `StubAircCitizen::subscribe_all_rooms`, whose
   comment stayed true-sounding for months after its premise expired and cost 5
   silently-failing tests.
3. `declarations_carry_a_real_reason` — every entry starts with external:/pending:/
   defect: and is longer than a shrug, the same bar the module-wiring audit (#344)
   holds.

73 declarations, honestly categorized:
- **external** — LiveKit participant/room ids, log-envelope correlation fields.
  Another system owns the wire format.
- **pending** — ours, but nothing on that path RESOLVES yet. Typing it as an
  identity today would assert something the code does not do. Converts in the slice
  that wires resolution (#164/#396).
- **defect** — `peer_id: String` × 5. These ARE `PeerId`. I attempted the conversion
  in this session and reverted it: `PeerId` has no `JsonSchema` impl and the
  construction sites hold `&str`, so it needs its own slice rather than a rushed
  cascade. Declared as a defect so it stays visible instead of blending in.

POSITIVE CONTROL, because a guard nobody has watched fail is the exact shape of
defect I found earlier today: added `struct PositiveControlProbe { pub owner_id:
String }`, confirmed the guard failed naming `identity/mod.rs: owner_id`, removed it,
confirmed green. The guard also caught 12 sites my own inventory grep had missed —
it is already strictly better than the method I was auditing with.

Full lib suite: 7081 passed, 0 failed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cli): `continuum start` execs the installed server — building is now --from-source

`start` shelled unconditionally into tools/scripts/start-server.sh, which runs a
full cargo build. A "governed" lifecycle verb was a wrapper around a bash file
that only exists inside a repo checkout (BigMama's find, 2026-08-13):

  - a user holding ONLY the installed binary, with no source tree, could not
    start a core at all;
  - the CLI printed one line then went silent for the length of a compile —
    called hung three separate times;
  - the façade's honesty depended entirely on the script underneath.

Same class as the rest of the night's defects: a governed surface over a
hand-rolled path.

Now: `launch_core` locates the installed `continuum-core-server`
(CONTINUUM_CORE_SERVER override → next to the running exe → ~/.continuum/bin →
target/{release,debug} walking up) and execs it directly, keeping the existing
detach/log/pidfile handling unchanged. Building is an EXPLICIT request
(`continuum start --from-source`), never the silent default, and the
no-binary fallback says WHY it fell back and that it compiles first, rather
than going quiet for minutes.

The override refuses loudly when set but not a file — a wrong override must not
look like an absent one.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(core): tree is GREEN again — 7081/0 (peer_id → PeerId finished, guard debt cleared)

The working tree could not build tests. This finishes the identity-typing work
that broke it and clears the guard debt it left behind. `cargo test -p
continuum-core --lib --features metal,accelerate`: 7081 passed, 0 failed.

PEER_ID IS A TYPE, NOT TEXT. The production conversions landed earlier; the
test fixtures were left holding `&str`, so the crate compiled and the test
target did not. Fixtures now derive a real UUID from the literal they used to
carry (v5 under NAMESPACE_OID), which preserves every cross-site equality the
tests depended on — "peer-a" in two places is still the same peer, it is just
an id now instead of a name in costume.

CAUGHT BY DOING IT: contracts/verification had the manifest keyed by a derived
PeerId while the EVENT still claimed a raw string signer. The lookup is BY that
signer, so converting one side made every verification test fail as
MissingPeerManifest. One `test_peer_id` / `test_peer_str` pair now feeds both
sides — the same shape of defect the newtype exists to prevent, reproduced in
the fixtures while removing it from production.

REAL HARDENING, not just fixture churn: `AircPeerManifest::validate` had DROPPED
its empty-peer_id check on the theory that typing the field made it impossible.
Typing killed `""`. It did NOT kill `Uuid::nil()`, which is still constructible
and still means nobody — the type narrowed the hole rather than closing it. The
guard is back, at the remaining expressible form.

GUARD DEBT CLEARED: loose_id_guard's `no_declaration_outlives_its_defect` went
red, correctly — four `peer_id` entries in LOOSE_IDS described fields that are
now `PeerId`. Removed. The guard failing here is it working: a declaration list
that can rot into a graveyard is worth nothing.

Also includes the accumulated session tree: the Joel→Operator fixture sweep (no
person's name hardcoded in test data), ts-rs regeneration, and rustfmt across
the crate. That is why this touches ~717 files; the behavioural change is the
identity typing and the nil-PeerId guard.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(tests): a subsystem-named room does not belong in a fixture either

`k3-serving` had no lifetime because it was named for a SUBSYSTEM, so it
never died — a month-old durable subscription whose board reads were all
corpses. Parted from both scopes.

It also sat in TEST FIXTURES, which is the transmission vector: fixtures
teach the next reader the convention, so a fixture naming a room after a
subsystem teaches that rooms are named for subsystems. Renamed to
`bench-swe-run-1` — an activity with a lifetime, which is what a room IS.

The two remaining mentions in work.rs are the INCIDENT RECORD (4 of 12
cards there carried a 134h-expired lease) and are kept, now annotated
RETIRED so nobody copies the naming from them.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(benchmark): an UNGRADEABLE grade is an ABSENCE, not a capability zero — carry it on the wire and the board

`SweGradeResult.error` documents its own contract: "a result with `error` is an
ABSENCE, not a zero, and must never be tallied as a failed attempt." The grader
earns that honestly — for the env class it re-runs the PRISTINE tree before
declaring a fault, so a genuinely broken patch is never mislabelled.

Then both consumers dropped the classification:

- `benchmark.attempt.end` / `benchmark.autograde` published `resolved=false
  gate_ok=false` and nothing else. Every wire consumer (probe router → rooms,
  exam-room widgets, pulse monitors) reads that as a citizen who tried and lost.
- `fold_run_card` read the RESULT's `infra_error` but never the GRADE's `error`,
  so the board folded `resolved: false` + phase `failed` for the same runs.

The attempt loop already broke correctly on `g.error.is_some()` (attempts 2 and 3
were never burned) — the loss was purely in what got PUBLISHED, which is the part
anything downstream can actually read.

Measured on this box 2026-08-13: 8 of 36 distinct instances (14 of 91 receipts,
22%) grade UNGRADEABLE — requests, pylint, pytest and sympy. Every one of those
zeros was indistinguishable from a capability failure on the wire, so the
denominator of any rate computed off this stream was poisoned. Found by digging
into sympy__sympy-11400: p2p 0/29 on the PRISTINE tree, i.e. the suite does not
run in that environment at all. (#380/#383 own fixing the environments; this
commit owns never again reporting their faults as scores.)

- attempt.end + autograde now carry `ungradeable` + `grade_error`
- `infra_error` takes the grade's error too — one field meaning "no valid
  verdict, and why", fed by both sources rather than a second parallel field
- `resolved` returns to `None` when ungradeable — the same "no verdict" a
  pre-grade card carries, because that is the truth
- new phase `ungradeable`, ordered ahead of `failed` (a run can carry both a
  failed marker and an ungradeable grade; the absence is the truer of the two)

Test asserts absence-not-zero on the real sympy-11400 shape, with a positive
control (same shape, no grade error) that must still fold as a capability zero
— so the test cannot pass by simply never reporting failure.

This is the #384/#386 class one layer up: those classified INFRA at the solve
level, this classifies it at the GRADE level and gets it onto the wire.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(swe): gold-gate the harness — refuse an env whose pytest cannot RUN, instead of caching a tree that grades every attempt UNGRADEABLE

Root cause of the 22% ungradeable rate, glass-boxed on sympy__sympy-11400.

The era pin at the top of this block downgrades pytest to the instance's own
date, which is right when the era INTERPRETER rung (#2253) found a matching
interpreter. When it can't — no Python 3.5 on a modern macOS — the venv falls
back to a modern interpreter while pytest stays pinned to the instance's year,
and the resulting PAIR can be structurally unable to run.

Measured: pytest 2.9.2 (correct for 2016) on Python 3.9.6 dies in
`pytest_configure` with INTERNALERROR before collecting anything — reproduced on
a two-line trivial test, outside the repo, no conftest, no sympy involved. Every
test then "fails", the pristine p2p reads 0/29, the tree grades UNGRADEABLE.
8 of 36 distinct instances on this box are in that state.

So: prove the harness executes before handing the env to a citizen. A version
pin is a GUESS about compatibility; running it is the evidence. `--version` is
not enough — it answers happily for a pytest that dies on any real run.

This REFUSES rather than self-heals, and that is measured, not assumed. The
obvious repair (reinstall a modern pytest) was tried against this exact tree and
does NOT work:

  pytest 8.4.2 → loads, dies in sympy 1.0's 2016 conftest on the `py.path` hook
                 API removed in pytest 7
  pytest 6.2.5 → dies on `py.test.mark.slow`, removed in pytest 4
  pytest 2.9.2 → cannot run on Python 3.9 at all

The band that both RUNS on 3.9 and LOADS a 2016 conftest is EMPTY. No version
choice rescues this class, so an auto-repair would silently trade one void tree
for another.

What DOES work, verified on this tree — 30/30 passing — is sympy's OWN runner
(`sympy.test(...)`) on the same interpreter. That is #383's shape ("django needs
its OWN test runner") generalised: the runner is a property of the repo era, not
a pytest version to search for. `run_tests` is pytest-only today, so until it
grows a runner seam this env genuinely cannot produce a verdict — and it now says
so loudly, naming the incompatibility and pointing at the runner gap, instead of
caching a broken env for every later run to inherit.

[[brittleness-is-the-highest-priority-work-there-is]] — heal what is known-safe,
REPORT what needs a human decision.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(arch): benchmarks are ADAPTERS into recipes/activities — never a parallel runner (Joel's ruling, + STOP gate)

The consequence that makes it law: the learning flywheel consumes ROOM TURNS (L1
lifts tool-traces from captured turns, L2 triggers on turn-completion). A detached
agent/solve writing progress/<run>.grade.json produces NO turns — so a citizen can
burn 12 acts, write a patch, take a graded verdict, and none of it reaches the
curriculum. Maximum effort, zero learning. That, not the pass rate, is why
benchmarks have failed.

Names what is parallel today (ledger files, scraped probes, a second board
projection in fold_run_card, private grade.json), the target shape (import
task+oracle only → project into a recipe → the ROOM is the runner → grading is the
activity outcome → learning falls out because the work happened as turns), and a
one-line acceptance test: can a citizen standing in the room perceive the run's
state through the same ViewState pipe the human's screen uses?

Adds a CLAUDE.md STOP gate over benchmark.rs / agent/solve.rs / swe_bench.rs so an
agent arriving under amnesia must read it before touching run state. Written
because that is exactly what happened: this session shipped two correct fixes that
HARDEN the parallel path instead of dissolving it, including adding a field to a
benchmark probe so external consumers could parse it better — which is the smell
the doc now names.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(activity): a room's recipe binding finally has a READER — every room resolves to what it IS (#6/#274/#329)

`activity/spawn` has always published a room→recipe binding to the wall, and its own
doc says why: "Without this the room forgets which recipe it is and every client falls
back to projecting it as a plain chat room." That was accurate. The binding had NO
READER. `RECIPE_WALL_CATEGORY` appeared in exactly one file — the writer — plus a test
asserting the string equals "recipe".

So the whole recipe layer was live and inert at once: recipes authored as data, a
`RecipeExperienceSource` projecting them, four shipped manifests including a benchmark
carrying scoreboard/central/feed regions — and `DefaultRoomPurpose` answering "chat"
for every room in existence, so none of it ever resolved. A benchmark run's room and a
chat room were the same object to every renderer AND to the citizen standing inside
one. That is what "benchmarks are a parallel system" looks like at the substrate: not
a missing feature, a write with no reader
([[a-correct-check-that-nothing-calls-is-nastier-than-a-missing-one]]).

- `experience/binding.rs` — `RoomRecipeBinding` + `project_binding`, the typed body and
  the one rule for turning a room's wall into its identity. Sibling of `standing.rs`,
  same shape and the same fail-loud stance: no binding is `Ok(None)` (a bare `airc
  join` makes a chat room), an UNREADABLE binding is an error, never a silent downgrade
  to chat.
- `ipc/recipe_room_purpose.rs` — `RecipeRoomPurpose`, the `RoomPurposeSource` impl the
  seam's own doc has been waiting for. Event-invalidated cache, not a per-read fetch:
  `purpose_for` is sync and sits on the projection's store path, so an owner task folds
  `wall:changed` and re-reads the authoritative binding (the supersede chain is
  airc-owned and cannot be reconstructed from a delta — same discipline as the wall
  projector). Seeds every subscribed room at boot so an activity spawned before this
  core booted resolves without waiting for someone to re-pin something.
- `activity/spawn` now SERIALIZES the shared type instead of a hand-authored `json!`.
  Both sides agree by construction — which mattered exactly zero while nothing read it,
  and matters permanently now.
- `positron_source::spawn` takes the purpose source by injection; boot passes the live
  index when a daemon is present, `default_source()` (every room → chat) when headless.

Honest edges, all pinned by tests: an unbound room, an unreadable binding, and a failed
read all resolve to "chat" — the seam is total — but the two failures say so LOUDLY on
the probe stream (`activity.purpose.unreadable_binding`, `activity.purpose.read_failed`).
A binding naming a purpose no recipe declares resolves verbatim, and
`RecipeExperienceSource` then honestly returns no manifest rather than substituting one.

Known follow-up, named rather than hidden: this adds a FOURTH node airc reader
(presence/wall/kanban/purpose). Consolidating them onto one attach is real work and is
not this commit.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(activity): the purpose index must SAY it ran — a silent fold is indistinguishable from a dead one

First live test of the purpose index produced zero probes, and I could not tell from
the evidence whether that meant "attached, seeded, nothing bound" or "never spawned".
The store on disk settled it, but only because I went looking for a sqlite file — the
component itself said nothing either way. That ambiguity is the defect
([[a-correct-check-that-nothing-calls-is-nastier-than-a-missing-one]]).

- attach logs like its three sibling node readers (presence/wall/kanban all do)
- `activity.purpose.seeded` on every boot with {rooms, bound} — "0 bound of 1" is a
  FACT, and a different fact from silence
- `activity.purpose.refreshed` on every wall-change cue, so the invalidation path is
  observed rather than inferred (wall changes are rare; the probe costs nothing)

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(persona): RAG is a RenderTarget — one ViewState renders to eyes AND mind (the pattern)

`ACTIVITY-ROOM-PATTERNS.md` has said this since it was written:

  "the same transform serves a human's eyes and a persona's mind, because RAG is a
   render target, not a separate pipeline" … "the human's UI and the persona's
   grounding are the same projection rendered two ways — they cannot drift, because
   there is one definition" … "Never render the two from separate code."

The code rendered them from separate code anyway. The human's roster comes from
`RosterViewState` on the served Substrate; the citizen's came from
`persona::room_roster_source` — a second reader, own fetch, own freshness, own
failure modes. Same for the board (`KanbanViewState` vs `room_board_source`) and the
wall. Three parallel pairs, and one of them was MEASURED delivering a live peer's
name ZERO times into a citizen's prompt while the browser rendered that peer fine.

This is the compression, not new architecture:

- `RagRenderable` — a tiny per-kind impl: KIND (the SAME const the web subscribes
  to), block label, expand verb, measured floor, salience-ordered units, room scope.
- `ViewStateRagSource<V>` — ONE generic adapter making any such kind a `RagSource`.
  Budgeting, packing, cursors, token estimation, honest-empty, and the room gate are
  written once. N kinds cost N small impls and zero new plumbing.

Properties that fall out rather than being bolted on:
- **Cannot drift** — the adapter reads the SAME Substrate the WS server serves.
- **Freshness** — no second fold to lag, so the #346 staleness class (citizen trusts
  an empty board while the announcement is fresh) can't recur here by construction.
- **Degrades** — units pack most-salient-first, so a tight window yields FEWER
  members, never a chopped one (the property `floor_tokens` exists to protect).
- **One room gate** — reuses `room_scope_allows`, the shared predicate, rather than
  a second copy of the same decision.

Outlier-validated per CLAUDE.md's methodical process, both in one file so a bad
abstraction fails immediately:
- A: `RosterViewState` — people, identity, room-scoped. The measured defect's cure.
- B: `BenchViewState` — numbers, no identity, per-row verdicts, node-scoped.

B needed ZERO adapter changes, which is the whole test. chat / kanban / wall /
serving / nav / foundry are now registrations, not builds.

5/5 tests green, each with a `// what this catches:`. One test's arithmetic was wrong
on the first run (budget 12 fit all three ~4-token member lines); the PACKING was
correct and the test was fixed to 8 — noted in the test itself, because "make the
failing assert pass" is how a real invariant gets quietly weakened.

NOT YET WIRED into prompt assembly — the seam exists and is proven; swapping the
three bespoke sources over is the next commit, so the swap can be reviewed as a
behavior change on its own.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* docs(persona): name the substrate prerequisite IN the module, before someone swaps a source onto it

The obvious next move on `viewstate_rag` is to rebind `room_roster_source` at
supervisor.rs onto the new adapter. Reading the substrate first showed that would
be a REGRESSION, so the module now says so at the top where a future reader will
actually be standing.

The `Substrate` cache is keyed by KIND ALONE — positron's own `revisions.rs` names
the `(room_id, kind)` tuple as a future extension. So the node substrate holds ONE
room's roster: the focused room's. Swapping today means this adapter's room gate
correctly abstains for every persona whose turn is in a different room, and personas
are first-class MULTI-room subscribers. Most citizens would go BLIND rather than
mis-sighted — trading "sometimes wrong" for "reliably empty" is not a repair.

Filed the prerequisite as #408 (per-room substrate key) with the acceptance test:
two personas in DIFFERENT rooms each receive THEIR room's roster in one tick.

This is the note I would have wanted before shipping the swap, not after.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(positron): per-ROOM substrates — the keystone that lets a citizen read HER room (#408)

The node's cache is keyed by KIND ALONE. `scoping.rs` said it in its own words —
"Everything else is per-room and stays on the node substrate" — which is the bug in
one sentence: those kinds are TREATED as per-room but share ONE store, so the node
holds whichever room wrote last (the FOCUSED room) and every other room reads empty.

That is what blocks the citizen side of positron. `persona/viewstate_rag.rs` makes
any ViewState a RagSource so a citizen and a browser read ONE definition — but a
persona is a first-class MULTI-room subscriber, so under one shared slot most
citizens would get an EMPTY roster rather than a wrong one. "Reliably blind" is
worse than "sometimes wrong", which is why that swap was NOT made first.

The fix is not new machinery — it is the SECOND INSTANCE of a pattern already here:
`PER_USER_KINDS` + `PerUserSubstrates` already solve "N scopes share a kind
namespace" for citizens (nav). This adds the room axis in the same shape:

- `PER_ROOM_KINDS = [chat, roster, kanban, wall]` — open by data, like PER_USER_KINDS
- `PerRoomSubstrates::for_room(room)` — one substrate per room, created on first use
- `CompositeCache` routes THREE scopes: per-user → citizen store, per-room → room
  store, everything else (bench, serving, system-metrics) → the node store, because
  those describe the NODE and have no scope to route to.

ADDITIVE ON PURPOSE. `CompositeCache::new` is preserved verbatim and still resolves
room kinds from the node store, so every existing caller keeps today's behavior;
scoping is opt-in via `CompositeCache::scoped`. A migration that silently re-pointed
every reader would make "did this change anything?" unanswerable.

8/8 green. The acceptance test is the one that matters:
`two_rooms_each_keep_their_own_state_in_the_same_tick` — two rooms, each reads ITS
OWN state, neither overwritten. Plus: writer and reader of one room share ONE store
(no second fold to go stale — the #346 class), the unscoped constructor is unchanged,
and the three-way route neither merges nor leaks across scopes.

No positron-core change, no wire change, no tag bump — entirely in-tree. My first
estimate of this task understated it and my second overstated it as a cross-language
contract change; reading `scoping.rs` settled it as an in-tree application of an
existing pattern.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(positron): the chat projection writes per-ROOM as well as node — one fold, two sinks (#408)

Per-room substrates existed as of the previous commit and were EMPTY: nothing wrote
to them, so they were a correct mechanism with no data — the same write-with-no-reader
shape as the recipe binding, inverted.

`ChatProjection::store` now mirrors every per-room envelope (chat, roster, the
Experience manifest) into that room's own store via ONE helper, `store_room_scoped`.
One place decides the dual-sink rule, so a future kind cannot be added to one sink and
forgotten in the other.

ONE FOLD, TWO SINKS — not two folds. The projection computes the view once and the
SAME `StateEnvelope` (same revision) lands in both stores. A second FOLD is what goes
stale (#346, where a citizen trusted an empty board while the announcement was fresh);
a second SINK of one fold cannot drift from itself.

Web behavior is untouched: the node substrate still receives everything exactly as
before, so the focused-room session reads what it always read. The per-room stores are
additive and, until a consumer names its room, unread. `rooms: None` in tests and
headless keeps today's path.

19/19 green. The new test is the crux: two rooms speak, B last; the NODE ends on B
(unchanged focused-room behavior) while room A's OWN store still holds A's view with
A's message. That is precisely the state the single-slot cache used to destroy, and
it is what `ViewStateRagSource` needs in order to hand a citizen HER room.

Still not wired to a consumer — ipc/mod.rs must construct the registry and pass it in,
then the roster source can flip. Kept separate so the wiring is reviewable as its own
behavior change.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(persona): a citizen reads WHO IS PRESENT from the same projection the browser renders (#408)

The last two wires. The roster a persona grounds on is no longer a second reader of
airc — it is `ViewStateRagSource<RosterViewState>` over HER room's own store, which
is the SAME `RosterViewState` the web roster renders.

- `ipc::global_room_substrates()` — the process-global `PerRoomSubstrates`, same
  `OnceLock` shape as `global_nav_focus`. The WRITER (the chat projection, in the WS
  boot block) and the READER (a persona's grounding, bound at spawn in supervisor)
  are constructed in different places and MUST land on one registry; two registries
  would be two stores, which is the exact defect being removed.
- `positron_source::spawn` takes the registry and threads it to the projection.
- `supervisor` binds the ViewState-backed roster instead of `RoomRosterSource`.

This is the repair for the measured defect: a live peer's name appeared ZERO times in
a citizen's prompt while the browser rendered that peer fine, because the two read
different code. Now there is one definition and two render targets — eyes and mind
cannot drift, because there is nothing to drift from.

`room_roster_source` is left in the tree untouched (still used by the presence
emitter and the experience resolver); it is simply no longer the persona's roster.
No dead-code scaffolding was added to "preserve a rollback" — `git revert` is the
rollback, and a dead fn kept for comfort is clutter.

24/24 green across positron_source + viewstate_rag. NOT yet live-verified — the
acceptance test is a real turn's prompt capture containing a peer's name, which is
the next step and the only evidence that counts here ([[never-blind]]: a fix I cannot
prove reached the running binary is a fix I have not made).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(cli): restore the deploy path — reboot builds again, and the socket reaches the server

Two defects, both introduced by 7e0c5469a ("`continuum start` execs the installed
server"), both in the ONE function `start` and `reboot` share. The change was right
for `start` and wrong for `reboot`, and `launch_core` had no way to tell them apart.

1. THE SOCKET WAS NEVER PASSED. The direct-exec path handed the socket to the server
   over CONTINUUM_CORE_SOCKET and omitted the positional argument. `main.rs` requires
   argv[1] and exits 1 with its usage text without it — so on any machine with an
   installed binary, every `start` and every `reboot` died ~2s in, having written

     Usage: continuum-core-server [--mode=<MODE>] <socket-path>

   into the start log and nothing else. Measured here tonight: the reboot killed the
   old core's claim on the swap, the new one never came up, and only the surviving old
   process kept the system answering.

2. REBOOT STOPPED BUILDING. `reboot` is THE deploy path ("edit → reboot → exercise").
   Preferring the installed artifact made it structurally unable to ship an edit: it
   printed "building fresh binary, then swapping" and exec'd a binary from Jul 13.
   Every fix made since would have been invisible to the running core, and the only
   thing standing between that and a false success line was #194's provenance check.

The fix makes the source policy an explicit argument instead of an ambient default,
because the two callers want opposite things: `start` wants a core RUNNING (installed
artifact is correct, and the no-source-tree user 7e0c5469a was written for keeps
working), `reboot` wants the core built FROM THIS CHECKOUT. `plan_launch` resolves
(policy, env override, script?, artifact?) as a pure function — 7 tests, one per branch,
each naming the failure it prevents. A reboot on an installed node with no checkout
still restarts the artifact, but through a distinct variant that forces the CLI to SAY
nothing was rebuilt rather than let a restart pass as a deploy.

Server side: `continuum-core-server` was the one component in the tree hand-rolling its
own socket resolution (argv or die) while `continuum`, `continuum-mcp` and every library
caller go through `endpoint_paths::core_socket_path()`. argv[1] still wins; absent it,
the server now agrees with everyone else instead of exiting. That disagreement is what
let defect 1 exist at all — the launcher communicated over a channel the listener had
never been told to read.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(deploy): publish the verified core binary to the installed path every deploy

`continuum start` execs the INSTALLED continuum-core-server (building is reserved for
`reboot`), and the resolver checks ~/.continuum/bin BEFORE any cargo target dir. But
that copy was written once by install.sh and never refreshed by a deploy — so on a
machine that has been deploying for a month, `continuum start` silently boots a
month-old core while the freshly-built one sits unused in the cache.

Measured on the M5 tonight: installed artifact dated Jul 13, running build 4705, HEAD
4712. And it was not theoretical — a stray auto-start off that stale copy during a
reboot is exactly what tripped the #194 deploy-provenance mismatch and cost an hour of
misreading a deploy that had actually built fine.

This script already publishes the CLI into ~/.local/bin on every deploy, with a comment
arguing precisely this ("refreshes each deploy so PATH always points at the current
build"). The core-server was simply omitted from that reasoning. Now it isn't.

Placed AFTER the #194 freshness guard and before exec, so the installed artifact is only
ever replaced by a binary just proven to match source — never a stale or half-built one.
Atomic temp+mv so a concurrent `continuum start` cannot exec a half-written file.
Non-fatal, and it says out loud when it cannot publish, because the consequence the
operator needs to hear is "`continuum start` may boot an OLDER core than this one".

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix(persona): one contract, one spelling — a ViewState states its floor the way every other RagSource does

CI red on PR #2282, my defect. `cargo test -p continuum-core --lib` failed one test out
of 7,042:

    cognition::context_budget::tests::no_new_hardcoded_context_or_prompt_size_constant_anywhere_in_the_crate

The guard (context_budget.rs:356-365) matches any `const` whose name contains
WINDOW|CONTEXT|CTX|TOKEN|PROMPT|CHARS, of an integer type, assigned a bare decimal
literal. `const FLOOR_TOKENS: u32 = 10` (roster) and `= 18` (bench) matched on TOKEN.

The number was never the problem — it is a per-UNIT content floor ("one roster line
costs ~10 tokens"), not a context bound, and it does not scale with the served window.
The problem is that I expressed it in a SHAPE nobody else uses. Every other source
states the same fact as a function:

    room_board_source.rs:293    fn floor_tokens(&self) -> u32 { 32 }
    room_roster_source.rs:286   fn floor_tokens(&self) -> u32 { 0 }
    room_doctrine_source.rs:151 fn floor_tokens(&self) -> u32 { 0 }
    rag_budget.rs:475           fn floor_tokens(&self) -> u32;      // the contract

So `RagRenderable` grew a SECOND spelling of one contract — an associated const beside
the trait method it feeds. That is the duplication the compression principle forbids,
and it landed in the very file meant to be the template every future ViewState source
gets copied from. The guard fired on the new shape, which is exactly its job.

Fix: `const FLOOR_TOKENS: u32` becomes `fn floor_tokens() -> u32`, matching the
established idiom. One contract, one spelling; the guard passes as a CONSEQUENCE of
saying it the normal way rather than as the goal.

Deliberately NOT done: no `// context-budget-exempt:` line (the escape hatch exists, but
an exemption would preserve the second spelling — the actual defect), and no weakening
of the guard.

Guard test: 1 passed. viewstate_rag tests: 5 passed. Clean `cargo check --lib`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* glass-box(persona): say WHAT the rejected event was, not just which branch refused it (#410)

Measured today: every `airc msg` a human sends reaches EVERY citizen's subscribe stream
(12/12 raw_events, sender 7711fe60) and is dropped as `no_continuum_body_hint`. Cause is
in `realtime_wire::envelope_from_event` (:58-68) — it returns Ok(None) unless
HEADER_FORGE_BODY_HINT == CONTINUUM_BODY_HINT, a stamp only continuum's OWN clients
apply. The message is refused before its content is ever read, so a human talking to the
room over the CLI is structurally unheard while the browser renders it fine
(`airc.chat.projected` fires every time).

The fix is one more arm in `room_turn_from_event`. It needs the CLI's actual body shape,
and the probe could not supply it: `reason` names the BRANCH that refused the event,
never the SHAPE that was refused. Attempts to recover the shape out-of-band failed —
`airc events list --kind message` returns 0 in BOTH the project and machine-account
scopes while returning 60 system-kind events, so the persisted view disagrees with what
delivery demonstrably did.

So instrument rather than guess. A decoder arm written against a GUESSED body is exactly
how presence and control frames become fabricated perception — the hazard the existing
named-skip contract exists to prevent. Next session reads one real body and writes the
arm against a fact.

Adds `event_kind` (the TranscriptKind, which IS the receive-side discriminator — note
FrameKind lives on Frame and does NOT survive to TranscriptEvent) and a 160-char
`body_preview` to the ALREADY-firing filtered_non_turn line. No new probe class, no new
event, and the stream-chunk skip above stays deliberately unprobed — this cannot
reintroduce the flood that skip removes.

Behaviour unchanged: diagnostics only.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(serving): a throughput baseline carries the WINDOW it was measured at (#440/#441)

MEASURED 2026-08-20, Qwen3.8-27B live on the M5. MTP spec-decode is working:
80.3/82.3/84.3% draft acceptance across 3 samples, lane running
`--spec-type draft-mtp --spec-draft-n-max 4 --spec-draft-p-min 0.7`. That
half of #440 is proven end-to-end.

What is NOT comparable: the catalog's 17.2 tok/s was taken at a 19,712
window; the live lane serves 89,280 — 4.5x the KV to walk per decoded token
on UMA. Samples came in at 2.7/6.2/7.8 tok/s. The #441 collapse alarm is
correctly calibrated (0.25 floor: it stays silent at 0.36/0.45 and FIRES at
0.16) but its warning text names CPU fallback, pager thrash and GPU
contention as the suspects — so a reader would hunt a defect that is not
there.

Decode rate is a function of resident KV. A rate without its window is not a
comparable quantity. ThroughputBaseline already refuses to "present an
unsourced baseline as fact"; an unwindowed one is the same class, so the
window joins source as provenance.

- `measured_at_window: Option<u32>` — None means genuinely not recorded, an
  honest absence rather than a 0 sentinel ([[unknown-is-not-a-quantity]]).
- `comparable_at(live_window)` — false means "this baseline cannot say",
  NOT "healthy". A caller that alarms anyway must state the window gap.
- Existing seed rows get None: their windows were never recorded and I will
  not invent them.

8/8 module tests green; cargo check exit 0 (verified by exit code — a
grep-filtered check hid failures from me earlier today).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix: restore 33 core files to canary's version — repair my bad #2282 merge

My merge 9e2389f59 shipped union-merge damage (duplicated lines, orphaned
closers) in 33 files and I reported it as compiling clean. It did not: I was
validating with `cargo check | grep ": error"` and reading empty output as
success, which silently hid the failures. Reading $? gave 101.

Every one of those files is superseded by canary anyway — canary won all 46
conflicts in that merge, verified file by file — so restoring them loses
nothing and repairs the tree.

VERIFIED THIS TIME BY EXIT CODE, not by grep:
  cargo check -p continuum-core --lib --features metal,accelerate -> 0
  cargo test  ... throughput_expectation -> 8 passed, 0 failed

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* fix: restore 4 ts-rs generated bindings corrupted by the union merge

THE CI FAILURE. `cargo test -p continuum-core --lib` regenerates ts-rs
bindings and compares against what is committed; these four had union-merge
damage and could not match.

The damage is the same class I spent the night repairing in the Rust — I just
never looked at the generated files, because "generated" read to me as "not
mine to inspect". RoomRecipeBinding.ts closes the type declaration MID
DOC-COMMENT (`parent?: string, };` with the rest of the comment dangling
after it); the three memory params files import the same symbol TWICE from two
different paths.

Why the compile check stayed green while this was broken: nothing compiles
`.ts`. windows-msvc passed `lib + tests` the whole time.

Why the guard built for exactly this said nothing: `ts-rs binding drift
detector` is `needs: cargo-test-continuum-core`, so when that job failed the
detector reported `skipping`. The check designed to catch binding drift was
gated behind the job the drift broke — worth its own card.

Restored from canary. The branch is now exactly canary + the throughput
change, nothing else.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Code as first citizen: self-tooling, session persistence, and deep integration

2 participants