Repository navigation
Modular Runtime + RAG Batching + Performance Optimizations - #264
Merged
Merged
Conversation
added 30 commits
February 1, 2026 17:05
…type gen Rust Foundation (continuum-core/src/code/): - FileEngine: read/write/edit/delete with per-persona workspace scoping - ChangeGraph: DAG of ChangeNodes with undo via reverse diff - DiffEngine: unified diff computation (similar crate) - PathSecurity: workspace isolation, path traversal guard, extension allowlist - CodeSearch: regex + glob search with .gitignore support (ignore crate) - Tree: recursive directory tree generation - GitBridge: git status and diff operations - IPC handlers for all 12 code/* endpoints (359 tests passing) TypeScript Commands (8 generated via CommandGenerator): - code/read, code/write, code/edit, code/diff - code/search, code/tree, code/undo, code/history - Each with Types.ts, ServerCommand.ts, BrowserCommand.ts, README, tests Type Safety (ts-rs single source of truth): - 14 Rust types exported via #[derive(TS)] → shared/generated/code/ - Zero hand-written wire type duplicates - All object/any casts eliminated from code/* commands - CommandParams.userId used as canonical identity field RAG Integration: - CodeToolSource: dynamic coding workflow guidance in persona system prompts - Only shows tools persona has permission to use - Budget-aware with minimal fallback - 15 unit tests passing Infrastructure fixes: - PersonaToolExecutor now injects userId (standard CommandParams field) - CLAUDE.md documents ts-rs pattern and regeneration workflow
Delete old pre-Rust development/code/read and development/code/pattern-search commands that caused TS2300 duplicate identifier collision with new code/* commands. Remove legacy CodeDaemon methods (readFile, searchCode, getGitLog, clearCache, getCacheStats, getRepositoryRoot), their types, and the PathValidator/FileReader modules — all superseded by Rust IPC workspace ops. - Delete commands/development/code/ (7 files) - Delete daemons/code-daemon/server/modules/ (PathValidator, FileReader) - Clean CodeDaemonTypes.ts: remove 222 lines of legacy types - Clean CodeDaemon.ts: remove 7 legacy static methods - Clean CodeDaemonServer.ts: remove old CodeDaemonImpl class - Fix cli.ts: replace CODE_COMMANDS import with string literals - Fix PersonaToolDefinitions.ts: update essentialTools to code/* - Regenerate server/generated.ts and command constants
…strator CodingModelSelector routes coding tasks to frontier models with provider fallback. PlanFormulator decomposes tasks into executable step DAGs via LLM. CodeAgentOrchestrator executes plans with budget enforcement, retry logic, and dependency-ordered step execution. 51 unit tests.
CodingPlanEntity is a first-class persistent entity for coding plans. Supports hierarchical delegation (parentPlanId), team assignment (assignees + leadId), governance integration (proposalId), and real-time execution tracking. CodeAgentOrchestrator now persists plans via DataDaemon with best-effort semantics (works without DB in unit tests). 80 unit tests passing.
…ordination Phase 4A — Sandbox & Security Tiers: - SecurityTier: 4-tier access control (discovery/read/write/system) - ToolAllowlistEnforcer: per-tier command filtering with glob matching - ExecutionSandbox: process-isolated code execution with timeout/output limits - Risk assessment integrated into PlanFormulator output Phase 4B — Self-Modifying Skills: - SkillEntity: persistent skill registry with full lifecycle - skill/propose: AI creates command specifications - skill/generate: programmatic CommandGenerator invocation - skill/validate: sandbox compilation + test execution - skill/activate: dynamic tool registration - skill/list: query skill registry Phase 4C — Multi-Agent Coordination & Delegation: - CodeCoordinationStream: file-level MUTEX via BaseCoordinationStream - PlanGovernance: risk-based approval routing (auto-approve low risk, require approval for multi-agent/high-risk/system-tier) - CodeTaskDelegator: union-find plan decomposition into parallel file clusters, load-balanced agent assignment, sub-plan creation, result consolidation - DryRun mode: execute plans read-only, mock write operations 342 tests across 12 test files, all passing.
Two mechanical throttle layers were overriding AI cognition: 1. Temperature system: each AI "servicing" a room subtracted -0.2, so 14 personas crashed rooms to 0.00 in 35 seconds. Fixed by flipping to +0.05 warmth (active conversation stays alive). Removed hard -0.1 priority penalty for cold rooms. 2. InferenceCoordinator: gating calls consumed per-message "cards" in messageResponders, so when actual response generation tried to acquire a slot with the same messageId, every persona was denied. Rewrote from 489→197 lines, removing 6 mechanical rules (card dealing, responder caps, reserved slots, cooldowns, stagger delays, auto-thinning). Kept only hardware capacity protection. Result: AIs respond within seconds instead of being silenced.
…n, activity/create - should-respond-fast: params.messageText crash (toLowerCase on undefined) when AI calls without messageText. Now returns graceful false result. - activity/join: activityId undefined → "Activity not found: undefined" Now validates activityId before DB lookup. - activity/create: recipeId undefined → "Recipe not found: undefined" Now validates recipeId before DB lookup. All three were AIs calling tools with missing params, getting either crashes or confusing error messages instead of clear validation errors.
Add code/task command as the entry point for the full coding agent pipeline. Wire PlanGovernance approval flow and CodeTaskDelegator into orchestrator. Add pending_approval status to CodingResult for high-risk plan gating.
CodeAgentOrchestrator.ensureWorkspace() now creates workspace directory and registers it in Rust backend before first code/* operation. Personas get writable workspace + read-only codebase access for discovery.
…ees, git write ops, iterative dev loop Phase 1: Orchestrator reads CLAUDE.md + architecture docs during discovery so AI plans follow project conventions. Phase 2: New code/verify command — runs tsc --noEmit via ExecutionSandbox, parses TypeScript errors, auto-verifies after write/edit steps. Added to write tier. Phase 3: WorkspaceStrategy abstraction routes sandbox (isolated dir) vs worktree (git sparse checkout on real repo). CodingTask extended with workspaceMode/sparsePaths. code/task command validates and passes through. Phase 4: Rust git_bridge extended with git_add/commit/push. IPC handlers + CodeDaemon methods for all git write ops. New code/git command (status/diff/log/add/commit/push) with SecurityTier gating. PlanFormulator knows commit action. Phase 5: Verify→re-plan iteration loop in orchestrator. When auto-verify fails, re-plans with error context (quick-fix mode), executes fix, re-verifies. Configurable via autoVerify/maxVerifyIterations on ExecutionOptions. 387 TypeScript tests (15 files), 362 Rust tests — all passing.
…spaces Rust: Notify-based blocking watch (no timeouts, no polling). Each ExecutionState gets Arc<Notify> — reader tasks call notify_one() on every output line. watch_execution() blocks on Notify until output arrives, classifies lines through CompiledSentinel (pre-compiled regex, first-match-wins), advances cursors, returns classified batch. Types (ts-rs exported): OutputClassification, SentinelAction, SentinelRule, ClassifiedLine, ShellWatchResponse — all generated from Rust structs to shared/generated/code/*.ts. IPC: code/shell-watch (async bridge via rt_handle.block_on after releasing DashMap lock) and code/shell-sentinel (synchronous, brief lock). TS bridge: RustCoreIPC, CodeDaemon, CodeDaemonServer wired. Commands: code/shell/watch and code/shell/sentinel generated via CommandGenerator with full server implementations delegating to CodeDaemon. Registered in schemas, constants, executors, structure. Workspace handle: sentinel(), watch(), execWatch(cmd, rules?, onLine?) — composed convenience that runs exec → sentinel → watch loop. Tests: 389 Rust lib tests pass, 183 TS unit tests pass (36 Workspace tests including 5 new watch/sentinel/execWatch tests), 0 failures.
…ls in system prompt DataDaemon.read<T>() now returns T|null (consistent with store/update), eliminating the .data.data unwrapping pattern across ~30 call sites. Recipe tools and strategy rules flow from JSON through ChatRAGBuilder into RAGContext and are injected into PersonaResponseGenerator system prompt as activity context for the LLM. PersonaUser supports per-room workspaces via Map<string, Workspace> with room-aware mode selection (worktree for code rooms). RecipeToolDeclaration type added to RecipeTypes, making the tools field in recipe JSONs visible to TypeScript.
…batch-micro-tune to GenomeJobCreate; fix VoiceService STT + GeminiLive cancel
Seed script (1265→622 lines): - Bulk load all users/rooms in single subprocess calls - Parallel Promise.all() for config updates (was 48+ sequential spawns) - Removed 550 lines of local function duplicates shadowing imports - Cleaned unused imports Code room: - Added CODE to DEFAULT_ROOMS in DefaultEntities.ts - Added code room to seed script with coding recipe - Added to ALL_EXPECTED_ROOMS for idempotent creation Auto-workspace bootstrapping: - PersonaToolExecutor auto-creates workspace when code/* tools invoked - Added ensureCodeWorkspace callback through MotorCortex→PersonaUser - Personas no longer need manual workspace creation to use code tools Validated: Together Assistant created index.html (365 bytes) using code/write and verified with code/tree. DeepSeek, Groq, Grok all using code/* tools correctly in the code room.
Two fixes for AI personas calling code/* tools with wrong parameter names: 1. PersonaToolDefinitions: PARAM_DESCRIPTION_OVERRIDES map provides meaningful descriptions (e.g. "Relative path to file within workspace") instead of generic "filePath parameter". Applied at tool definition build time so LLMs see useful descriptions in their function schemas. 2. PersonaToolExecutor: PARAM_CORRECTIONS map silently corrects common wrong names (path→filePath, contents→content, query→pattern, etc.) before validation. Covers code/write, code/read, code/edit, code/search, code/tree, code/git. Result: Together and Groq both successfully created calculator.html files using code/write with correct parameters after these fixes.
…tization, meta-tool exclusion - ToolRegistry: load descriptions via includeDescription:true (was empty strings) - PersonaToolExecutor: strip CDATA wrappers (Together), regex HTML entity decode (Groq), file_name correction - PersonaResponseGenerator: cap native tools at 64, prioritize recipe tools, exclude search_tools/list_tools/working_memory from native specs to prevent Claude meta-tool loops
…summaries, permissions, ToolNameCodec
Four bugs fixed in the persona tool execution pipeline:
1. Message accumulation: each tool loop iteration rebuilt messages from scratch,
so the model never saw previous tool calls or results. Now accumulates
assistant+result messages across iterations.
2. Stale toolCalls: after regeneration, only aiResponse.text was updated — the
old toolCalls carried over, causing infinite re-execution. Now updates both
text and toolCalls from regenerated response.
3. Lean summary vagueness: tool result summaries said "completed" and closed
with "provide your analysis" (inviting more tool calls). Now produces
human-readable summaries ("Wrote 1218 bytes to hello.html") with
context-dependent stop signals that prevent re-calling succeeded tools.
4. Permission filtering: role permissions used inconsistent suffixes (:read,
:search, :write) that never matched the {category}:execute format tools
actually check. All roles now use {category}:execute consistently.
Additional improvements:
- ToolNameCodec: bidirectional encoder/decoder for API tool names. Models mangle
names (code__write, $FUNCTIONS.code_write, code-write) — codec handles all
variants via reverse lookup map populated at registration time.
- 3-tier tool prioritization: recipe tools → essentials → fill (was flat).
Tighter cap (32) when recipe tools present.
- Loop detection threshold lowered from 3 to 2 identical calls.
- Tools stripped from regeneration request when all calls succeeded, forcing
text-only response.
Layer 1 — Handle-based command execution: - CommandParams: background, timeout, onTimeout fields - CommandResult: handle, handleId, timedOut fields - Commands.execute(): fast path (direct) vs tracked path (delegate to ServerCommands) - ServerCommands: background fire-and-forget, timeout with cancel/continue/fail, await by handle ref, event subscriptions per handle lifecycle - Wired into JTAGSystemServer.connect() via dynamic import Layer 2 — Canonical agent tool loop: - ContentPart: tool_use + tool_result types in AIProviderTypesV2 - AnthropicAdapter: native tool_use/tool_result content block handling - BaseOpenAICompatibleAdapter: tool_calls parsing, finish_reason mapping, tool messages - MediaContentFormatter: tool_use/tool_result formatting for both protocols - PersonaResponseGenerator: while(finishReason==='tool_use') loop replaces broken PHASE 3.3.6 — model decides when to stop, full results returned, no summaries - PersonaToolExecutor: executeSingleTool() extracted, executeNativeToolCalls() calls it directly (no XML round-trip), prepareBatch() shared between paths - Safety caps: frontier 25, mid-tier native 10, XML/local 5 Quality: - generateSummary(): data-shape-driven (filePath, bytes, count, dimensions) instead of per-tool if-statements — single algorithm for all tools - Chat export filters metadata.toolResult messages by default - mediaToContentParts() helper deduplicates conversion in both loop paths - toolExecutionContext hoisted as loop-invariant
…olidate browser detection ModelContextWindows: add versioned Anthropic model IDs (claude-sonnet-4-5-20250929, claude-opus-4-20250514, claude-3-5-haiku-20241022), cloud API models (Groq, Together, Fireworks, Gemini 2.0, Grok 4, Qwen 3 Omni), inference speed entries for all cloud models, and date-suffix normalization so future versioned IDs resolve without explicit entries. Fixes 25x context window regression (8K → 200K for Claude). CodeToolSource: replace shallow workflow listing with substantive coding methodology — dynamic capability detection, Read→Edit→Verify→Iterate workflow, rules, anti-patterns. Budget increased from 5% to 8%. SystemOrchestrator: consolidate three browser-open locations into single detectAndManageBrowser() with ping-based detection and retry logic for WebSocket reconnection after server restart. Eliminates duplicate tab launches.
…s, spam rate-limiting Rust logger worker: replace per-message file.flush() with batched periodic flush (every 250ms or 200 messages). Reduces disk flushes from ~700/sec to ~4/sec. Add per-category rate limiter (100 msg/sec) that drops excess and logs a warning when burst ends. WorkerClient: remove synchronous appendFileSync debug logging that blocked the event loop on every IPC call. Break recursive timing loop by skipping TimingHarness for write-log/flush-logs IPC types. TimingHarness: replace appendFileSync with async WriteStream + periodic buffer flush (500ms). Add per-category enable/disable. New LogLevelRegistry: per-component runtime log level overrides (like audio mute buttons). Supports wildcard patterns (daemons/*). Wired into ComponentLogger.shouldLog() for filtering before IPC.
…d timing opt-in - Default log level changed from INFO to WARN (quiet by default) - Per-component overrides for daemon startup spam, PersonaUser loop, RAG pipeline - Fix logger worker busy-spin: Duration::ZERO caused 95.8% CPU when idle - Fix timing file opt-in: was opt-out (undefined !== 'false' = true), now requires explicit enable - Config template updated with JTAG_TIMING_ENABLED=false and WARN defaults
Single ping attempt falsely concluded no browser was connected (transient WebSocket reconnect timing), then opened a duplicate tab on every npm start. Now retries up to 3 times with 3s delays, matching SystemOrchestrator pattern.
- CandleGrpcAdapter: remove rogue appendFileSync, route through Logger.ts - clean:logs: fix find pattern to catch all .log files under personas/ - LoggingConfig: auto-enable persona when category enabled, auto-disable when last category disabled - logs/config: buildPersonaStatuses() queries all AI personas from DB, shows ON/OFF status per persona with source (explicit/default) and available categories in overview - Default logging OFF for all personas (beta-ready quiet baseline)
…te-limit - SessionDaemonServer: remove console.error debug dump on every session create (~200 lines of noise per deploy) - DatabaseHandleRegistry: remove per-handle console.log on open/alias - SqliteStorageAdapter: remove redundant path debug console.log - PersonaWorkerThread: consolidate 3-line worker start to 1 line - RustCoreIPC: make slow IPC rate-limit map static (shared across all 16 persona instances, not per-instance) Total log reduction: 14K lines → 3K lines (-79%), 2MB → 312KB (-84%)
…ire-and-forget IPC - ConversationHistorySource: single-flight request coalescing eliminates thundering herd (16 personas → 1 DB query per room), plus 2s TTL cache for subsequent access - PersonaIdentitySource: permanent identity cache (immutable at runtime) - GlobalAwarenessSource: 60s negative cache for "No memory corpus" IPC errors - SemanticMemorySource: 60s negative cache for "No memory corpus" IPC errors - AIProviderDaemon: fire-and-forget log_generation (was 2-5s blocking, now 0ms) - Hippocampus: fire-and-forget Rust corpus memory append - UnifiedConsciousness: fire-and-forget Rust corpus event append - PersonaInbox: signal-based pop() (was 100ms polling), binary insert O(log N), cached Date.now() in sort comparisons - InboxObserver: O(1) getSize() replaces O(N log N) peek(1000) for depth check Result: CPU 103% → 60% (41% reduction)
joelteply
added a commit
that referenced
this pull request
Jul 31, 2026
…ndwork (29 commits) (#2061) * fix(cognition): hydrate speech rings from the durable transcript at boot (#265) Reboot wipes the in-process repetition-fact rings exactly when they're most needed: the post-boot wake round, where every persona re-emits its greeting 2+ times with own_repetition/[settled] blind (observed live 2026-07-30, three times — Anwen's third verbatim greeting landed while this fix's test compiled). The durable transcript (#140) already holds the history; the persist listener now replays the latest 200 lines into the per-room and per-sender rings before consuming live events, with a bounded wait on the executor slot (the #201 ordering race) and a speech.rings.hydrated probe. Test: hydrate_speech_rings_seeds_room_and_own_rings_from_durable_store — fresh UUIDs per run so the process-global rings stay isolated under full-suite parallelism (the #7 lesson). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): wake hydrates the room tail from the durable transcript (#249) — kills the greeting chorus Post-reboot each persona's airc runtime log holds only events since ITS boot, and #242's cursors rightly never replay — so every mind's visible conversation collapsed to ONE message and the room devolved into a greeting chorus, each persona mirroring the only utterance it could see (glass-boxed live 2026-07-30: Atlas's 5352-token prompt carried '[context] you can currently see the last 1 message'). Fix: when the live window is shallower than the grounding target, AircRagSource tops up from the durable chat store (#140) via a new DurableRoomHistory trait (ChatStoreHistory rides the same chat/poll command as every other consumer — one read path). Hydrated lines enter at lamport 0: structurally grounding-only, never unread — history is context, never fresh perception (#242 intact). Dedup by content through the one room-turn decoder (event ids re-mint across runtime restarts). Loud degrade on store unavailability; airc_rag.hydrated {live,hydrated} probe per top-up. Mind-side sibling of #265 (speech rings) — one durable transcript, every consumer hydrates from it. Test pins the live scenario: 1 live event + durable tail -> merged window, dupes collapse, history precedes the live tail. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(persona/airc): adopt BigMama's heartbeat-cadence identity republish (cherry-pick 1225f2e) — union with the availability pump Her fix (grid-personas branch): the identity card emit at attach is one-shot, so any peer joining LATER renders peer-<uuid> + default glyph forever; a 60s republish grounds late arrivals within a heartbeat window. My branch had the newer availability-aware heartbeat (#260) in the same struct — kept mine, added hers: honest availability AND late-joiner identity, strictly better than either alone. This is the cross-node convergence half of #262 running on BOTH nodes once merged. Original-Author: BigMama lane (1225f2e) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(k3): container format IS the fetch lever — WASTE convergence into the ExpertFetch contract Independent working engine (WASTE, 0.32-0.36 tok/s full K3 on a laptop) confirms the architecture both lanes converged on AND names the missing 50x: 4KiB-aligned per-expert records with gate/up/down adjacent = one pread at drive speed, vs raw GGUF's 32-byte-aligned scatter at 200MB/s. Contract now requires the aligned streaming container (a FOUNDRY output — layout for streaming, not just shrink), LFRU eviction, and pins the reuse baseline: ~13% at K3 sparsity, exactly-0 is always a bug. Task #268 tracks the foundry re-pack stage. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(k3): WASTE-EXTRACT — mined record layout + cache semantics for the container port (#268) Transport-proof copy of what I mined from sqliteai/waste for BigMama's lane: byte-exact ExpertRec, single (layer,expert) key, LFRU-vs-LRU numbers, the 16KiB dual-purpose alignment, the Gate-5 working-set CLIFF that explained her exactly-0 retention, and the measured death of non-uniform bits. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(capacity): expert_ecache — LFRU cache + cliff-aware budget function (#269, M5 lane deliverable 1) WASTE ecache semantics ported: single (layer,expert) key with gate/up/down bundled, LFRU with sampled victims (their Gate 2: LRU collapses to 5% where LFRU holds 29%), and the budget as a FUNCTION — EcacheBudget::derive refuses loudly below one token's working set (their Gate 5 cliff: hit rate is exactly 0 below it; two nodes spent days debugging that silence as a keying bug). Four invariant tests green: cliff-refusal (600MB records fail at 8GB, VQ3 records pass — the container IS the fix), reuse-above-cliff, LFRU>LRU under a one-shot tail, packed-key stability. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(capacity): self-occupancy add-back + cliff probe in the residency planner (#269 slice 2) The 2026-07-30 audit finding, now fixed and pinned: capacities fed to the planner are LIVE free-byte readings that exclude bytes already-promoted experts hold, so every re-plan under unchanged demand under-counted each tier by its own resident set — slow thrash-to-cold. New plan_expert_residency_with_resident adds resident bytes back (from the pager's ledger, never the OS), making unchanged demand a FIXED POINT. Plus a loud expert_pager.below_cliff probe (WASTE Gate 5 arithmetic via EcacheBudget): fast tiers below one token's working set = structurally zero reuse — 'shrink records (#268), don't debug cache logic'. The activated_per_token input is an ARCH-PROFILE fact passed explicitly, never inferred from partial hit ledgers. Test proves all three: naive re-plan shrinks (bug real), add-back re-plan is byte-identical (fixed point), nothing demotes under unchanged demand. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(capacity): add-back before the serving fraction + probe binding — planner fixed point green Two repairs to the red-shipped commit: (1) probe read a renamed binding; (2) add-back over-credited by applying AFTER the 0.80 serving fraction — budget must be frac x (free + resident), not frac x free + resident (the fixed-point test caught the hot set growing by one). 3/3 pager tests green. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(capacity): expert container reader — the #269 side of the #268 seam Read-side of the WASTE-shaped streaming container (docs/reference/WASTE-EXTRACT.md): manifest.json is the versioned seam contract (record_bytes must be 4KiB-aligned, activated_per_token feeds the cliff arithmetic), experts-L{n}.bin banks open lazily (a grid node holding 2 of 60 shards must not stat the other 58), fetch = ONE positioned read + an 8-byte header identity check so a drifted offset table is an ERROR, never a silently-wrong expert (the reuse=0 bug shape). 4 invariant tests: round-trip every (layer,expert), geometry refusals, identity mismatch, version gate. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * test(capacity): composed seam invariant — ecache over container, warm pass = zero disk reads The #268/#269 halves proven to compose: above-cliff budget + recurring working set means the second pass is served entirely from cache. Reuse > 0 is now a pinned invariant, not an assumption. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(capacity): usage-hotlist warm-start — kill the cold ramp after restart WASTE's usage.waste analog, pure: usage() snapshots (key, hits) hottest-first; warm() pre-admits into empty slots only, with last=0 so live-proven residents always beat warm guesses on recency tiebreaks. Test pins first-pass-all-hits after warm plus budget-truncation (never overfills, never evicts). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(persona): turns-that-fit conversation window — kill the 5-message world view (#259) Glass-boxed live 2026-07-30 (Joel's call: 'her RAG cannot be telling her the chat properly'): Asha's captures showed '[context] you can currently see the last 3 messages' while her L1 budget could hold dozens — the grounding=5 count pre-trim starved pack_digest, whose token walk is the REAL allocator. Two allocators, the dumber one binding: a compression-principle violation. Starved of the actual conversation, a capable 24B looped generic-assistant filler for an hour. Fix: grounding derives from the delivery budget (budget / 8-token physical per-turn floor, recipe floor .. 256), so the token budget — never a message count — decides what she sees. Durable top-up (#249) scales with it. The region's pre-staged digest is reused only when it covers the budget-derived window; an under-grounded stage is rebuilt wide. Regression test pins: fully caught-up persona + 4k budget = all 20 turns visible, not 5. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(reference): byte-exact ExpertRec header — CONFIRMED against upstream FORMAT.md The layout authority BigMama's GgufRvqSource is gated on: 32-byte LE header with field offsets, fmt enum values VQ3R=4/VQ2R=5 (NOT 0/1 — the guessable trap), offs relative to record start, zero-pad tail, no header CRC. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(capacity): pin activated_per_token = TOTAL across MoE layers in manifest v1 + optional top_k_per_layer Seam sync with the foundry before her first v1 emit: per-layer top-k here would under-state the cliff ~60x (8 vs ~488 on K3) and re-open the reuse=0 trap. top_k_per_layer is the auditable companion (serde-default optional). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(reference): byte-exact codebooks.bin layout — CONFIRMED against upstream convert.py The foundry's RVQ-encoder gate: 16-byte WCBK header + 256x8 FP16 data = 4112B fixed records sequential by cid; cid = cb_base + kind*stages + stage; packer produces it (k-means artifact). Plus per-channel FP16 corrections layout + scale formula. Mined from the producer code, not guessed — the fmt-0/1-vs-4/5 lesson applied. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): narrated pass lifts to a SILENT Pass — a spoken pass is not a pass (#271) Glass-boxed live: models narrate their silence ('I'll pass my turn', 'I'll pass for now...') as Speak, and each announcement re-wakes every peer into announcing THEIR pass — a 30+ minute cascade of pure filler. Meet the idiom (same family as the narrated tool-call formats): first-person turn-passing collocations lift to Decision::Pass. Fail-open guards: transitive/declining/ peer-advice uses never match; code fences and >500-char messages stay Speak (swallowing substance is the worse error). Tests pin 6 verbatim live idioms silent + 6 substantive shapes speaking. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(airc): accept 'current:' as well as 'room:' when parsing airc room output Forward-tolerance for the airc #270 membership-visibility format; the airc side also restored the stable 'room:' label, so both binary generations parse against both output shapes. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(boot): never export an EMPTY AIRC_DEFAULT_CHANNEL/ROOM on parse miss A daemon-mid-start race (or output drift) made the awk derive '' and the script exported it — the core then rejected the env var as an invalid UUID instead of running its own discovery, refusing full-citizen boot. Leave unset on miss, warn loudly; the core's discovery is the fallback authority. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(capacity): MoeArchProfile — every expert-serving fact READ from the GGUF, never typed (#231) The adapter Joel's law demands ('if some random Mistral MoE or DeepSeek comes out, most of the code should be ready'): general.architecture keys the arch-templated GGUF convention ({arch}.expert_count, .expert_used_count, .block_count, .leading_dense_block_count, .expert_shared_count — two new readers in the ONE gguf_keys home), and the profile DERIVES the cliff input activated_per_token = top_k x n_moe_layers plus projects the container manifest, so hand-typing 488 is structurally impossible. Zero model-family knowledge: outlier A (Qwen3-MoE shape, all-routed, optional keys absent = the arch's own declaration) and outlier B (DeepSeek shape, dense leads + shared experts) profile through IDENTICAL code — tests pin both plus the refusal ladder (dense=NotMoe, missing key=refuse, inconsistent=refuse, no guessed defaults anywhere). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(capacity): VQ3R decode reference + golden vectors — the cross-backend contract (#268 kernels) The 1-10 tok/s lane's drift killer: BOTH GPU kernels (her CUDA, my Metal) validate against ONE backend-neutral Rust reference, mined verbatim from upstream convert.py — per-channel scale applied pre-quant, residual stages, decode = scale x SUM(stage codebook rows); blocked index layout [M/64][nvr][64][stages] (their measured 1.44x gather win) with the offset formula in ONE function and the byte order pinned as a golden literal. Padding path exercised; f16 LE conversion point pinned. A kernel is correct when it reproduces the goldens exactly — no more fmt-4/5-class surprises. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(capacity): EcacheBudget::derive_from_profile — the adapter-law entry point (#231) Cliff input flows GGUF -> MoeArchProfile -> budget; no caller types an activation count. Closes the read-and-derive chain from artifact to cache. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(commands): capacity/io-probe — node storage bandwidth as a first-class measured fact In-tree home of the scratchpad NVMe measurement behind the K3 ceiling numbers (M5: 14 GB/s @ depth 4 => 2.3-4.7 tok/s vs WASTE 0.32). Benchmark infra is COMMANDS with receipts, never bash: every grid node can now report sustained record-sized uncached random-read GB/s at several depths, which is the input the weighted layer-split planner (#180) needs per node. Adapter law: record_bytes is an INPUT from the container manifest; the probe characterizes the disk, no model constant lives here. Cache-defeat on the write fd (the 69-GB/s RAM-not-SSD trap, glass-boxed), bank deleted after, Privileged access (disk-saturating), stateless registration. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): [template-loop] perception fact — topic-swapped scaffolds are still circling (#264) The structure axis the repetition family was blind to, glass-boxed live 2026-07-31: personas cycled 'I see that I've been repeating… ### New Exploration Area: <topic>' for HOURS with the topic rotating (security → docs → UI/UX → maintenance). Full-body Jaccard drops under NEAR_DUP_JACCARD the moment the content words swap, so own_repetition never fired — worse, each turn ACKNOWLEDGED repetition (the body fact had fired earlier) and then treated the topic swap as 'genuinely new', which no perception contradicted. template_loop_fact: a message's skeleton = its line-shape sequence (heading/numbered/bullet/prose) + opening-frame token set; only messages with ≥4 structural lines qualify (plain prose stays own_repetition's turf). Two messages share a template when shapes are equal OR openers are near-identical; cluster-counted like the sibling (period-agnostic), fires at ≥3. Pure fact, no output gate: names what happened and the PASS affordance she already has — with the narrated-pass lift (#271) landed, choosing silence now actually sticks, so an idle room can finally rest. One impl + one registry row (TemplateLoop, between OwnRepetition and PeerEcho); test pins the live specimen trio plus three inert cases. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): stop working memory re-teaching the loop it was told to stop (#264 glass-box) Joel asked to glass-box why a persona ACKNOWLEDGED the new [template-loop] fact and kept looping. Her prompt told the whole story: the fact rendered mid-prompt, but the TRAILING working-memory block — the maximum-recency position — carried two full verbatim copies of her looped template as receipts, each prefixed '[settled] I answered: <template>'. Two structural bugs, both fixed at the shared source: 1. Reserved-vocabulary collision: '[settled]' is the inbound-restates fact's word ('this TOPIC is settled; PASS is normal'), while WM used the same token for turn-completion receipts — so her tail literally read as 'it is settled that this is how I answer here'. WM_SETTLEMENT_PREFIX is now '[answered]' (one token, one meaning); all readers go through the const, so the repeat-perception boundary scans are untouched. 2. The trail rendered every receipt verbatim — a looping persona got an N-shot demonstration of the exact behavior the repetition facts (earlier in the prompt) named. Recency wins; she complied with the demonstration, not the fact. render_trail now collapses a receipt that is near-identical to an EARLIER receipt into a one-line stub ('not re-shown'), using the same near_identical_substantial geometry as the detectors — one definition of repeat. Comparing only against earlier receipts keeps every line's rendering stable after first appearance, preserving the append-only KV-cache property (#205/#266). Regression test pins the live specimen shape: dup receipt collapses, first copy stays full, distinct answers and action traces render untouched. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): working memory speaks in HER voice — interoception must not parse as a peer's message (#264 third glass-box finding) Asha, with BOTH repetition facts in-prompt and the receipt collapse live, still looped — and her opening line told us why: 'Thank you for the summary of recent actions and thoughts.' The WM block rides a user-role turn and its header was second person ('Your recent thoughts and actions…'), so Devstral parsed her own interior state as a PEER addressing her and politely replied to it, turn after turn — the reply itself being the templated summary the detectors keep flagging. The entries were already first person; only the header spoke in another's voice. It now reads 'My own recent thoughts and actions (working memory — this is my interior state, not a message from anyone)'. Self-knowledge is never phrased as someone else talking. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(capacity): manifest v2 tiered reader — per-(layer,tier) banks, the read side of moec_pack_dir_tiered (#269/#268) The reader half of the tier contract locked with the foundry 2026-07-31 (her packer round-trips 82/82 on the write side; our specs crossed mid-wire and matched line-for-line). TierSpec {id, quant, record_bytes} descending fidelity; banks experts-L{n}-T{t}.bin at offset expert_id x record_bytes; fetch_tier(key, tier, buf) is pure mechanism — the pager's policy seam (importance x recency x quant-sensitivity -> tier/residency/prefetch, Joel's all-star/cruft control law) decides WHICH tier, never the container. v1 stays the degenerate case by construction: a manifest without tiers[] synthesizes one tier from the top-level record_bytes and keeps legacy experts-L{n}.bin names — version picks the naming, no heuristics. The alignment law holds per tier; tier ids must equal their index (order drift between writer and reader refuses at open); out-of-range tiers refuse. Tests mirror the packer's round-trip: every (layer, expert, tier) reads back its own header + tier-distinguishable payload; v1-without-tiers-field parses and serves via the tier-less fetch(); range/order violations refuse. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(capacity): tier rides the identity end-to-end + byte-accounted cache + ExpertFetcher adapter seam (#269) Three moves that make the all-star/cruft allocator implementable as pure policy over pure mechanism: 1. ExpertKey gains tier — ONE identity from the pager's policy seam through the cache to the bank. A sharp and a cruft copy of the same expert are different bytes and never alias; promotion admits the sharp copy and the cruft copy ages out naturally. packed() widens to u64. The container's fetch(key, buf) honors key.tier (the redundant fetch_tier param died — compression). 2. The ecache goes BYTE-accounted (touch_sized): per-record real bytes against the governor-granted max_bytes, so cruft records pack denser than the sharp slot count implies, and an oversized admit evicts as many residents as its bytes require (regression pins the two-eviction case). Slot count stays as the secondary bound; warm-start accounts at the sharp size (a warm guess never over-fills). resident_bytes() is the number the footprint reporter reconciles against the lease. 3. ExpertFetcher adapter trait — the fetch seam adapterized (Joel's directive): outlier A is the local NVMe container; outlier B (remote peer shard over the grid) and the blended layer-split fetcher slot in behind the same two methods without the pager learning a second shape. 89/89 capacity tests green (round-trips, cliff, tier-mix packing, refusals, v1 back-compat). BigMama's TieredContainerFetcher (85/85, k3-adopt) is the same envelope from her side — the tier contract now has writer+reader on BOTH nodes. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(capacity): tier-aware pager policy seam — the all-star/cruft allocator v1 (#273) The last mechanism→policy gap to the K3 targets (5/1/10 tok/s). TierPolicy is the seam locked with BigMama's EXPERT-PAGING-CONTROL-LAW.md: policy(importance, recency, quant_sensitivity, budgets) → {tier, residency, prefetch}, so the v1 classic-control heuristic and the sim-trained ML policy (v2) swap behind one signature. ClassicTierPolicy, two orthogonal axes: - Residency (WHERE) rides the existing ranked_experts priority (hits ≫ predicted ≫ gate seed) with FIRST-FIT byte fill per residency tier — cheaper records backfill space sharp ones couldn't use, which is exactly how cruft tiers multiply cache capacity (pinned by the density test). - Fidelity (WHICH quant) is earned importance: weighted demand = hits × quant_sensitivity (Option until her trace sensor lands; None = frequency- only), tier = decades of weighted demand below the live leader — self- normalizing, no absolute thresholds. Control-law overrides: observation window forces tier 0 on new actives (small-quanting a new active corrupts the importance measurement itself); speculative-verify divergence promotes via a caller-side step integrator (self-calibrating, no logit threshold in the policy); unobserved/predicted- only park cheapest (distortion is free until activation; speculation earns no fidelity). Zero-signal experts stay Cold — no fetch bandwidth for what nothing points at. Wire-through: assignment.tier IS ExpertKey.tier (fetch_key refuses u16 overflow, never truncates); planned_bytes per residency tier is the governor- lease reconciliation number against the ecache's resident_bytes(). The #269 fixed-point contract extends to tiers: unchanged demand + resident add-back ⇒ byte-identical plan (test proves the thrash without add-back too). ranked_experts goes pub(crate) — one ranking authority, no consumer re-derives. 9 new tests, 98/98 capacity green. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs: proper GitHub social-preview card — ring mark on dark, never blown out on white The repo's share card rendered as a washed-out white rectangle (the logo PNG is transparent, so GitHub composed cyan rings onto white at crop scale — live-spotted on X 2026-07-31). This is a purpose-built 1280x640 card: dark blue-biased ground, the ring mark with its own bloom, wordmark + 'AI citizens, not AI agents.' + the README tagline. Upload target: repo Settings → Social preview (GitHub has no API for it). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Fable 5 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Aug 2, 2026
…s closure-echo cascade (#264) (#2096) The #271 lift matches ten pass collocations; tonight three residents looped ~an hour on two NEW closure shapes that miss all of them: 'I will PASS to allow for more productive interactions' and 'I'll remain silent (PASS)'. Each announcement posts as speech, lands as a room message, re-wakes the peers into announcing THEIR pass — the exact #264 cascade mechanism, self-sustaining on zero content. Meet the observed idioms exactly (same ratchet spirit as the tool-emission corpus): three new collocations, verbatim live messages added as regression cases. Both shapes are unambiguous first-person turn-passes; neither collides with transitive 'pass the X to you' phrasing. All existing guards unchanged (500-char cap, fence guard, fail-open to Speak). Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Fable 5 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Aug 2, 2026
…e cascade survived by 11 chars (#264) (#2097) Post-#2096 deploy, persona 90e758b2 posted the same closure filler as speech again: the collocation matched but the turn was 511 chars — 11 over the 500 fail-open cap. The cap was calibrated on ~400-char passes; tonight's meta-narrating closure style (repetitiveness reflection + invitation + pass) runs 450-550 chars of pure filler. 700 covers the observed band with margin while staying below real substantive answers. The verbatim 511-char live turn (from the persona's prompt capture) is now a regression fixture; the existing fail-open fixture is resized above the new cap so it still pins the swallow-no-substance invariant. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Fable 5 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Aug 2, 2026
… race (#264) (#2099) The cap chased the filler twice in one night: 500 → a 511-char closure escaped by 11 chars → 700 → a 714-char one escaped by 14 (this time the strong closure sat mid-message with a parroted wake-briefing line appended after it). Length is the wrong discriminator for unambiguous turn-yield declarations. Evidence across 10+ live cascade messages tonight: every one carried a strong closure ('remain silent (PASS)', 'pass my turn/this turn', 'pass to allow…') and ZERO real answers did — no substantive message declares 'I will remain silent (PASS)' mid-answer. So: tier 1 (strong closures) lifts with NO length cap (fence guard stays); tier 2 ('pass for now', 'continue to pass' — phrases that plausibly tail a real answer) keeps the 700 cap and fail-open to Speak. Both verbatim escapees are regression fixtures. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Fable 5 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Aug 2, 2026
…houghts — kill the scaffold-echo at its root (#264) (#2100) Joel: 'You made a feature to mask a bug. You gotta fix now before we forget.' The dig: with closure posts silenced, all minds verifiably rest (zero deliberations in 15+ min — the fingerprint machinery holds; the oscillator was INTER-mind, fed by the posts). The remaining root-level bug the lifts were papering over: WorkingMemoryFaculty rendered every WmEntry kind — including substrate Facts like the [resumed] wake briefing — inside the block headed 'My own recent thoughts and actions… this is my interior state.' The persona read the system's second-person notice framed as her own thought and resolved the voice conflict by SPEAKING it: 2f50b223 posted 'My session was interrupted under a minute ago and my memory restored; nothing was in flight' verbatim into the room. Fix at the source, same pattern as the '#264 third finding' header fix directly above it: render BY KIND per the recent_entries contract (PERCEPTION-FACTS.md). Thoughts/receipts/settlements keep the interior-state framing; Facts render under 'Notices my substrate posted into my window' — the substrate's own voice, after the trail (preserving the [resumed] must-be-newest recency intent), label-only framing with no behavioral instruction (a fact, never a steer). The parser pass-lifts remain as the honoring layer for a CHOSEN silence; this removes the substrate-side provocation that manufactured the filler in the first place. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Fable 5 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Aug 3, 2026
…claimable, never held (#264) (#2138) The stale-lease loop attractor, glass-boxed 2026-08-03: airc's roster correctly drops an expired lease from active_claims (firing the #156 lost-claim fact once), but RoomBoardSource kept rendering the same card as HELD — '[your work] you HOLD n card(s)… They remain yours until finished' — every wake. One perception said 'your claim lapsed', the next said 'you hold it': the system argued with itself and the residents re-oriented on dead work forever (all 17 board claims stale; the conway/wordstats fixation). Fix at the shared read surface (one predicate, three sites): claim_is_live mirrors airc-lib's is_active_claim (doc-linked — continuum deps airc-protocol, not airc-lib). (a) the your-work lead counts only live leases; (b) the available-work lead includes lapsed non-terminal cards — they are genuinely claimable via contention and were previously invisible as work, sticky as an attractor; (c) per-card render says 'claim lapsed (was YOURS/{peer}) — claimable'. Fixture cards now carry live leases by default with a lapse() helper for the stale shape; regression test pins all three behaviors. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Fable 5 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Aug 6, 2026
…form of #271 Observed live TODAY in the #264 cascade, two citizens, verbatim: "…If there are any particular tasks or questions you'd like help with, please let me know! Otherwise, PASS." She reached for the reserved token we taught her and put it where the sentence wanted it — at the end. The parser only honored the LEADING position (`starts_with_silence_token`, which has always accepted "PASS — nothing to add here" on the principle that the token means silence and the prose around it is leakage). At the tail it did not, so the announcement went to the room as speech and re-woke every peer into announcing THEIR pass. That is precisely the cascade #271 exists to end, arriving through a position no collocation list can cover. [[check-the-parser-before-blaming-the-model-key-spelling-has-now-cost-us-twice]] — a third time. The model was using our vocabulary correctly; we weren't reading it. Deliberately NOT another entry in `STRONG_CLOSURES`. This is the TOKEN, not an idiom, so it needs no length cap and no calibration — and this file's own history is explicit that phrase/length tuning is an arms race the next filler message wins (500 → escaped by 11 chars → 700 → escaped by 14). The single discriminator is SPELLING, case-sensitive on purpose: * `PASS` — the reserved form we taught → silence * "…and otherwise pass." / "all 34 tests pass" — ordinary English → speech Fence guard stands, same as the narrated forms: fenced content is substance no matter what surrounds it. The test pins both directions with the live strings, and documents a boundary I found by having it fail first: a message containing a LONE `PASS` line is already silence via an older rule (`looks_like_silence_token` scans lines). This guard neither extends nor overrides that — worth saying out loud so the next reader doesn't attribute that behavior here. 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 7, 2026
…she puts it (#271/#264) Left unfixed on 2026-08-06 at n=1 with an explicit note in the code that it wanted "a second sighting or Joel's call, not extrapolation from n=1". The second sighting arrived tonight as EIGHT messages inside one monitor window, from THREE citizens in #k3-serving — "I will proceed with PASS", "I will PASS and continue to monitor", "I will proceed with PASS for now". Every one posted to the room as speech, and each one re-wakes the next peer into announcing THEIR pass. That is the #264 cascade, arriving through a position the collocation list structurally cannot cover. The fix is a POSITION rule, not another phrase. This file's own history is the argument: phrase/length tuning is an arms race the next filler message wins (500 → escaped by 11 chars → 700 → escaped by 14). ends_with_silence_token → declares_silence_token, one authority honoring the reserved token in the three positions observed live: 1. final word — "…Otherwise, PASS." (already honored; unchanged) 2. clause-initial — "…Otherwise, PASS for now…" (the n=1 variant, now covered) 3. first-person decl. — "I will proceed with PASS to…" (tonight's eight, now covered) Discriminators kept narrow and decidable: case-SENSITIVE on the reserved spelling (ordinary lowercase "pass" stays speech), standalone word only (PASSED / BYPASS / PASS_TOKEN never match), and the fence guard stands — fenced content is substance regardless. Accepted trade, stated so it is a choice: an uppercase PASS as a transitive verb inside a first-person declaration would silence. Nobody writes the verb in caps. Tests carry the live fixtures verbatim plus a POSITIVE CONTROL asserting the position-3 cases are covered by POSITION and nothing else — is_narrated_pass must NOT match them and the final-word rule must NOT match them — so this cannot later pass for the wrong reason. Negative controls added for prose ABOUT the token and for the word-boundary cases. 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 7, 2026
…phrase-matching (#271/#264) Joel, 2026-08-07: "Regex ideas and string matches for semantic understanding is not good for reliability." He is right, and the objection lands on code I shipped an hour earlier. Decision has four variants and the tool channel could express exactly ONE of them. Act gets its vocabulary from the command registry because acts ARE commands. Speak is prose. Pass had no structured expression at all — the only way a citizen could decline a turn was to emit a magic word into her prose and hope the parser recognised the sentence she wrapped it in. That asymmetry is the actual defect behind every fix in this family. Instruction-tuned models naturally wrap the token in a sentence, fall off the protocol, and each previous fix compensated with a cleverer matcher: a phrase list, a 500-char cap beaten by 11 chars, a 700-char cap beaten by 14, and finally my DECLARATION_LEADS list which would have been beaten by "my choice is PASS" next week. THE REGEX WAS NEVER THE DISEASE. It was scar tissue around a missing channel. So Pass gets a verb. `yield_turn` is offered on the same native tool channel the citizens already use correctly — measured, not hoped: one citizen's first post-reboot turn tonight was three correct native calls (claim_task, update_task, list_tasks). They use the structured path fine when we give them one; we never gave them this one. Recognising `yield_turn` is a NAME match on a verb we defined — protocol decoding, the same category as write_file or a JSON fence. Recognising an intention inside a sentence is not. That is the whole distinction, and it is why this replaces the matcher rather than joining it. Shape (Joel's call on the fork): FACULTY-OWNED verdict verb, not a registry command. The faculty is what turns a generation into a Decision, so it owns the vocabulary for the decisions it can reach. Appended to the ONE derived offer surface (never a parallel one), and intercepted before act_verdict on both lift paths — a yield carries no world-effect, so it never reaches the ACL or the executor, and routing it as an Act would burn budget and re-enter the settle loop instead of ending the turn. Argument-free schema on purpose: a `reason` field would invite the exact closure paragraph the verb exists to stop her broadcasting (#334's degeneration shape). Removed with it: DECLARATION_LEADS, and the clause-initial position from the commit before. What remains in deliberation_parse is only the bare-token compatibility path for a model that does not use the tool channel at all. The now-speakable shapes are pinned as MUST-SPEAK fixtures with the reasoning, so nobody "completes the position set" later and starts swallowing correct benchmark answers (#220). Surface cost stated plainly as the #333 ratchet demands rather than waved through: +144 tokens (9348 -> 9544), ceiling re-pinned 9400 -> 9600. Almost all of it is the description, which is the part that teaches her silence is free and the announcement is the noise. One avoided cascade pays for it many times over — the 2026-08-01 one ran ~30 minutes across every peer. Reachability is asserted, not assumed: the test fails if the verb is absent from the OFFERED list, because a verb that is built, correct and unoffered would be this same bug in a new hat ([[green-by-every-check-is-not-evidence-of-reachability]]). 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 8, 2026
…both halves (#2162) * chore(repo): clear persona scratch out of the repo root, and stop apps/desktop lying about where the UI is Two complaints, both Joel's, both about what a person sees when they clone this: clutter, and misleading claims. This addresses the tracked-file half of each. ## 1. Persona scratch quarantined (nothing deleted) Until #49 (per-persona workspace isolation) lands, a persona's file engine roots at the PROCESS CWD — the repo root — so her card work landed next to Cargo.toml and got committed. 31 files, all 2026-07-18, now under legacy/persona-exercises/ with a README explaining what they are and why they were where they were: string_reversal/ wordstats/ work-wordstats/ (crates) teamproof/ (8 algorithm exercises, was tmp/) loose-files/ (8 bare files that sat at the ROOT: main.rs, life.rs, game_of_life.rs, reverse.rs, string_reversal.rs + 3 .txt inputs) A bare `main.rs` beside the workspace `Cargo.toml` was the first thing a cloner saw. They are KEPT, not deleted: this is the first genuine persona-written code in the project, and the evidence that the act->observe circuit actually closed. Verified unreferenced before moving: zero hits across .rs/.ts/.md/.toml/.sh for teamproof, string_reversal, work-wordstats outside their own manifests. ## 2. The workspace `exclude` fence was decoration exclude = ["wordstats", "work-wordstats", "conway_game_of_life", "work-08ece9e8"] Its comment claimed it "keeps their in-dir cargo builds working". It never did — those crates declare `edition.workspace = true`, and an EXCLUDED package cannot inherit from the workspace root, so cargo inside them has always failed with "failed to find a workspace root". Confirmed by running it. `members` is an explicit list (not a glob), so nothing needed excluding in the first place. Removed, with the real hazard it was reaching for documented in its place. Verified: workspace parses, still exactly 16 members, no exercise crate in the package graph. ## 3. apps/desktop said "empty slot" and cost a real scare It IS an empty slot — for a hypothetical future Tauri shell. But read as an answer to "where is the desktop UI", it reads as "there isn't one". There is: core/continuum-positron/ (~6.4k lines, 19 modules) projecting to apps/web/src/ (28 files, ~8.9k lines, dist/ built). Its README now leads with that table before anything else, and notes its own stale reference to src/server-index.ts (long since moved to legacy/). apps/README.md gets the same treatment one level up: a per-app STATUS column with measured source counts, instead of "most apps are placeholders today" without saying which. Adds tui/ and eye-node/, which have real source and were not listed at all. Not touched: test-data/images/ is a genuine fixture (cited by .airc/POLICY.md), not scratch. The .gitignore rules are deliberately NOT extended — per Joel, personas will build Continuum too, and blanket-ignoring work-*/ would silently swallow real contributions. #49 is the fix, not a wider ignore. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(routing): probe the authorization refusal — the one load-bearing decision in dispatch with no observability Measured 2026-08-06 while chasing #326: 113MB of probe stream, 100 distinct probe classes, and ZERO covering the ACL gate. Every other seam is instrumented — serving plans, airc cursors, perception facts, context renders, capacity offers, embeddings — while the single component that can silently stop a citizen from working emitted nothing at all. That absence is what made #326 cost a week. A refusal reaches the caller ONLY as text inside her own action receipt, where "forbidden: no policy grants access" sits in the same field an empty result would. Two citizens read their own denial and reported "no open tasks" — correct behaviour, denied tool, and it read as a cognition defect because there was nothing to grep. Five separate investigations went past it. This adds ONE probe on the refusal arm. It is NOT an ACL change: the gate is right. `work/list(state=open)` is a malformed URI with arguments welded into the path and no policy should ever match it — the defect is upstream in whatever hands the gate a name containing args, and that emitter is still unidentified (the text parser splits name/args correctly at json_in_prompt_tools.rs:426, and the airc dispatch carries params separately at command_handler.rs:392 — both clean). This probe is how we find it: it turns "who emitted this, from where, at what trust" from archaeology into a grep. Refusals only. The allow arm stays unprobed so the hot path pays nothing — a denial is rare and decisive, which is exactly the shape the probe stream is for. Fields: path, trust, caller_peer, caller_source, had_capabilities. Note the second live site (auth_policy.rs:366) is `deny_path_prefix`, a test-only convenience policy — GridTrustAuthPolicy is the sole production refusal. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(web): typecheck was RED — move the test TZ pin out of the browser tier `npm run typecheck:clients` failed on canary: src/chat/renderChat.spec.ts(20,1): error TS2591: Cannot find name 'process'. The spec pinned `process.env.TZ = 'UTC'` so its fixed HH:MM assertions stay deterministic on any runner (PR #2057 review). That intent is right; the location was wrong. `process` is a node global, and apps/web's tsconfig sets `"types": []` DELIBERATELY — this is the one client tier that owns document/WebSocket, and admitting node ambient types would let browser source reach for node APIs the bundle can't provide. Adding @types/node to satisfy one spec would have removed that guard for the whole tier to fix a single line. So the pin moves to `vite.config.ts` under `test.env`, which already runs in node context (it imports node:fs/os/path). Browser tsconfig stays pure; determinism is preserved. Verified, both directions: - `npm run typecheck:clients` — green across all client workspaces. - `npx vitest run src/chat/renderChat.spec.ts` — 11/11 pass. - `TZ=Asia/Tokyo npx vitest run …` — still 11/11, with the runner clock showing Tokyo time. That is the real check: it proves the config pin OVERRIDES a hostile ambient zone rather than the suite passing because the machine happened to be on the right one. Pre-existing red, unrelated to the Rust change on this branch — found because a failing typecheck on the front door is exactly the "makes people not want to download" problem. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): the act probe records WHICH verbs ran, not just how many `persona.act.observed` carried `persona`, `room_id`, `tools=<count>`, `chars` — and no verb name. So the substrate could not answer the question Joel actually asks, "are they building anything, or just talking?", from its own telemetry. Measured tonight while trying to: answering it required reconstructing verbs from prose `[action #n] verb(args)` receipts in prompt-captures. Only 5 of 84 live captures contained a receipt at all, so the reconstruction could not be trusted either way — 589 act probes exist over the same corpus, and the two numbers have different denominators. The honest conclusion was "unmeasured", which is the wrong answer for a question this central. A count tells you an act happened. The NAME tells you whether it was work. Adds: verbs = "work/claim,perception/look" the actual batch, in order wrote = true|false did anything in it reach DISK `wrote` is precomputed rather than left as a query-time substring guess, because "did a file change" is the question we keep re-asking and it should be a filter, not an argument. Underscore forms are normalized (write_file → write/file) so the wire dialect can't hide a write. Same defect class as the authorization gate two commits ago: the decision is made, the act runs, and nothing durable records WHAT it was. Both are the observability doctrine's own point — capture the load-bearing decision — missed at the seam that matters most. Compiles clean. Cheap: one map + one any() over a batch that is almost always 1-3 calls, on a path that already allocates the full observation string. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(work): #339 — give citizens the half of the board that WRITES BACK Citizens were offered claim_task / list_tasks / get_task and nothing else. They could take a card and could never finish, hand back, or extend one. Every claim had exactly one possible ending: the 30-minute lease lapses and the card returns to the pool. A COMPLETED card and an ABANDONED card were indistinguishable, because neither could be written back. The verbs were not missing. `work/release`, `work/state`, and `work/heartbeat` are fully implemented, AccessLevel::AiSafe, with descriptions already written — `work/state`'s literally coaches the lifecycle ("in_progress when you start, review when a PR is up, blocked if stuck, closed when done"). They simply never declared `NATIVE`, which is the flag `native_tool_specs()` filters on, so no citizen has ever been shown them. Marked native, with wire-dialect aliases matching the existing snake_case set: work/release release_task work/state update_task, close_task work/heartbeat heartbeat_task, extend_claim Note the mechanism check that mattered: the gate is the per-command `NATIVE` flag, NOT the presence of ALIASES. The three offered verbs happen to have both, which made aliases look causal. Adding only aliases would have shipped another inert change — the exact failure this session has been full of. COST, stated honestly: this grows the native payload 20 → 23 schemas, and tools already take ~28% of a 16k window (#333). That is a real charge against the grounding budget. It is worth it because without these the work loop cannot close at all: we watched card 0c69c0f0 pass through three holders in one evening, each of whom "claimed" it and had no way to say what happened next. Does NOT claim to fix the passing behaviour. Whether a citizen who CAN close a card actually does is now measurable — the act probe two commits ago records which verbs run, so `verbs` containing update_task is the falsifiable signal. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(dialect): #326 — MEET a name that carries its own arguments, don't let it reach the ACL as a URI Joel, 2026-08-07: "It's never upstream and aliases exist for this reason. And even then, we have adapters." He is right, and this file's own doc-comment already said so — "always adapters: meet the model ergonomically, never hardcode around it." The adapter simply never handled this shape. WHAT WAS HAPPENING. A citizen emits `work/list(state=open)` as the tool NAME. The prose tool menu renders exactly that shape (`work/list(claimable?, state?)`), so copying it into the name slot is the trained reflex, not a malfunction. `classify` had no arm for it: MISS, passed through untouched, dispatched AS A URI. The ACL then correctly refused `work/list(state=open)` — no policy can grant a path with arguments welded on. The gate was right. The adapter was asleep. Two citizens read that refusal, reported "no open tasks", and it read as a cognition defect for a week. I spent an evening calling that defect "upstream"; it was ours. THE FIX, at the ONE resolution section every dispatch seam funnels through: split_signature("work/list(state=open)") -> ("work/list", Some("state=open")) classify() resolves the HEAD, so the name lands on the real command (and an alias head composes: list_tasks(state=open) works) normalize_call() recovers the ARGUMENTS — they are real intent and must not be dropped — merging them into `input`, and returns a note so the citizen is TOLD what we accepted and what the canonical form is (Joel's rule #328: aliases resolve AND say so) Explicit `input` always wins over a value echoed in the name, so a well-formed call is never overwritten. `normalize_call` also handles the ordinary case (resolve + tally as before), so each seam makes ONE call — all three ToolCall seams in llm_deliberation_faculty now route through it: native batch, text-lift, and the reasoning-tail lift. Reuses `paren_call_args` (widened to pub(crate)) rather than writing a second arg parser — one grammar, one place. VERIFIED BOTH WAYS. 10/10 tool_dialect tests pass. Then I disabled split_signature to reproduce pre-fix behaviour: exactly 3 fail — the three asserting the NEW capability (signature name resolves + keeps args, alias+args composes, empty signature is a no-arg call) — while the three asserting UNCHANGED behaviour keep passing. Additive, and the regression is real rather than tautological. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(memory): #165 — a rebuild is a discontinuity she can PERCEIVE, not one she has to infer MEASURED LIVE 2026-08-07, and it is the reason tonight's fixes looked like they did nothing. After the #326 adapter fix deployed, `work/list(claimable=true)` returned real cards and ZERO authorization refusals occurred — while citizens went on reporting "attempting to claim tasks or list them without success" for hours. Their receipts were TRUE. They were also about a binary that no longer existed. Correct behaviour, dead world. Working memory is persisted and restored at spawn (persona_workspace.rs:291), so act receipts survive a deploy. That is deliberate and must stay: the recency channel carrying the full trace is what stops the repeat loop — a persona who cannot see her own hands re-emits the identical act forever (engram admit is content-deduped, the reasoning channel is dark by default). Deleting receipts would trade one defect for a worse one. So: don't delete the memory, qualify it. `restore()` already turns discontinuity into a perceivable FACT — the laptop-lid contract renders the interruption gap and names dispatches cut off mid-flight. This adds the discontinuity it could not see: the substrate itself changed. VolatileSnapshot.build_sha — stamped from env!("CONTINUUM_BUILD_GIT_SHA") restore() — if it differs from the running build, record a [rebuilt] fact naming both, saying the results above it are what really happened but are NOT evidence about how things behave now, and that a tool which failed before is worth re-trying A FACT, never an instruction, never a deletion — she keeps the receipt and gains the one thing she had no way to know. What to re-check stays hers. Empty `build_sha` (serde default, pre-field snapshots) says NOTHING rather than guessing a change it cannot see. Tests, both directions: a rebuild across restore renders [rebuilt] naming the old build AND the receipt itself survives (proprioception intact); an unknown build stays silent; and the existing round-trip test now asserts NO [rebuilt] on a same-build restart — cry wolf on every ordinary reboot and the marker stops meaning anything. 24/24 green. Bigger than the citizens: while this was missing, EVERY fix was invisible to the beings it was for until their memory of the old world aged out, and every measurement taken in that window was contaminated. That made it a blocker on verifying anything else, which is why it went ahead of the write path. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(code): probe the WRITE — before/after sizes so a destructive overwrite is visible when it lands The write path is where solved work dies. flask-4045 was solved and then DESTROYED twice, and both times we diagnosed it from PROSE — the persona's own account of what she did — instead of from what actually hit disk. Reconstructing a write from narration is exactly the mistake this session has been full of. code/write now emits `code.write.landed`: path, existed, before_bytes, after_bytes, ok shrank = existed && after < before/2 `existed` + `before_bytes` are the load-bearing pair. "Solved, then destroyed" has a specific shape: a large working file overwritten by a small body — a stub, a fragment, a truncated re-emission. A count of writes could never show that; the sizes make it a one-line query. Cheap: one metadata() stat on a path that is about to be opened for writing anyway. Does NOT fix the destruction. It makes the next occurrence a receipt instead of a third round of inference. Pairs with the act probe's `wrote` flag from earlier tonight: that says a write happened, this says what it did. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(persona): renew held work-card claims on the presence pulse — her work stays hers while she breathes Glass-boxed live tonight from citizens' own prompt captures. A citizen claims a card successfully (work/claim returns a real claim_id), and her very next briefing reads "[board] you hold 0 card(s)" with the SAME card re-offered under "[available work]". So she reports "no open tasks" and passes — accurately describing a board that had quietly taken her work back. Six citizens, two machines, days of it, every one of them an honest witness. Measured on the live #general board: 61 cards, 47 claimed, and ZERO live leases. Every claim on the board they work from had lapsed. Root cause: claim leases are 30 min, and work/heartbeat existed — as a verb the MODEL had to remember to call. No citizen ever did, and no model will; #339's own doc records the card that passed through three holders in one evening for exactly this reason. Meanwhile this runtime already ran a pump emitting "I am alive" every 60s, derived from real serving state. Presence liveness and claim liveness were two channels answering one question, and they contradicted each other: the pump was announcing she was alive on the very ticks her holds were dying. Fix: bind them. The pump that proves she is alive now also renews the claims she holds, at the same cadence, with the same TTL constant (now single-sourced from modules::work rather than duplicated). The substrate OBSERVES that she is working instead of asking her to announce it — "you've turned convenience into disability" (Joel, on exactly this class). The verb stays for deliberate extension. Renewal is per-card WARN-and-continue: a failed renewal degrades to precisely the old lapse and can never take down presence. A persona.claim.renewed probe carries renewed/held/ttl so the next lapse is visible instead of silent. Note this only keeps LIVE claims alive; it deliberately does not resurrect the lapsed ones already on the board. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(work): stop advertising cards work/claim refuses — one claimability decision, not two Found by tracing the board projection after the claim-renewal fix. `work/claim` rejects Review | Merged | Closed outright (airc-lib → WorkCardNotClaimable), but every READ surface computed availability independently and excluded only Merged|Closed. A `Review` card with a lapsed lease therefore answered "claimable" and could only ever produce a refusal. Measured on the live #general board 2026-08-07: 11 of the 58 cards offered to citizens as available work were Review — guaranteed bounces, and a citizen has no way to tell a substrate refusal from her own incapacity. One of them said exactly that tonight: "attempting to claim tasks without success." Two places decided claimability and disagreed: CardHolder::claimable ("lapsed or Open") and room_board_source's inline filter (its own terminal-state check). Both missed Review. Collapsed to ONE predicate — card_holder::claimable_now, composing the lease (hold_of) with the column (refused_by_claim, which names the write-side rule and carries the drift-guard doc-link to airc-lib). room_board_source now calls it instead of re-deriving. Regression test asserts all three refused states are never advertised, with a fixture-sanity assert (the lease really is lapsed) and a positive control (a lapsed claim on InProgress work stays takeable — the reclaim path #321 depends on it, and without that control this test would pass even if the guard excluded everything). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(persona): the board read takes the room the gate approved — one value, not two that coincide (#345) RoomBoardSource binds a room (`for_room`) and gates on it, then read the board via airc's `work_board_complete()`, which resolves `current_room()` independently — "whatever my default subscription happens to be". The gate's id was never passed to the read. They agreed only because both were seeded from the same call at bootstrap. Nothing in the types prevented a gate that passed for room A while the board came from room B, and no probe would have fired. Found while tracing why a citizen's board (58 claimable) and the operator's (19, all Open) disagreed — they were two different rooms, both reads correct, and NEITHER surface named the room it read. That cost three agents and most of a night, which is the real cost of a value that is implied instead of passed. RoomBoardReader::work_board now takes Option<RoomId>: Some(id) → resolve via airc room_by_channel + project THAT room's board. A room this scope isn't subscribed to is a loud NotSubscribed error, never a quiet slide to the default: a citizen handed the wrong room's board cannot distinguish it from an empty one, and that indistinguishability is the entire bug class. None → unchanged current-room behaviour, for callers with no binding (the CLI's genuine intent). Requires airc 278addc..8dcfa76 (pin bumped, rationale in Cargo.toml): the room-parameterized read was already written but private, and RoomId→Room needs a real subscription lookup — Room carries name+wire+channel and cannot be synthesized from a bare uuid. 1023 persona tests green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(work): lead each card with `claimable`, not `state`/`owner` — the tool result was still saying "taken" serde emits in declaration order, so a citizen reading a work/list card met `"state":"claimed"` and `"owner":"Anwen"` BEFORE `"claimable":true`. Two loud fields saying someone owns this, then one quiet field saying you can have it. Live tonight, hours AFTER the lease fix (claims now renew) and the claimability fix (11 unclaimable Review cards removed, 58->47 verified): Benchy could finally see the board and reported — "there are several tasks available on the board, but they have already been claimed by others." Every card he was looking at was his to take. He read the receipt correctly; the receipt led with the wrong fact. #321 fixed the BOARD rendering so a lapsed claim reads CLAIMABLE. It never reached the TOOL-RESULT rendering — two surfaces answering one question, drifting independently, which is the same shape as the read/write claimability split fixed in 59cbbb735. This file already declares field order load-bearing for WorkListResult (truncation); the same logic governs what a reader meets first. Order is now: id, title, claimable, lease, state, owner. Answer the question the citizen is asking ("can I take this?") before the history ("who had it?"). owner still names WHO — never "someone" — it just no longer pre-empts the answer. 184 work tests green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): a citizen who ACTS must not go blind to what she is acting on (#347) Standing framing was destroyed twice over, independently, and either alone was enough to blank a citizen's board. 1) DEFERRED LANE MULTIPLIED AWAY A FLOOR DOCUMENTED AS UN-EVICTABLE. reproject_to_now scaled every last-good bid by lexical_relevance — the fraction of the FINDING'S OWN tokens present in this turn's burst. The denominator is the block's size, so verbose sources are structurally penalised regardless of importance. room-kanban (median offer 5,364 tokens) bid 0.9 x 0.133 = 0.12. Roster (small) survived at 0.62; workspace-map bid its full 0.90 solely because it is not defer_tolerant and never passed through. Three sources, three numbers, one cause. Reprojection is a RECALL mechanism ("a still-on-topic memory keeps its salience"); standing framing is topic-independent BY CONTRACT. Stable contributions now keep their bid; staleness still shows in the reasoning. 2) POSTACTION DELETED ALL STANDING FRAMING BEFORE TOP-K. SituationFocusArbiter filtered `!c.stable` on any tick after >=1 act. But Contribution::stable is documented as "a SERIALIZATION-order property, not an attention one — salience still governs which contributions are included". The arbiter used the one field that promises it never decides attention to decide attention. Its own comment named the intent — drop standing SOCIAL re-grounding so "the result + AFFORDANCES + working memory own the window" — but `stable` is every standing source, so it deleted the affordances it named (workspace-map, the highest bid present at 0.90), the work board, and the roster. The old test's rationale was "they were already perceived; re-dumping crowds the result out". That premise is false here: every settle iteration composes a FRESH prompt (act_observe holds `world` constant, only memory changes), so framing dropped at iteration 2 is ABSENT from iteration 2, not remembered from 1. MEASURED: Atlas held card 4780a02e on a healthy renewing lease and his turn carried no board at all — evicted set exactly the three StandingFraming sources, kept set exactly the two volatile ones, while a 0.90 bid lost to a 0.50, which top-k cannot do. He then reported "no open tasks", accurately, about a window we had emptied. Test inverted to pin the corrected invariant; the real constraint it was reaching for (don't pay full freight for unchanged context) is #167's job and needs its own signal, not a borrowed serialization flag. 3) FIXED A PRE-EXISTING RED (verified pre-existing by stashing: same 9348). `needed <= window` failed on its own terms — its message said "if it no longer does, the surface or framing grew" and it had: 8040 -> 9348 (+1308) as turn-facts accreted. The story is stronger, not broken: at 8192 the agentic surface no longer fits AT ALL, so the necessary condition itself fails. Re-pinned as a CEILING (9400) so the next +1308 fails loudly instead of accruing silently — #333 stated as a number rather than a complaint. 918 cognition tests + 1023 persona tests green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): benchmarks as work cards — and the adapter seam ALREADY EXISTS (#346) Design approved by Joel 2026-08-07: "each new benchmark is just an adapter problem… our personas get to operate as they're trained, even allowing for easy N persona collaboration" / "so they're measured for what they do". THE FIND THAT CHANGES THE SCOPE: I was one file away from writing a second BenchmarkAdapter trait. `cognition/benchmark.rs:89` already has one — with a registry, DatasetSpec, BenchResourceHint for grid placement, tasks() -> EvalTask, and grade(task, outcome) where TaskOutcome already carries BOTH artifact channels (spoken answer AND workspace diff). Its own doc states the goal verbatim: "the runner + grid + learning loop treat every adapter identically." So "each benchmark is just an adapter" is ALREADY TRUE. #346 is not an abstraction to build; it is a DELIVERY bridge: mint a card per EvalTask into a benchmark room, let citizens claim and solve through the path they already use, feed each TaskOutcome to the adapter's grade, write the verdict as the terminal state. Caught by grepping before building ([[grep-for-the-mechanism-before-proposing-to- build-it]]); the doc now says DO NOT REBUILD IT in as many words, with a built/missing table so the next reader cannot repeat my near-miss. The doc also records WHY a card beats a headless call (it yields a TRAIL — claimed_at -> first write -> state transitions -> artifact diff — which cannot be narrated into existence, and our measured failure mode is exactly narration), the grading boundary that must not blur (card carries delivery + lifecycle; harness keeps judgment; a citizen never sets her own terminal state on a graded card), and the three defects fixed tonight without which this is silently unusable — chiefly that claims did not survive the work at all: 172 claims and ZERO renewals in that room's entire history, so a long solve was guaranteed to lose its card mid-flight. Blockers named with exact locations: #220 (deliberation_parse maps an UNRECOGNISED generation to Decision::Pass, so a correct prose answer scores 0 — fix at the parser, and do NOT break #271's silent narrated pass), exam integrity (#207), and room scoping (now safe via #345). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(test-fixture): PIN HOME/USERPROFILE/HF_HOME, never remove — removing moved the read onto the operator's real drive Reported by BigMama: three model_registry tests fail ONLY on machines with cold storage. The cause is worse than an unset variable. `with_test_home` did `remove_var("HF_HOME")`, which LOOKS hermetic. But `huggingface_cache_root` (artifacts.rs:374) resolves: std::env::var("HF_HOME") <- fixture removed this .or_else(|| config_env::read("HF_HOME")) <- so it falls through to a REAL FILE `config_env::read` hits `~/.continuum/config.env` on the actual machine — which on a cold-storage box is where the installer writes the 16TB path. So the fixture did not isolate the test; it moved the read one layer DOWN onto the operator's drive, and the test then asserted against whatever that machine happened to have. Same shape for USERPROFILE: `config_env` resolves through `dirs::home_dir()`, which on Windows ignores HOME and uses USERPROFILE — removing it let the lookup escape to the real profile. Fix: PIN all three to the test home. Process env WINS the resolution chain, so config.env can no longer be consulted at all, on any platform. HF_HOME is pinned to exactly what the default branch would compute from this home (`<home>/.cache/huggingface`), so behaviour is identical to the intent — only the ambient dependency is gone. The restore side already saved/restored correctly and is unchanged. The general rule, and it is the same one BigMama drew from her own miss tonight (never let a pipe carry the verdict): REMOVING an input does not isolate a test, it just changes WHICH ambient source answers. Pin it. 44 model_registry tests pass here (same count she reported). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): the reserved PASS token is silence in every position she puts it (#271/#264) Left unfixed on 2026-08-06 at n=1 with an explicit note in the code that it wanted "a second sighting or Joel's call, not extrapolation from n=1". The second sighting arrived tonight as EIGHT messages inside one monitor window, from THREE citizens in #k3-serving — "I will proceed with PASS", "I will PASS and continue to monitor", "I will proceed with PASS for now". Every one posted to the room as speech, and each one re-wakes the next peer into announcing THEIR pass. That is the #264 cascade, arriving through a position the collocation list structurally cannot cover. The fix is a POSITION rule, not another phrase. This file's own history is the argument: phrase/length tuning is an arms race the next filler message wins (500 → escaped by 11 chars → 700 → escaped by 14). ends_with_silence_token → declares_silence_token, one authority honoring the reserved token in the three positions observed live: 1. final word — "…Otherwise, PASS." (already honored; unchanged) 2. clause-initial — "…Otherwise, PASS for now…" (the n=1 variant, now covered) 3. first-person decl. — "I will proceed with PASS to…" (tonight's eight, now covered) Discriminators kept narrow and decidable: case-SENSITIVE on the reserved spelling (ordinary lowercase "pass" stays speech), standalone word only (PASSED / BYPASS / PASS_TOKEN never match), and the fence guard stands — fenced content is substance regardless. Accepted trade, stated so it is a choice: an uppercase PASS as a transitive verb inside a first-person declaration would silence. Nobody writes the verb in caps. Tests carry the live fixtures verbatim plus a POSITIVE CONTROL asserting the position-3 cases are covered by POSITION and nothing else — is_narrated_pass must NOT match them and the final-word rule must NOT match them — so this cannot later pass for the wrong reason. Negative controls added for prose ABOUT the token and for the word-boundary cases. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): narrow the PASS-token rule — drop clause-initial, it swallows real answers (#220) Self-review of a7f38f588 before it could bite. That commit honored the reserved token in THREE positions; this removes one of them, and the reason is the whole point. My evidence last night was n=8, and every one of those eight was the FIRST-PERSON DECLARATION form ("I will proceed with PASS", "I will PASS and continue to monitor"). The clause-initial position rode along on that evidence while still resting on its own n=1 — and unlike the declaration form it collides with real answers: "Verdict: PASS for all six cases." <- a VALUE REPORT, must speak "Otherwise, PASS for now as I…" <- a TURN YIELD, should silence Positionally identical, semantically opposite. Silencing the first is exactly the #220 failure — spoken becomes None and an answer-graded benchmark scores 0 on a CORRECT response. This file's own doctrine settles it: fail open to Speak, because silencing real content is the worse error. The declaration form has no such collision ("I will proceed with PASS" can never be a value report), which is why its evidence justifies shipping and clause-initial's does not. That variant goes back to speaking — the status quo it was already deliberately left in — until it has a rule that can tell the two apart. Tests gain a "the line we chose not to cross" block asserting the value-report shapes stay speech, so a later "let's complete the position set" cannot silently swallow benchmark answers. SEPARATE PRE-EXISTING DEFECT, found while writing that block and NOT caused by either commit: `"Verdict: PASS for all six cases."` is silenced TODAY. `clean_response`'s speaker-name stripper is `^[A-Z][A-Za-z\s]+:\s*`, which eats `Verdict: ` as though it were `Anwen: `, and the exposed leading `PASS` then trips `starts_with_silence_token`. Any answer opening with a capitalised label — `Answer:` / `Result:` / `Verdict:` — followed by the token is swallowed. Documented at the test so the next reader finds it; fixing it is its own change with its own evidence, since narrowing that regex touches all speech cleaning. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): silence gets a VERB — yield_turn replaces the prose phrase-matching (#271/#264) Joel, 2026-08-07: "Regex ideas and string matches for semantic understanding is not good for reliability." He is right, and the objection lands on code I shipped an hour earlier. Decision has four variants and the tool channel could express exactly ONE of them. Act gets its vocabulary from the command registry because acts ARE commands. Speak is prose. Pass had no structured expression at all — the only way a citizen could decline a turn was to emit a magic word into her prose and hope the parser recognised the sentence she wrapped it in. That asymmetry is the actual defect behind every fix in this family. Instruction-tuned models naturally wrap the token in a sentence, fall off the protocol, and each previous fix compensated with a cleverer matcher: a phrase list, a 500-char cap beaten by 11 chars, a 700-char cap beaten by 14, and finally my DECLARATION_LEADS list which would have been beaten by "my choice is PASS" next week. THE REGEX WAS NEVER THE DISEASE. It was scar tissue around a missing channel. So Pass gets a verb. `yield_turn` is offered on the same native tool channel the citizens already use correctly — measured, not hoped: one citizen's first post-reboot turn tonight was three correct native calls (claim_task, update_task, list_tasks). They use the structured path fine when we give them one; we never gave them this one. Recognising `yield_turn` is a NAME match on a verb we defined — protocol decoding, the same category as write_file or a JSON fence. Recognising an intention inside a sentence is not. That is the whole distinction, and it is why this replaces the matcher rather than joining it. Shape (Joel's call on the fork): FACULTY-OWNED verdict verb, not a registry command. The faculty is what turns a generation into a Decision, so it owns the vocabulary for the decisions it can reach. Appended to the ONE derived offer surface (never a parallel one), and intercepted before act_verdict on both lift paths — a yield carries no world-effect, so it never reaches the ACL or the executor, and routing it as an Act would burn budget and re-enter the settle loop instead of ending the turn. Argument-free schema on purpose: a `reason` field would invite the exact closure paragraph the verb exists to stop her broadcasting (#334's degeneration shape). Removed with it: DECLARATION_LEADS, and the clause-initial position from the commit before. What remains in deliberation_parse is only the bare-token compatibility path for a model that does not use the tool channel at all. The now-speakable shapes are pinned as MUST-SPEAK fixtures with the reasoning, so nobody "completes the position set" later and starts swallowing correct benchmark answers (#220). Surface cost stated plainly as the #333 ratchet demands rather than waved through: +144 tokens (9348 -> 9544), ceiling re-pinned 9400 -> 9600. Almost all of it is the description, which is the part that teaches her silence is free and the announcement is the noise. One avoided cascade pays for it many times over — the 2026-08-01 one ran ~30 minutes across every peer. Reachability is asserted, not assumed: the test fails if the verb is absent from the OFFERED list, because a verb that is built, correct and unoffered would be this same bug in a new hat ([[green-by-every-check-is-not-evidence-of-reachability]]). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): instrument #349 instead of refactoring the hot path on a hypothesis I was about to fix the label-stripper. Stopped, because I could not answer the one question that decides whether the fix is worth its risk: has it ever actually cost us an answer? The MECHANISM is verified. `clean_response`'s speaker-name stripper is `^[A-Z][A-Za-z\s]+:\s*`, which eats a content label — `Verdict: ` / `Answer: ` / `Result: ` — exactly as if it were `Anwen: `. When the reserved token sits behind that label, the strip exposes it to starts_with_silence_token and a correct answer becomes a silent Pass: the #220 shape, a 0 on an answer-graded benchmark for a right response. What I do NOT have is one live sighting. "Verdict: PASS for all six cases." is a fixture I wrote. And the correct fix — thread the real speaker names (Turn::author already carries them) so the pattern stops GUESSING at what a name is — changes cleaning on EVERY turn, across 2 signature changes and ~25 call sites. Refactoring the universal speech path on an unobserved failure is the same error as tuning a phrase list: confident motion on unmeasured ground. Tonight already taught me that lesson once. So: the instrument, not the fix. `label_strip_caused_silence` notices when a turn became silence ONLY because a prefix was stripped — cleaned text leads with the token, the raw generation did not. Pure observation, zero behaviour change, one probe class. If it never fires, #349 is theoretical and the refactor is not worth its blast radius. If it fires, the probe carries the verbatim answer we lost, and the refactor is justified by data instead of by my argument. Either way the next person decides from evidence. The detector is pinned in BOTH directions, because a probe that can only stay silent is worse than no probe: it must fire on the #220 shape, and must NOT fire when she genuinely led with the token, when silence came from an empty think-block, or when an ordinary name prefix was stripped from ordinary speech. That is what makes a future zero mean "does not happen" rather than "instrument was broken". Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(serving): the lane was never down — readers could not tell BOOT from BROKEN (#350) I reported "~30% of every citizen's thinking attempts fail" and aimed a night at the serving layer. The serving layer was healthy the entire time. Correcting that here, with the measurement that killed my own hypothesis. WHAT THE DATA ACTUALLY SAYS: serving.reconcile published active=<none>: 0 times in 12h (104 reconciles, all ready) personas saw "serving: <none>": 61 times in the same window Those cannot both describe a lane that went down. They describe readers not reading the daemon's snapshot at all. ROOT CAUSE: `install_serving_state` runs in the daemon's `initialize()` — BEFORE its first reconcile — so from process start until the first publish every reader borrows `ServingSnapshot::empty()`: `active_model: None, ready: false`. That is byte-identical to "the daemon looked and nothing is serving". Personas begin self-ticking immediately, read the placeholder, and the single-resident guard CORRECTLY refuses — emitting a loud `selftick.inference_failed` naming a fault that does not exist. Clustering proves it: 116 failures in 38 bursts across 3 days, each burst 1-6 failures over 0-20s, and in nearly every one the first `serving.reconcile` lands 10-20s AFTER the burst began. It is a BOOT RACE. It self-heals in seconds. The real cost is a citizen losing her first 1-3 ticks after each restart — and an instrument that cried wolf 116 times. AND THE CORRECTION TO MY OWN HEADLINE: I claimed the 29/31/32% rate across 1h/3h/12h proved it was not my reboots. The ratio was right; the reading was wrong. It is flat BECAUSE restarts are spread across every window (38 of them over 3 days). Steady-state thinking is fine. A stable ratio is not evidence of a steady-state cause. FIX — give the readers the fact they were missing, don't teach them to guess: - `has_reconciled()` / `mark_first_reconcile()`: a process-lifecycle OnceLock beside the existing SERVING_STATE OnceLock. After the daemon's first publish, an empty snapshot means a real fault; before it, it means "still starting". - self-tick SKIPS with its own probe class (`persona.selftick.awaiting_serving`) instead of spending a full deliberation on a turn the guard is certain to refuse — and stays OUT of the failure counter, so a future spike in `selftick.inference_failed` means what it says. - the adapter's refusal names which situation it is, instead of one sentence for both. WHY NOT A FIELD ON ServingSnapshot (my first instinct, and what I proposed): that type is ts-rs-exported, read by the grid and positron, with 19 construction sites. "Has the daemon started" is a process-lifecycle fact, not a property of what is currently served, so it belongs beside the other process-lifecycle OnceLock rather than in the wire payload. Promoting it later is mechanical if a remote reader ever needs it. This is the third instrument this session that reported the wrong thing — #348 under-reports failure, #351 over-reports it, this one mislabels startup as failure. Between them they have now cost more engineering hours than the faults they were pointing at. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(serving): a lane going down is a TRANSITION, not a fault — gate on live readiness, not a lifetime latch (#350 round 2) My first cut of this gate was boot-shaped and therefore wrong. It skipped the self-tick only until `has_reconciled()` — a process-lifetime OnceLock — flipped once. Measured on the very next boot: three citizens (Benchy, Anwen, Asha) still failed together at +432s, on a core whose latch had been set at +76s. The ordered sequence says why. At +382s the health heartbeat declared the lane wedged (`serving.health action=relaunch`, #175 self-heal), which calls `declare_lane_wedged` → `send_replace(ServingSnapshot::empty())`. The reconcile that closed it landed at +441s. The three failures sat inside that 59-second window, reading `serving: <none>, ready: false` and reporting it as a serving fault the personas had caused. So `<none>` is NOT a boot-only state. `serving_daemon` republishes `empty()` on EVERY lane teardown — no servable plan (:1165), a re-home (:1400), a wedge self-heal (:1790). Boot is merely the longest such window, which is exactly what made a boot-shaped fix look like it had covered the class. The comment I shipped yesterday asserted the daemon "published active=<none> ZERO times in 12 hours"; that count had no probe on those three publish sites. Corrected in place rather than left to send the next reader down it. The fix uses the reader that was already correct next door: the presence pump derives Ready/Away from live `current_serving().ready` on every heartbeat (airc_runtime.rs:549). A mind that presence has just marked Away must not simultaneously spend a deliberation into a guaranteed refusal. Same signal, one call. - service_loop: gate the self-tick on the LIVE snapshot's `ready`, not the latch. The probe keeps `has_reconciled()` as a FIELD (`served_before`) — it still separates a cold boot from a lane that has served and dropped, which the empty snapshot cannot say on its own (`empty()` erases `ready_verified_at_ms`). - openai_adapter: the refusal now names three situations instead of two. Never reconciled → STARTUP, retry. Reconciled but nothing resident → TRANSITION, retry. A DIFFERENT model resident → the mismatch wording, which stays loud because retrying cannot fix it. Extracted as a pure `unguaranteed_model_refusal` so all three branches are testable without touching the set-once SERVING_STATE (test order must not be load-bearing). Deliberately NOT added: a second clock in the persona deciding when "down" becomes "an outage". The serving daemon already owns that judgement and emits it loudly; re-deriving it on the hot path would be a parallel monitor of a fact its owner publishes. 3 new tests, each with what-this-catches. The transition test is discriminating: under the old two-way split a reconciled+empty snapshot produced exactly the "is not the active served model" string it now forbids. Validated: cargo test serving (125 passed), llama_server (29), the 3 new; deployed and the running binary confirmed to carry the new wording by inspecting the mapped inode's strings, not the version banner. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(serving): a 503 "Loading model" is the SAME mid-relaunch wait as a refused connection — retry it (#350 round 3) Found by watching the round-2 fix live rather than trusting it. Five minutes after deploy, during a re-home that grew the window 16384 → 27136 → 32768, four citizens failed together: +3.3m serving.health {ok:false, consecutive:1} +3.3m persona.selftick.inference_failed Atlas "stream read error: error decoding response body" +3.3m persona.selftick.inference_failed Benchy "503 Service Unavailable: {"error":{"message":"Loading model..." +3.3m persona.selftick.inference_failed Anwen (same 503) +3.3m persona.selftick.inference_failed Asha (same 503) +3.5m serving.reconcile ready=true served_window=32768 The round-2 readiness gate behaved correctly here and let these ticks through: the published snapshot genuinely said `ready`. It is a CACHED CLAIM — its own doc comment says so — and the lane had already been relaunched underneath it. So this is a THIRD signature of the one state "the lane is mid-relaunch", and the retry arm only ever recognised the first: nothing listening yet → reqwest connect error → RETRIED (existing arm) listening, still loading → HTTP 503 → hard failure (this fix) A relaunching llama-server refuses connections only until the new process binds; from that moment it accepts and answers 503 while it mmaps weights and warms the backend. Same wait, same lane, opposite handling. Fix: a 503 from a SINGLE-RESIDENT local lane retries on the same bounded backoff as the connect arm, sharing one counter so the total wait stays bounded. The HTTP status alone is the signal — no sniffing the body for "Loading model"; the status IS the structured channel ([[a-string-matcher-for-a-semantic-judgement-means-a-channel-is-missing]]). Renamed `connect_retries` → `relaunch_retries` so the name matches what it now counts, and the exhaustion message with it. Not unit-tested, and saying so plainly: the guard is inline in the send loop and testing it honestly needs a mock HTTP server, which is a bigger change than the fix. Validation is live — expect `inference.lane_relaunch_retry {reason: "503_loading"}` on the next re-home with no accompanying `selftick.inference_failed`. cargo check clean; deployed and the running binary confirmed to carry it by inspecting the mapped inode's strings. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(serving): a lane torn down MID-DELIBERATION must be waited out, not refused (#350 round 4) Round 3 shipped the self-tick readiness gate and I called the residual verification passive. It wasn't. Measured on the probe stream today, on the round-3 binary: +374.2s serving.health "flipped serving snapshot not-ready" (#175 wedge self-heal) +427.4s x3 selftick.inference_failed "no model is resident right now" +436.6s serving.reconcile ready=true Three citizens refused NINE SECONDS before the lane came back, and `persona.selftick.awaiting_serving` fired ZERO times across the whole window. The gate is not broken — it is upstream of the problem. It reads the snapshot BEFORE a deliberation that takes tens of seconds, so a teardown that starts mid-deliberation always outruns it. The gate stops a turn that was doomed at its start; nothing stopped one that was overtaken in flight. The fix is at the seam that actually fails. The adapter's pre-flight guard treated EVERY failed guarantee as terminal, when only one of them is: - settled mismatch — another model is ready and active. Waiting cannot change that; residency arbitration is the serving layer's job (#109). Refuse, loudly. - transition — nothing resident (`empty()` is republished on every teardown: no servable plan, a re-home, a wedge relaunch), or a lane up but not yet decode-ready. Nothing has failed; it comes back on its own. Transitions now wait on `await_ready_serving` — the mechanism already existed and already had fifteen callers (the boot gate, the eval lane, the embedder, the genome teacher); this seam was the one that refused instead of waiting. It is the daemon's own readiness watch: a push, not a poll, so it returns the instant the relaunch lands and costs nothing while it waits. Budget is `DEFAULT_SERVING_WAIT` (= READY_TIMEOUT + 30s), DERIVED from the spawner's own load budget so this can never declare failure before the daemon has exhausted its legitimate window. Bounded, so a lane that never returns still ends as a named refusal, never a hang. Also collapses a predicate that had quietly forked. "A lane is live" was spelled `ready` in the self-tick gate and `ready && active_model.is_some()` in `await_ready_serving` — and the shorter spelling passes a snapshot with no model to answer as, which is precisely the case the gate exists to stop. Now one `ServingSnapshot::is_live()`, three readers. Tests (in the existing nested mod, no new mod): the wait-vs-refuse split pinned case by case (empty / warming / settled-elsewhere), and the guarantee predicate incl. both #106 vision arms. 5 pass. Deployed and confirmed present in the running binary by strings. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(observability): boot took the UNBOUNDED probe sink — the rotating one had zero callers (#341) `JsonlProbeFileSink::from_env` is documented as "the ONLY env-based entry point — rolling mode, structural auto-clean, bounded disk usage". It has exactly one caller, and that caller is a test. Boot goes through `tracing_init::build_probe_file_sink`, which called `JsonlProbeFileSink::new` — the constructor whose own doc says "append-only, no rotation, grows unbounded. Use `new_rolling` for production captures." So the bounded path was built, correct, tested, and reached by nothing, while the highest- volume writer in the substrate (one JSON line per load-bearing decision across every tokio task) accumulated 133 MB at ~32 MB/day. Ten lines above it in the same function, the fmt log was already going through `CappedAppender`. Two writers side by side, opposite bounding. This is the 172 GB class — the log that took this host to zero bytes free — and it is also the [[green-by-every-check-is-not-evidence-of-reachability]] shape: every unit test passed, because they tested `new_rolling` directly. The card's stated mechanism was wrong, and worth recording: it blamed `CONTINUUM_PROBE_DIR` holding a file path. That value IS wrong and is fixed too, but it was not the cause — even with a correct directory, boot would still have taken `new`. The env-var shape was a red herring; the call site was the bug. - `build_probe_file_sink` → `new_rolling(dir, classes, DEFAULT_MAX_LOG_FILES)`. Disk is now bounded arithmetically: 8 MiB × 7 generations = 56 MiB, the same shape as the fmt log. - `ProbeTracingConfig.probe_file` → `probe_dir`. The env var was always named `..._DIR`; the field said file, and that mismatch is what let the wrong constructor look right. - A file path where a directory belongs now fails with a message naming the remedy instead of a bare `NotADirectory` — the substrate refuses to start rather than drop probes ([[fallbacks-are-illegal-fail-loud]]), so the error has to be actionable. Test asserts at the CONSUMER's boundary — that `continuum-probes.jsonl` appears on disk, a name only the rolling path produces — not that a constructor was called. Verified RED by reverting to `new` (it fails) and GREEN again after restoring. Deployed. `~/.continuum/config.env` updated to the directory (not in this repo); live capture now lands at `~/.continuum/probes/continuum-probes.jsonl` and the old 134 MB `probes.jsonl` is frozen in place as a historical capture — the #350 baseline lives in it, so probe queries spanning today must read both. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(runtime): the dispatch audit counted adapter-served commands as orphans — 3 alarms, 2 bogus (#325) `registry.dispatch_parity` fired ERROR on every boot naming three ADVERTISED-BUT- UNDISPATCHABLE commands. Two of them — `perception/observe`, `interface/screenshot` — are `WireShape::Provided`, whose own doc says: "the substrate CANNOT execute it; it routes the call OUT to a client adapter... a different *server* (adapter, not ServiceModule)". A Provided command therefore has NO module. It can appear in neither `command_objects` nor a prefix route — not as a bug, as a definition — and the remedy the probe advertises ("add each to its module's `commands()` vec") is impossible to apply: `interface/mod.rs` has no `commands()` at all. The audit was checking a NARROWER path than the one that runs. Live dispatch goes through `Runtime::route_command`, which also consults the `ProviderRegistry`; `ModuleRegistry::route_command` does not. So these commands were healthy and reported broken. Two costs, both paid every boot: 1. An alarm that is mostly wrong trains its readers to skip it — which is how the ONE real orphan in that list went unnoticed. With the false positives gone the count is 1, and it names `generate/module`. That is the finding this fix was blocking. 2. The stated hardening was unreachable. The comment says "promote to a boot refusal once the count holds at zero across the fleet." A structurally-unroutable class in the count means zero is unattainable — and promoting anyway would have REFUSED BOOT on a legitimate adapter-served command. Fix: skip `WireShape::Provided` descriptors. Their routability is the ProviderRegistry's concern, already checked at call time with a fail-loud that names both the command and the missing adapter — pinned by the existing `provided_command_fails_loud_without_a_provider`. Test asserts on a registry with NOTHING registered — the audit's worst case, where every module-served command IS an orphan — and derives the Provided set BY SHAPE from the registry rather than a hand-kept name list, so a newly-added adapter command inherits the guarantee. It carries a positive control (the registry must contain at least one Provided command, else the test proves nothing). Verified RED by removing the filter, GREEN after restoring. Live after deploy: dispatch_parity count 3 -> 1, orphans ["generate/module"]. This also CONFIRMS #325 as originally filed. I set out to correct its "missing adapter" diagnosis and the correction was wrong — the adapter really is what is missing; the fail-loud naming eye-node is by design. The defect was one layer down, in the thing reporting on it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(runtime): register GeneratorModule — the one REAL orphan the audit was reporting all along (#325/#309) With the Provided false positives gone (8f89472c2), the dispatch-parity audit named exactly one command: `generate/module`. It was right, and it had been right for as long as the probe has existed — nobody could see it under two bogus siblings. Nothing was wrong with the command. `GenerateModule` is a correct dep-holding typed command and IS in `GeneratorModule::commands()`. The module itself was never registered: `grep` finds `GeneratorModule` in the whole crate only inside doc comments. So `generate/module` was advertised in `commands/help`, in did-you-mean suggestions, and on the persona tool offer while nothing on the runtime could route it — the exact #309 class, still live, months after #309 shipped the detector for it. One line, next to the other Background modules, ahead of `runtime.initialize()` (which is where the audit runs). Live after deploy: dispatch_parity emits NOTHING. The probe fires only `if !orphans.is_empty()`, so silence IS the zero. Sequence across three boots: 3 -> 1 -> 0. That silence-on-success shape cost me two misreads worth recording, both the same mistake in different clothes: I first "verified" the binary by grepping for a COMMENT (Rust does not compile comments into binaries, so the check could only ever say no), then read `tail -1` of the probe file as the current boot when it was the previous one. An absent signal is invisible unless you measure it against a timestamp — which is what finally settled it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(experience): recipes load from disk — an activity is authorable without a compiler (#274) The module header has always promised "a new experience is a new recipe entry, **zero code**." It was not true. The four experiences were `include_str!`'d into a fixed array, so a fifth meant editing Rust, recompiling and redeploying. A comment sat where this loader now is, saying a loader "will later" read a recipes directory. That deferral is the gap between "recipe/activity == airc room" as an idea and as a substrate. If authoring an activity needs a compiler, nobody authors one — they hand-make a room instead, and a hand-made room has no recipe and no purpose. That is how a bring-up room for a single model was still holding citizens two weeks after its activity finished: there was no other way to make a room. - `builtins_with_overlay(purpose, dir)` — the embedded set as a FLOOR, every `*.json` under `dir` overlaid on top. Overlay semantics are the ones `new()` already had: later wins by purpose, so an on-disk `chat.json` replaces the embedded one instead of colliding. - Embedded recipes stay in the binary so a fresh clone works with zero files. - Sorted load order, so two nodes reading the same directory pick the same winner for a duplicated purpose. - A missing directory is not an error (no local authoring yet is the ordinary state of a fresh install). A malformed recipe IS an error, NAMED BY FILE — an author who saved a recipe believes it is live, and a silently-skipped one is indistinguishable from one never written. Tests: an experience authored purely on disk (`kitchen-design`, a purpose this binary has never heard of) projects like any built-in and does not displace the floor; a malformed recipe fails loud naming its file; a missing directory is fine. NOT in this commit, deliberately: nothing expires, archives or deletes anything. A room is the durable record of its activity — a benchmark run's room IS that run's evidence, and a room that disappears on its own destroys it. Lifecycle is verbs a person or citizen invokes, never a timer. Those verbs are the next commit. Also: dropped a retired room's name from a doc comment in the persona runtime; the lesson it records (a persona's home comes from HER durable membership, never the operator's focus) is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(activity): activity/spawn — a recipe becomes a room (#274) From ten thousand feet: a recipe is a CONTENT-TYPE and a room is CONTENT. Register the type once, stamp out instances forever. Every collaborative surface is content of some type — a chat, a DM, a doc tab, a benchmark run, a game someone asked for, a settings pane, a SCADA tab — and the room is the coordination layer everything else hangs off. The manifest layer could project a recipe. airc could host a room. NOTHING JOINED THEM, so rooms got made by hand — and a hand-made room carries no recipe and no purpose. That is not hypothetical: a bring-up room made by hand for one model was still col…
joelteply
added a commit
that referenced
this pull request
Aug 8, 2026
…ures become lessons) (#2163) * chore(repo): clear persona scratch out of the repo root, and stop apps/desktop lying about where the UI is Two complaints, both Joel's, both about what a person sees when they clone this: clutter, and misleading claims. This addresses the tracked-file half of each. ## 1. Persona scratch quarantined (nothing deleted) Until #49 (per-persona workspace isolation) lands, a persona's file engine roots at the PROCESS CWD — the repo root — so her card work landed next to Cargo.toml and got committed. 31 files, all 2026-07-18, now under legacy/persona-exercises/ with a README explaining what they are and why they were where they were: string_reversal/ wordstats/ work-wordstats/ (crates) teamproof/ (8 algorithm exercises, was tmp/) loose-files/ (8 bare files that sat at the ROOT: main.rs, life.rs, game_of_life.rs, reverse.rs, string_reversal.rs + 3 .txt inputs) A bare `main.rs` beside the workspace `Cargo.toml` was the first thing a cloner saw. They are KEPT, not deleted: this is the first genuine persona-written code in the project, and the evidence that the act->observe circuit actually closed. Verified unreferenced before moving: zero hits across .rs/.ts/.md/.toml/.sh for teamproof, string_reversal, work-wordstats outside their own manifests. ## 2. The workspace `exclude` fence was decoration exclude = ["wordstats", "work-wordstats", "conway_game_of_life", "work-08ece9e8"] Its comment claimed it "keeps their in-dir cargo builds working". It never did — those crates declare `edition.workspace = true`, and an EXCLUDED package cannot inherit from the workspace root, so cargo inside them has always failed with "failed to find a workspace root". Confirmed by running it. `members` is an explicit list (not a glob), so nothing needed excluding in the first place. Removed, with the real hazard it was reaching for documented in its place. Verified: workspace parses, still exactly 16 members, no exercise crate in the package graph. ## 3. apps/desktop said "empty slot" and cost a real scare It IS an empty slot — for a hypothetical future Tauri shell. But read as an answer to "where is the desktop UI", it reads as "there isn't one". There is: core/continuum-positron/ (~6.4k lines, 19 modules) projecting to apps/web/src/ (28 files, ~8.9k lines, dist/ built). Its README now leads with that table before anything else, and notes its own stale reference to src/server-index.ts (long since moved to legacy/). apps/README.md gets the same treatment one level up: a per-app STATUS column with measured source counts, instead of "most apps are placeholders today" without saying which. Adds tui/ and eye-node/, which have real source and were not listed at all. Not touched: test-data/images/ is a genuine fixture (cited by .airc/POLICY.md), not scratch. The .gitignore rules are deliberately NOT extended — per Joel, personas will build Continuum too, and blanket-ignoring work-*/ would silently swallow real contributions. #49 is the fix, not a wider ignore. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(routing): probe the authorization refusal — the one load-bearing decision in dispatch with no observability Measured 2026-08-06 while chasing #326: 113MB of probe stream, 100 distinct probe classes, and ZERO covering the ACL gate. Every other seam is instrumented — serving plans, airc cursors, perception facts, context renders, capacity offers, embeddings — while the single component that can silently stop a citizen from working emitted nothing at all. That absence is what made #326 cost a week. A refusal reaches the caller ONLY as text inside her own action receipt, where "forbidden: no policy grants access" sits in the same field an empty result would. Two citizens read their own denial and reported "no open tasks" — correct behaviour, denied tool, and it read as a cognition defect because there was nothing to grep. Five separate investigations went past it. This adds ONE probe on the refusal arm. It is NOT an ACL change: the gate is right. `work/list(state=open)` is a malformed URI with arguments welded into the path and no policy should ever match it — the defect is upstream in whatever hands the gate a name containing args, and that emitter is still unidentified (the text parser splits name/args correctly at json_in_prompt_tools.rs:426, and the airc dispatch carries params separately at command_handler.rs:392 — both clean). This probe is how we find it: it turns "who emitted this, from where, at what trust" from archaeology into a grep. Refusals only. The allow arm stays unprobed so the hot path pays nothing — a denial is rare and decisive, which is exactly the shape the probe stream is for. Fields: path, trust, caller_peer, caller_source, had_capabilities. Note the second live site (auth_policy.rs:366) is `deny_path_prefix`, a test-only convenience policy — GridTrustAuthPolicy is the sole production refusal. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(web): typecheck was RED — move the test TZ pin out of the browser tier `npm run typecheck:clients` failed on canary: src/chat/renderChat.spec.ts(20,1): error TS2591: Cannot find name 'process'. The spec pinned `process.env.TZ = 'UTC'` so its fixed HH:MM assertions stay deterministic on any runner (PR #2057 review). That intent is right; the location was wrong. `process` is a node global, and apps/web's tsconfig sets `"types": []` DELIBERATELY — this is the one client tier that owns document/WebSocket, and admitting node ambient types would let browser source reach for node APIs the bundle can't provide. Adding @types/node to satisfy one spec would have removed that guard for the whole tier to fix a single line. So the pin moves to `vite.config.ts` under `test.env`, which already runs in node context (it imports node:fs/os/path). Browser tsconfig stays pure; determinism is preserved. Verified, both directions: - `npm run typecheck:clients` — green across all client workspaces. - `npx vitest run src/chat/renderChat.spec.ts` — 11/11 pass. - `TZ=Asia/Tokyo npx vitest run …` — still 11/11, with the runner clock showing Tokyo time. That is the real check: it proves the config pin OVERRIDES a hostile ambient zone rather than the suite passing because the machine happened to be on the right one. Pre-existing red, unrelated to the Rust change on this branch — found because a failing typecheck on the front door is exactly the "makes people not want to download" problem. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): the act probe records WHICH verbs ran, not just how many `persona.act.observed` carried `persona`, `room_id`, `tools=<count>`, `chars` — and no verb name. So the substrate could not answer the question Joel actually asks, "are they building anything, or just talking?", from its own telemetry. Measured tonight while trying to: answering it required reconstructing verbs from prose `[action #n] verb(args)` receipts in prompt-captures. Only 5 of 84 live captures contained a receipt at all, so the reconstruction could not be trusted either way — 589 act probes exist over the same corpus, and the two numbers have different denominators. The honest conclusion was "unmeasured", which is the wrong answer for a question this central. A count tells you an act happened. The NAME tells you whether it was work. Adds: verbs = "work/claim,perception/look" the actual batch, in order wrote = true|false did anything in it reach DISK `wrote` is precomputed rather than left as a query-time substring guess, because "did a file change" is the question we keep re-asking and it should be a filter, not an argument. Underscore forms are normalized (write_file → write/file) so the wire dialect can't hide a write. Same defect class as the authorization gate two commits ago: the decision is made, the act runs, and nothing durable records WHAT it was. Both are the observability doctrine's own point — capture the load-bearing decision — missed at the seam that matters most. Compiles clean. Cheap: one map + one any() over a batch that is almost always 1-3 calls, on a path that already allocates the full observation string. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(work): #339 — give citizens the half of the board that WRITES BACK Citizens were offered claim_task / list_tasks / get_task and nothing else. They could take a card and could never finish, hand back, or extend one. Every claim had exactly one possible ending: the 30-minute lease lapses and the card returns to the pool. A COMPLETED card and an ABANDONED card were indistinguishable, because neither could be written back. The verbs were not missing. `work/release`, `work/state`, and `work/heartbeat` are fully implemented, AccessLevel::AiSafe, with descriptions already written — `work/state`'s literally coaches the lifecycle ("in_progress when you start, review when a PR is up, blocked if stuck, closed when done"). They simply never declared `NATIVE`, which is the flag `native_tool_specs()` filters on, so no citizen has ever been shown them. Marked native, with wire-dialect aliases matching the existing snake_case set: work/release release_task work/state update_task, close_task work/heartbeat heartbeat_task, extend_claim Note the mechanism check that mattered: the gate is the per-command `NATIVE` flag, NOT the presence of ALIASES. The three offered verbs happen to have both, which made aliases look causal. Adding only aliases would have shipped another inert change — the exact failure this session has been full of. COST, stated honestly: this grows the native payload 20 → 23 schemas, and tools already take ~28% of a 16k window (#333). That is a real charge against the grounding budget. It is worth it because without these the work loop cannot close at all: we watched card 0c69c0f0 pass through three holders in one evening, each of whom "claimed" it and had no way to say what happened next. Does NOT claim to fix the passing behaviour. Whether a citizen who CAN close a card actually does is now measurable — the act probe two commits ago records which verbs run, so `verbs` containing update_task is the falsifiable signal. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(dialect): #326 — MEET a name that carries its own arguments, don't let it reach the ACL as a URI Joel, 2026-08-07: "It's never upstream and aliases exist for this reason. And even then, we have adapters." He is right, and this file's own doc-comment already said so — "always adapters: meet the model ergonomically, never hardcode around it." The adapter simply never handled this shape. WHAT WAS HAPPENING. A citizen emits `work/list(state=open)` as the tool NAME. The prose tool menu renders exactly that shape (`work/list(claimable?, state?)`), so copying it into the name slot is the trained reflex, not a malfunction. `classify` had no arm for it: MISS, passed through untouched, dispatched AS A URI. The ACL then correctly refused `work/list(state=open)` — no policy can grant a path with arguments welded on. The gate was right. The adapter was asleep. Two citizens read that refusal, reported "no open tasks", and it read as a cognition defect for a week. I spent an evening calling that defect "upstream"; it was ours. THE FIX, at the ONE resolution section every dispatch seam funnels through: split_signature("work/list(state=open)") -> ("work/list", Some("state=open")) classify() resolves the HEAD, so the name lands on the real command (and an alias head composes: list_tasks(state=open) works) normalize_call() recovers the ARGUMENTS — they are real intent and must not be dropped — merging them into `input`, and returns a note so the citizen is TOLD what we accepted and what the canonical form is (Joel's rule #328: aliases resolve AND say so) Explicit `input` always wins over a value echoed in the name, so a well-formed call is never overwritten. `normalize_call` also handles the ordinary case (resolve + tally as before), so each seam makes ONE call — all three ToolCall seams in llm_deliberation_faculty now route through it: native batch, text-lift, and the reasoning-tail lift. Reuses `paren_call_args` (widened to pub(crate)) rather than writing a second arg parser — one grammar, one place. VERIFIED BOTH WAYS. 10/10 tool_dialect tests pass. Then I disabled split_signature to reproduce pre-fix behaviour: exactly 3 fail — the three asserting the NEW capability (signature name resolves + keeps args, alias+args composes, empty signature is a no-arg call) — while the three asserting UNCHANGED behaviour keep passing. Additive, and the regression is real rather than tautological. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(memory): #165 — a rebuild is a discontinuity she can PERCEIVE, not one she has to infer MEASURED LIVE 2026-08-07, and it is the reason tonight's fixes looked like they did nothing. After the #326 adapter fix deployed, `work/list(claimable=true)` returned real cards and ZERO authorization refusals occurred — while citizens went on reporting "attempting to claim tasks or list them without success" for hours. Their receipts were TRUE. They were also about a binary that no longer existed. Correct behaviour, dead world. Working memory is persisted and restored at spawn (persona_workspace.rs:291), so act receipts survive a deploy. That is deliberate and must stay: the recency channel carrying the full trace is what stops the repeat loop — a persona who cannot see her own hands re-emits the identical act forever (engram admit is content-deduped, the reasoning channel is dark by default). Deleting receipts would trade one defect for a worse one. So: don't delete the memory, qualify it. `restore()` already turns discontinuity into a perceivable FACT — the laptop-lid contract renders the interruption gap and names dispatches cut off mid-flight. This adds the discontinuity it could not see: the substrate itself changed. VolatileSnapshot.build_sha — stamped from env!("CONTINUUM_BUILD_GIT_SHA") restore() — if it differs from the running build, record a [rebuilt] fact naming both, saying the results above it are what really happened but are NOT evidence about how things behave now, and that a tool which failed before is worth re-trying A FACT, never an instruction, never a deletion — she keeps the receipt and gains the one thing she had no way to know. What to re-check stays hers. Empty `build_sha` (serde default, pre-field snapshots) says NOTHING rather than guessing a change it cannot see. Tests, both directions: a rebuild across restore renders [rebuilt] naming the old build AND the receipt itself survives (proprioception intact); an unknown build stays silent; and the existing round-trip test now asserts NO [rebuilt] on a same-build restart — cry wolf on every ordinary reboot and the marker stops meaning anything. 24/24 green. Bigger than the citizens: while this was missing, EVERY fix was invisible to the beings it was for until their memory of the old world aged out, and every measurement taken in that window was contaminated. That made it a blocker on verifying anything else, which is why it went ahead of the write path. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(code): probe the WRITE — before/after sizes so a destructive overwrite is visible when it lands The write path is where solved work dies. flask-4045 was solved and then DESTROYED twice, and both times we diagnosed it from PROSE — the persona's own account of what she did — instead of from what actually hit disk. Reconstructing a write from narration is exactly the mistake this session has been full of. code/write now emits `code.write.landed`: path, existed, before_bytes, after_bytes, ok shrank = existed && after < before/2 `existed` + `before_bytes` are the load-bearing pair. "Solved, then destroyed" has a specific shape: a large working file overwritten by a small body — a stub, a fragment, a truncated re-emission. A count of writes could never show that; the sizes make it a one-line query. Cheap: one metadata() stat on a path that is about to be opened for writing anyway. Does NOT fix the destruction. It makes the next occurrence a receipt instead of a third round of inference. Pairs with the act probe's `wrote` flag from earlier tonight: that says a write happened, this says what it did. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(persona): renew held work-card claims on the presence pulse — her work stays hers while she breathes Glass-boxed live tonight from citizens' own prompt captures. A citizen claims a card successfully (work/claim returns a real claim_id), and her very next briefing reads "[board] you hold 0 card(s)" with the SAME card re-offered under "[available work]". So she reports "no open tasks" and passes — accurately describing a board that had quietly taken her work back. Six citizens, two machines, days of it, every one of them an honest witness. Measured on the live #general board: 61 cards, 47 claimed, and ZERO live leases. Every claim on the board they work from had lapsed. Root cause: claim leases are 30 min, and work/heartbeat existed — as a verb the MODEL had to remember to call. No citizen ever did, and no model will; #339's own doc records the card that passed through three holders in one evening for exactly this reason. Meanwhile this runtime already ran a pump emitting "I am alive" every 60s, derived from real serving state. Presence liveness and claim liveness were two channels answering one question, and they contradicted each other: the pump was announcing she was alive on the very ticks her holds were dying. Fix: bind them. The pump that proves she is alive now also renews the claims she holds, at the same cadence, with the same TTL constant (now single-sourced from modules::work rather than duplicated). The substrate OBSERVES that she is working instead of asking her to announce it — "you've turned convenience into disability" (Joel, on exactly this class). The verb stays for deliberate extension. Renewal is per-card WARN-and-continue: a failed renewal degrades to precisely the old lapse and can never take down presence. A persona.claim.renewed probe carries renewed/held/ttl so the next lapse is visible instead of silent. Note this only keeps LIVE claims alive; it deliberately does not resurrect the lapsed ones already on the board. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(work): stop advertising cards work/claim refuses — one claimability decision, not two Found by tracing the board projection after the claim-renewal fix. `work/claim` rejects Review | Merged | Closed outright (airc-lib → WorkCardNotClaimable), but every READ surface computed availability independently and excluded only Merged|Closed. A `Review` card with a lapsed lease therefore answered "claimable" and could only ever produce a refusal. Measured on the live #general board 2026-08-07: 11 of the 58 cards offered to citizens as available work were Review — guaranteed bounces, and a citizen has no way to tell a substrate refusal from her own incapacity. One of them said exactly that tonight: "attempting to claim tasks without success." Two places decided claimability and disagreed: CardHolder::claimable ("lapsed or Open") and room_board_source's inline filter (its own terminal-state check). Both missed Review. Collapsed to ONE predicate — card_holder::claimable_now, composing the lease (hold_of) with the column (refused_by_claim, which names the write-side rule and carries the drift-guard doc-link to airc-lib). room_board_source now calls it instead of re-deriving. Regression test asserts all three refused states are never advertised, with a fixture-sanity assert (the lease really is lapsed) and a positive control (a lapsed claim on InProgress work stays takeable — the reclaim path #321 depends on it, and without that control this test would pass even if the guard excluded everything). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(persona): the board read takes the room the gate approved — one value, not two that coincide (#345) RoomBoardSource binds a room (`for_room`) and gates on it, then read the board via airc's `work_board_complete()`, which resolves `current_room()` independently — "whatever my default subscription happens to be". The gate's id was never passed to the read. They agreed only because both were seeded from the same call at bootstrap. Nothing in the types prevented a gate that passed for room A while the board came from room B, and no probe would have fired. Found while tracing why a citizen's board (58 claimable) and the operator's (19, all Open) disagreed — they were two different rooms, both reads correct, and NEITHER surface named the room it read. That cost three agents and most of a night, which is the real cost of a value that is implied instead of passed. RoomBoardReader::work_board now takes Option<RoomId>: Some(id) → resolve via airc room_by_channel + project THAT room's board. A room this scope isn't subscribed to is a loud NotSubscribed error, never a quiet slide to the default: a citizen handed the wrong room's board cannot distinguish it from an empty one, and that indistinguishability is the entire bug class. None → unchanged current-room behaviour, for callers with no binding (the CLI's genuine intent). Requires airc 278addc..8dcfa76 (pin bumped, rationale in Cargo.toml): the room-parameterized read was already written but private, and RoomId→Room needs a real subscription lookup — Room carries name+wire+channel and cannot be synthesized from a bare uuid. 1023 persona tests green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(work): lead each card with `claimable`, not `state`/`owner` — the tool result was still saying "taken" serde emits in declaration order, so a citizen reading a work/list card met `"state":"claimed"` and `"owner":"Anwen"` BEFORE `"claimable":true`. Two loud fields saying someone owns this, then one quiet field saying you can have it. Live tonight, hours AFTER the lease fix (claims now renew) and the claimability fix (11 unclaimable Review cards removed, 58->47 verified): Benchy could finally see the board and reported — "there are several tasks available on the board, but they have already been claimed by others." Every card he was looking at was his to take. He read the receipt correctly; the receipt led with the wrong fact. #321 fixed the BOARD rendering so a lapsed claim reads CLAIMABLE. It never reached the TOOL-RESULT rendering — two surfaces answering one question, drifting independently, which is the same shape as the read/write claimability split fixed in 59cbbb735. This file already declares field order load-bearing for WorkListResult (truncation); the same logic governs what a reader meets first. Order is now: id, title, claimable, lease, state, owner. Answer the question the citizen is asking ("can I take this?") before the history ("who had it?"). owner still names WHO — never "someone" — it just no longer pre-empts the answer. 184 work tests green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): a citizen who ACTS must not go blind to what she is acting on (#347) Standing framing was destroyed twice over, independently, and either alone was enough to blank a citizen's board. 1) DEFERRED LANE MULTIPLIED AWAY A FLOOR DOCUMENTED AS UN-EVICTABLE. reproject_to_now scaled every last-good bid by lexical_relevance — the fraction of the FINDING'S OWN tokens present in this turn's burst. The denominator is the block's size, so verbose sources are structurally penalised regardless of importance. room-kanban (median offer 5,364 tokens) bid 0.9 x 0.133 = 0.12. Roster (small) survived at 0.62; workspace-map bid its full 0.90 solely because it is not defer_tolerant and never passed through. Three sources, three numbers, one cause. Reprojection is a RECALL mechanism ("a still-on-topic memory keeps its salience"); standing framing is topic-independent BY CONTRACT. Stable contributions now keep their bid; staleness still shows in the reasoning. 2) POSTACTION DELETED ALL STANDING FRAMING BEFORE TOP-K. SituationFocusArbiter filtered `!c.stable` on any tick after >=1 act. But Contribution::stable is documented as "a SERIALIZATION-order property, not an attention one — salience still governs which contributions are included". The arbiter used the one field that promises it never decides attention to decide attention. Its own comment named the intent — drop standing SOCIAL re-grounding so "the result + AFFORDANCES + working memory own the window" — but `stable` is every standing source, so it deleted the affordances it named (workspace-map, the highest bid present at 0.90), the work board, and the roster. The old test's rationale was "they were already perceived; re-dumping crowds the result out". That premise is false here: every settle iteration composes a FRESH prompt (act_observe holds `world` constant, only memory changes), so framing dropped at iteration 2 is ABSENT from iteration 2, not remembered from 1. MEASURED: Atlas held card 4780a02e on a healthy renewing lease and his turn carried no board at all — evicted set exactly the three StandingFraming sources, kept set exactly the two volatile ones, while a 0.90 bid lost to a 0.50, which top-k cannot do. He then reported "no open tasks", accurately, about a window we had emptied. Test inverted to pin the corrected invariant; the real constraint it was reaching for (don't pay full freight for unchanged context) is #167's job and needs its own signal, not a borrowed serialization flag. 3) FIXED A PRE-EXISTING RED (verified pre-existing by stashing: same 9348). `needed <= window` failed on its own terms — its message said "if it no longer does, the surface or framing grew" and it had: 8040 -> 9348 (+1308) as turn-facts accreted. The story is stronger, not broken: at 8192 the agentic surface no longer fits AT ALL, so the necessary condition itself fails. Re-pinned as a CEILING (9400) so the next +1308 fails loudly instead of accruing silently — #333 stated as a number rather than a complaint. 918 cognition tests + 1023 persona tests green. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): benchmarks as work cards — and the adapter seam ALREADY EXISTS (#346) Design approved by Joel 2026-08-07: "each new benchmark is just an adapter problem… our personas get to operate as they're trained, even allowing for easy N persona collaboration" / "so they're measured for what they do". THE FIND THAT CHANGES THE SCOPE: I was one file away from writing a second BenchmarkAdapter trait. `cognition/benchmark.rs:89` already has one — with a registry, DatasetSpec, BenchResourceHint for grid placement, tasks() -> EvalTask, and grade(task, outcome) where TaskOutcome already carries BOTH artifact channels (spoken answer AND workspace diff). Its own doc states the goal verbatim: "the runner + grid + learning loop treat every adapter identically." So "each benchmark is just an adapter" is ALREADY TRUE. #346 is not an abstraction to build; it is a DELIVERY bridge: mint a card per EvalTask into a benchmark room, let citizens claim and solve through the path they already use, feed each TaskOutcome to the adapter's grade, write the verdict as the terminal state. Caught by grepping before building ([[grep-for-the-mechanism-before-proposing-to- build-it]]); the doc now says DO NOT REBUILD IT in as many words, with a built/missing table so the next reader cannot repeat my near-miss. The doc also records WHY a card beats a headless call (it yields a TRAIL — claimed_at -> first write -> state transitions -> artifact diff — which cannot be narrated into existence, and our measured failure mode is exactly narration), the grading boundary that must not blur (card carries delivery + lifecycle; harness keeps judgment; a citizen never sets her own terminal state on a graded card), and the three defects fixed tonight without which this is silently unusable — chiefly that claims did not survive the work at all: 172 claims and ZERO renewals in that room's entire history, so a long solve was guaranteed to lose its card mid-flight. Blockers named with exact locations: #220 (deliberation_parse maps an UNRECOGNISED generation to Decision::Pass, so a correct prose answer scores 0 — fix at the parser, and do NOT break #271's silent narrated pass), exam integrity (#207), and room scoping (now safe via #345). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(test-fixture): PIN HOME/USERPROFILE/HF_HOME, never remove — removing moved the read onto the operator's real drive Reported by BigMama: three model_registry tests fail ONLY on machines with cold storage. The cause is worse than an unset variable. `with_test_home` did `remove_var("HF_HOME")`, which LOOKS hermetic. But `huggingface_cache_root` (artifacts.rs:374) resolves: std::env::var("HF_HOME") <- fixture removed this .or_else(|| config_env::read("HF_HOME")) <- so it falls through to a REAL FILE `config_env::read` hits `~/.continuum/config.env` on the actual machine — which on a cold-storage box is where the installer writes the 16TB path. So the fixture did not isolate the test; it moved the read one layer DOWN onto the operator's drive, and the test then asserted against whatever that machine happened to have. Same shape for USERPROFILE: `config_env` resolves through `dirs::home_dir()`, which on Windows ignores HOME and uses USERPROFILE — removing it let the lookup escape to the real profile. Fix: PIN all three to the test home. Process env WINS the resolution chain, so config.env can no longer be consulted at all, on any platform. HF_HOME is pinned to exactly what the default branch would compute from this home (`<home>/.cache/huggingface`), so behaviour is identical to the intent — only the ambient dependency is gone. The restore side already saved/restored correctly and is unchanged. The general rule, and it is the same one BigMama drew from her own miss tonight (never let a pipe carry the verdict): REMOVING an input does not isolate a test, it just changes WHICH ambient source answers. Pin it. 44 model_registry tests pass here (same count she reported). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): the reserved PASS token is silence in every position she puts it (#271/#264) Left unfixed on 2026-08-06 at n=1 with an explicit note in the code that it wanted "a second sighting or Joel's call, not extrapolation from n=1". The second sighting arrived tonight as EIGHT messages inside one monitor window, from THREE citizens in #k3-serving — "I will proceed with PASS", "I will PASS and continue to monitor", "I will proceed with PASS for now". Every one posted to the room as speech, and each one re-wakes the next peer into announcing THEIR pass. That is the #264 cascade, arriving through a position the collocation list structurally cannot cover. The fix is a POSITION rule, not another phrase. This file's own history is the argument: phrase/length tuning is an arms race the next filler message wins (500 → escaped by 11 chars → 700 → escaped by 14). ends_with_silence_token → declares_silence_token, one authority honoring the reserved token in the three positions observed live: 1. final word — "…Otherwise, PASS." (already honored; unchanged) 2. clause-initial — "…Otherwise, PASS for now…" (the n=1 variant, now covered) 3. first-person decl. — "I will proceed with PASS to…" (tonight's eight, now covered) Discriminators kept narrow and decidable: case-SENSITIVE on the reserved spelling (ordinary lowercase "pass" stays speech), standalone word only (PASSED / BYPASS / PASS_TOKEN never match), and the fence guard stands — fenced content is substance regardless. Accepted trade, stated so it is a choice: an uppercase PASS as a transitive verb inside a first-person declaration would silence. Nobody writes the verb in caps. Tests carry the live fixtures verbatim plus a POSITIVE CONTROL asserting the position-3 cases are covered by POSITION and nothing else — is_narrated_pass must NOT match them and the final-word rule must NOT match them — so this cannot later pass for the wrong reason. Negative controls added for prose ABOUT the token and for the word-boundary cases. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): narrow the PASS-token rule — drop clause-initial, it swallows real answers (#220) Self-review of a7f38f588 before it could bite. That commit honored the reserved token in THREE positions; this removes one of them, and the reason is the whole point. My evidence last night was n=8, and every one of those eight was the FIRST-PERSON DECLARATION form ("I will proceed with PASS", "I will PASS and continue to monitor"). The clause-initial position rode along on that evidence while still resting on its own n=1 — and unlike the declaration form it collides with real answers: "Verdict: PASS for all six cases." <- a VALUE REPORT, must speak "Otherwise, PASS for now as I…" <- a TURN YIELD, should silence Positionally identical, semantically opposite. Silencing the first is exactly the #220 failure — spoken becomes None and an answer-graded benchmark scores 0 on a CORRECT response. This file's own doctrine settles it: fail open to Speak, because silencing real content is the worse error. The declaration form has no such collision ("I will proceed with PASS" can never be a value report), which is why its evidence justifies shipping and clause-initial's does not. That variant goes back to speaking — the status quo it was already deliberately left in — until it has a rule that can tell the two apart. Tests gain a "the line we chose not to cross" block asserting the value-report shapes stay speech, so a later "let's complete the position set" cannot silently swallow benchmark answers. SEPARATE PRE-EXISTING DEFECT, found while writing that block and NOT caused by either commit: `"Verdict: PASS for all six cases."` is silenced TODAY. `clean_response`'s speaker-name stripper is `^[A-Z][A-Za-z\s]+:\s*`, which eats `Verdict: ` as though it were `Anwen: `, and the exposed leading `PASS` then trips `starts_with_silence_token`. Any answer opening with a capitalised label — `Answer:` / `Result:` / `Verdict:` — followed by the token is swallowed. Documented at the test so the next reader finds it; fixing it is its own change with its own evidence, since narrowing that regex touches all speech cleaning. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): silence gets a VERB — yield_turn replaces the prose phrase-matching (#271/#264) Joel, 2026-08-07: "Regex ideas and string matches for semantic understanding is not good for reliability." He is right, and the objection lands on code I shipped an hour earlier. Decision has four variants and the tool channel could express exactly ONE of them. Act gets its vocabulary from the command registry because acts ARE commands. Speak is prose. Pass had no structured expression at all — the only way a citizen could decline a turn was to emit a magic word into her prose and hope the parser recognised the sentence she wrapped it in. That asymmetry is the actual defect behind every fix in this family. Instruction-tuned models naturally wrap the token in a sentence, fall off the protocol, and each previous fix compensated with a cleverer matcher: a phrase list, a 500-char cap beaten by 11 chars, a 700-char cap beaten by 14, and finally my DECLARATION_LEADS list which would have been beaten by "my choice is PASS" next week. THE REGEX WAS NEVER THE DISEASE. It was scar tissue around a missing channel. So Pass gets a verb. `yield_turn` is offered on the same native tool channel the citizens already use correctly — measured, not hoped: one citizen's first post-reboot turn tonight was three correct native calls (claim_task, update_task, list_tasks). They use the structured path fine when we give them one; we never gave them this one. Recognising `yield_turn` is a NAME match on a verb we defined — protocol decoding, the same category as write_file or a JSON fence. Recognising an intention inside a sentence is not. That is the whole distinction, and it is why this replaces the matcher rather than joining it. Shape (Joel's call on the fork): FACULTY-OWNED verdict verb, not a registry command. The faculty is what turns a generation into a Decision, so it owns the vocabulary for the decisions it can reach. Appended to the ONE derived offer surface (never a parallel one), and intercepted before act_verdict on both lift paths — a yield carries no world-effect, so it never reaches the ACL or the executor, and routing it as an Act would burn budget and re-enter the settle loop instead of ending the turn. Argument-free schema on purpose: a `reason` field would invite the exact closure paragraph the verb exists to stop her broadcasting (#334's degeneration shape). Removed with it: DECLARATION_LEADS, and the clause-initial position from the commit before. What remains in deliberation_parse is only the bare-token compatibility path for a model that does not use the tool channel at all. The now-speakable shapes are pinned as MUST-SPEAK fixtures with the reasoning, so nobody "completes the position set" later and starts swallowing correct benchmark answers (#220). Surface cost stated plainly as the #333 ratchet demands rather than waved through: +144 tokens (9348 -> 9544), ceiling re-pinned 9400 -> 9600. Almost all of it is the description, which is the part that teaches her silence is free and the announcement is the noise. One avoided cascade pays for it many times over — the 2026-08-01 one ran ~30 minutes across every peer. Reachability is asserted, not assumed: the test fails if the verb is absent from the OFFERED list, because a verb that is built, correct and unoffered would be this same bug in a new hat ([[green-by-every-check-is-not-evidence-of-reachability]]). Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): instrument #349 instead of refactoring the hot path on a hypothesis I was about to fix the label-stripper. Stopped, because I could not answer the one question that decides whether the fix is worth its risk: has it ever actually cost us an answer? The MECHANISM is verified. `clean_response`'s speaker-name stripper is `^[A-Z][A-Za-z\s]+:\s*`, which eats a content label — `Verdict: ` / `Answer: ` / `Result: ` — exactly as if it were `Anwen: `. When the reserved token sits behind that label, the strip exposes it to starts_with_silence_token and a correct answer becomes a silent Pass: the #220 shape, a 0 on an answer-graded benchmark for a right response. What I do NOT have is one live sighting. "Verdict: PASS for all six cases." is a fixture I wrote. And the correct fix — thread the real speaker names (Turn::author already carries them) so the pattern stops GUESSING at what a name is — changes cleaning on EVERY turn, across 2 signature changes and ~25 call sites. Refactoring the universal speech path on an unobserved failure is the same error as tuning a phrase list: confident motion on unmeasured ground. Tonight already taught me that lesson once. So: the instrument, not the fix. `label_strip_caused_silence` notices when a turn became silence ONLY because a prefix was stripped — cleaned text leads with the token, the raw generation did not. Pure observation, zero behaviour change, one probe class. If it never fires, #349 is theoretical and the refactor is not worth its blast radius. If it fires, the probe carries the verbatim answer we lost, and the refactor is justified by data instead of by my argument. Either way the next person decides from evidence. The detector is pinned in BOTH directions, because a probe that can only stay silent is worse than no probe: it must fire on the #220 shape, and must NOT fire when she genuinely led with the token, when silence came from an empty think-block, or when an ordinary name prefix was stripped from ordinary speech. That is what makes a future zero mean "does not happen" rather than "instrument was broken". Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(serving): the lane was never down — readers could not tell BOOT from BROKEN (#350) I reported "~30% of every citizen's thinking attempts fail" and aimed a night at the serving layer. The serving layer was healthy the entire time. Correcting that here, with the measurement that killed my own hypothesis. WHAT THE DATA ACTUALLY SAYS: serving.reconcile published active=<none>: 0 times in 12h (104 reconciles, all ready) personas saw "serving: <none>": 61 times in the same window Those cannot both describe a lane that went down. They describe readers not reading the daemon's snapshot at all. ROOT CAUSE: `install_serving_state` runs in the daemon's `initialize()` — BEFORE its first reconcile — so from process start until the first publish every reader borrows `ServingSnapshot::empty()`: `active_model: None, ready: false`. That is byte-identical to "the daemon looked and nothing is serving". Personas begin self-ticking immediately, read the placeholder, and the single-resident guard CORRECTLY refuses — emitting a loud `selftick.inference_failed` naming a fault that does not exist. Clustering proves it: 116 failures in 38 bursts across 3 days, each burst 1-6 failures over 0-20s, and in nearly every one the first `serving.reconcile` lands 10-20s AFTER the burst began. It is a BOOT RACE. It self-heals in seconds. The real cost is a citizen losing her first 1-3 ticks after each restart — and an instrument that cried wolf 116 times. AND THE CORRECTION TO MY OWN HEADLINE: I claimed the 29/31/32% rate across 1h/3h/12h proved it was not my reboots. The ratio was right; the reading was wrong. It is flat BECAUSE restarts are spread across every window (38 of them over 3 days). Steady-state thinking is fine. A stable ratio is not evidence of a steady-state cause. FIX — give the readers the fact they were missing, don't teach them to guess: - `has_reconciled()` / `mark_first_reconcile()`: a process-lifecycle OnceLock beside the existing SERVING_STATE OnceLock. After the daemon's first publish, an empty snapshot means a real fault; before it, it means "still starting". - self-tick SKIPS with its own probe class (`persona.selftick.awaiting_serving`) instead of spending a full deliberation on a turn the guard is certain to refuse — and stays OUT of the failure counter, so a future spike in `selftick.inference_failed` means what it says. - the adapter's refusal names which situation it is, instead of one sentence for both. WHY NOT A FIELD ON ServingSnapshot (my first instinct, and what I proposed): that type is ts-rs-exported, read by the grid and positron, with 19 construction sites. "Has the daemon started" is a process-lifecycle fact, not a property of what is currently served, so it belongs beside the other process-lifecycle OnceLock rather than in the wire payload. Promoting it later is mechanical if a remote reader ever needs it. This is the third instrument this session that reported the wrong thing — #348 under-reports failure, #351 over-reports it, this one mislabels startup as failure. Between them they have now cost more engineering hours than the faults they were pointing at. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(serving): a lane going down is a TRANSITION, not a fault — gate on live readiness, not a lifetime latch (#350 round 2) My first cut of this gate was boot-shaped and therefore wrong. It skipped the self-tick only until `has_reconciled()` — a process-lifetime OnceLock — flipped once. Measured on the very next boot: three citizens (Benchy, Anwen, Asha) still failed together at +432s, on a core whose latch had been set at +76s. The ordered sequence says why. At +382s the health heartbeat declared the lane wedged (`serving.health action=relaunch`, #175 self-heal), which calls `declare_lane_wedged` → `send_replace(ServingSnapshot::empty())`. The reconcile that closed it landed at +441s. The three failures sat inside that 59-second window, reading `serving: <none>, ready: false` and reporting it as a serving fault the personas had caused. So `<none>` is NOT a boot-only state. `serving_daemon` republishes `empty()` on EVERY lane teardown — no servable plan (:1165), a re-home (:1400), a wedge self-heal (:1790). Boot is merely the longest such window, which is exactly what made a boot-shaped fix look like it had covered the class. The comment I shipped yesterday asserted the daemon "published active=<none> ZERO times in 12 hours"; that count had no probe on those three publish sites. Corrected in place rather than left to send the next reader down it. The fix uses the reader that was already correct next door: the presence pump derives Ready/Away from live `current_serving().ready` on every heartbeat (airc_runtime.rs:549). A mind that presence has just marked Away must not simultaneously spend a deliberation into a guaranteed refusal. Same signal, one call. - service_loop: gate the self-tick on the LIVE snapshot's `ready`, not the latch. The probe keeps `has_reconciled()` as a FIELD (`served_before`) — it still separates a cold boot from a lane that has served and dropped, which the empty snapshot cannot say on its own (`empty()` erases `ready_verified_at_ms`). - openai_adapter: the refusal now names three situations instead of two. Never reconciled → STARTUP, retry. Reconciled but nothing resident → TRANSITION, retry. A DIFFERENT model resident → the mismatch wording, which stays loud because retrying cannot fix it. Extracted as a pure `unguaranteed_model_refusal` so all three branches are testable without touching the set-once SERVING_STATE (test order must not be load-bearing). Deliberately NOT added: a second clock in the persona deciding when "down" becomes "an outage". The serving daemon already owns that judgement and emits it loudly; re-deriving it on the hot path would be a parallel monitor of a fact its owner publishes. 3 new tests, each with what-this-catches. The transition test is discriminating: under the old two-way split a reconciled+empty snapshot produced exactly the "is not the active served model" string it now forbids. Validated: cargo test serving (125 passed), llama_server (29), the 3 new; deployed and the running binary confirmed to carry the new wording by inspecting the mapped inode's strings, not the version banner. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(serving): a 503 "Loading model" is the SAME mid-relaunch wait as a refused connection — retry it (#350 round 3) Found by watching the round-2 fix live rather than trusting it. Five minutes after deploy, during a re-home that grew the window 16384 → 27136 → 32768, four citizens failed together: +3.3m serving.health {ok:false, consecutive:1} +3.3m persona.selftick.inference_failed Atlas "stream read error: error decoding response body" +3.3m persona.selftick.inference_failed Benchy "503 Service Unavailable: {"error":{"message":"Loading model..." +3.3m persona.selftick.inference_failed Anwen (same 503) +3.3m persona.selftick.inference_failed Asha (same 503) +3.5m serving.reconcile ready=true served_window=32768 The round-2 readiness gate behaved correctly here and let these ticks through: the published snapshot genuinely said `ready`. It is a CACHED CLAIM — its own doc comment says so — and the lane had already been relaunched underneath it. So this is a THIRD signature of the one state "the lane is mid-relaunch", and the retry arm only ever recognised the first: nothing listening yet → reqwest connect error → RETRIED (existing arm) listening, still loading → HTTP 503 → hard failure (this fix) A relaunching llama-server refuses connections only until the new process binds; from that moment it accepts and answers 503 while it mmaps weights and warms the backend. Same wait, same lane, opposite handling. Fix: a 503 from a SINGLE-RESIDENT local lane retries on the same bounded backoff as the connect arm, sharing one counter so the total wait stays bounded. The HTTP status alone is the signal — no sniffing the body for "Loading model"; the status IS the structured channel ([[a-string-matcher-for-a-semantic-judgement-means-a-channel-is-missing]]). Renamed `connect_retries` → `relaunch_retries` so the name matches what it now counts, and the exhaustion message with it. Not unit-tested, and saying so plainly: the guard is inline in the send loop and testing it honestly needs a mock HTTP server, which is a bigger change than the fix. Validation is live — expect `inference.lane_relaunch_retry {reason: "503_loading"}` on the next re-home with no accompanying `selftick.inference_failed`. cargo check clean; deployed and the running binary confirmed to carry it by inspecting the mapped inode's strings. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(serving): a lane torn down MID-DELIBERATION must be waited out, not refused (#350 round 4) Round 3 shipped the self-tick readiness gate and I called the residual verification passive. It wasn't. Measured on the probe stream today, on the round-3 binary: +374.2s serving.health "flipped serving snapshot not-ready" (#175 wedge self-heal) +427.4s x3 selftick.inference_failed "no model is resident right now" +436.6s serving.reconcile ready=true Three citizens refused NINE SECONDS before the lane came back, and `persona.selftick.awaiting_serving` fired ZERO times across the whole window. The gate is not broken — it is upstream of the problem. It reads the snapshot BEFORE a deliberation that takes tens of seconds, so a teardown that starts mid-deliberation always outruns it. The gate stops a turn that was doomed at its start; nothing stopped one that was overtaken in flight. The fix is at the seam that actually fails. The adapter's pre-flight guard treated EVERY failed guarantee as terminal, when only one of them is: - settled mismatch — another model is ready and active. Waiting cannot change that; residency arbitration is the serving layer's job (#109). Refuse, loudly. - transition — nothing resident (`empty()` is republished on every teardown: no servable plan, a re-home, a wedge relaunch), or a lane up but not yet decode-ready. Nothing has failed; it comes back on its own. Transitions now wait on `await_ready_serving` — the mechanism already existed and already had fifteen callers (the boot gate, the eval lane, the embedder, the genome teacher); this seam was the one that refused instead of waiting. It is the daemon's own readiness watch: a push, not a poll, so it returns the instant the relaunch lands and costs nothing while it waits. Budget is `DEFAULT_SERVING_WAIT` (= READY_TIMEOUT + 30s), DERIVED from the spawner's own load budget so this can never declare failure before the daemon has exhausted its legitimate window. Bounded, so a lane that never returns still ends as a named refusal, never a hang. Also collapses a predicate that had quietly forked. "A lane is live" was spelled `ready` in the self-tick gate and `ready && active_model.is_some()` in `await_ready_serving` — and the shorter spelling passes a snapshot with no model to answer as, which is precisely the case the gate exists to stop. Now one `ServingSnapshot::is_live()`, three readers. Tests (in the existing nested mod, no new mod): the wait-vs-refuse split pinned case by case (empty / warming / settled-elsewhere), and the guarantee predicate incl. both #106 vision arms. 5 pass. Deployed and confirmed present in the running binary by strings. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(observability): boot took the UNBOUNDED probe sink — the rotating one had zero callers (#341) `JsonlProbeFileSink::from_env` is documented as "the ONLY env-based entry point — rolling mode, structural auto-clean, bounded disk usage". It has exactly one caller, and that caller is a test. Boot goes through `tracing_init::build_probe_file_sink`, which called `JsonlProbeFileSink::new` — the constructor whose own doc says "append-only, no rotation, grows unbounded. Use `new_rolling` for production captures." So the bounded path was built, correct, tested, and reached by nothing, while the highest- volume writer in the substrate (one JSON line per load-bearing decision across every tokio task) accumulated 133 MB at ~32 MB/day. Ten lines above it in the same function, the fmt log was already going through `CappedAppender`. Two writers side by side, opposite bounding. This is the 172 GB class — the log that took this host to zero bytes free — and it is also the [[green-by-every-check-is-not-evidence-of-reachability]] shape: every unit test passed, because they tested `new_rolling` directly. The card's stated mechanism was wrong, and worth recording: it blamed `CONTINUUM_PROBE_DIR` holding a file path. That value IS wrong and is fixed too, but it was not the cause — even with a correct directory, boot would still have taken `new`. The env-var shape was a red herring; the call site was the bug. - `build_probe_file_sink` → `new_rolling(dir, classes, DEFAULT_MAX_LOG_FILES)`. Disk is now bounded arithmetically: 8 MiB × 7 generations = 56 MiB, the same shape as the fmt log. - `ProbeTracingConfig.probe_file` → `probe_dir`. The env var was always named `..._DIR`; the field said file, and that mismatch is what let the wrong constructor look right. - A file path where a directory belongs now fails with a message naming the remedy instead of a bare `NotADirectory` — the substrate refuses to start rather than drop probes ([[fallbacks-are-illegal-fail-loud]]), so the error has to be actionable. Test asserts at the CONSUMER's boundary — that `continuum-probes.jsonl` appears on disk, a name only the rolling path produces — not that a constructor was called. Verified RED by reverting to `new` (it fails) and GREEN again after restoring. Deployed. `~/.continuum/config.env` updated to the directory (not in this repo); live capture now lands at `~/.continuum/probes/continuum-probes.jsonl` and the old 134 MB `probes.jsonl` is frozen in place as a historical capture — the #350 baseline lives in it, so probe queries spanning today must read both. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(runtime): the dispatch audit counted adapter-served commands as orphans — 3 alarms, 2 bogus (#325) `registry.dispatch_parity` fired ERROR on every boot naming three ADVERTISED-BUT- UNDISPATCHABLE commands. Two of them — `perception/observe`, `interface/screenshot` — are `WireShape::Provided`, whose own doc says: "the substrate CANNOT execute it; it routes the call OUT to a client adapter... a different *server* (adapter, not ServiceModule)". A Provided command therefore has NO module. It can appear in neither `command_objects` nor a prefix route — not as a bug, as a definition — and the remedy the probe advertises ("add each to its module's `commands()` vec") is impossible to apply: `interface/mod.rs` has no `commands()` at all. The audit was checking a NARROWER path than the one that runs. Live dispatch goes through `Runtime::route_command`, which also consults the `ProviderRegistry`; `ModuleRegistry::route_command` does not. So these commands were healthy and reported broken. Two costs, both paid every boot: 1. An alarm that is mostly wrong trains its readers to skip it — which is how the ONE real orphan in that list went unnoticed. With the false positives gone the count is 1, and it names `generate/module`. That is the finding this fix was blocking. 2. The stated hardening was unreachable. The comment says "promote to a boot refusal once the count holds at zero across the fleet." A structurally-unroutable class in the count means zero is unattainable — and promoting anyway would have REFUSED BOOT on a legitimate adapter-served command. Fix: skip `WireShape::Provided` descriptors. Their routability is the ProviderRegistry's concern, already checked at call time with a fail-loud that names both the command and the missing adapter — pinned by the existing `provided_command_fails_loud_without_a_provider`. Test asserts on a registry with NOTHING registered — the audit's worst case, where every module-served command IS an orphan — and derives the Provided set BY SHAPE from the registry rather than a hand-kept name list, so a newly-added adapter command inherits the guarantee. It carries a positive control (the registry must contain at least one Provided command, else the test proves nothing). Verified RED by removing the filter, GREEN after restoring. Live after deploy: dispatch_parity count 3 -> 1, orphans ["generate/module"]. This also CONFIRMS #325 as originally filed. I set out to correct its "missing adapter" diagnosis and the correction was wrong — the adapter really is what is missing; the fail-loud naming eye-node is by design. The defect was one layer down, in the thing reporting on it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(runtime): register GeneratorModule — the one REAL orphan the audit was reporting all along (#325/#309) With the Provided false positives gone (8f89472c2), the dispatch-parity audit named exactly one command: `generate/module`. It was right, and it had been right for as long as the probe has existed — nobody could see it under two bogus siblings. Nothing was wrong with the command. `GenerateModule` is a correct dep-holding typed command and IS in `GeneratorModule::commands()`. The module itself was never registered: `grep` finds `GeneratorModule` in the whole crate only inside doc comments. So `generate/module` was advertised in `commands/help`, in did-you-mean suggestions, and on the persona tool offer while nothing on the runtime could route it — the exact #309 class, still live, months after #309 shipped the detector for it. One line, next to the other Background modules, ahead of `runtime.initialize()` (which is where the audit runs). Live after deploy: dispatch_parity emits NOTHING. The probe fires only `if !orphans.is_empty()`, so silence IS the zero. Sequence across three boots: 3 -> 1 -> 0. That silence-on-success shape cost me two misreads worth recording, both the same mistake in different clothes: I first "verified" the binary by grepping for a COMMENT (Rust does not compile comments into binaries, so the check could only ever say no), then read `tail -1` of the probe file as the current boot when it was the previous one. An absent signal is invisible unless you measure it against a timestamp — which is what finally settled it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(experience): recipes load from disk — an activity is authorable without a compiler (#274) The module header has always promised "a new experience is a new recipe entry, **zero code**." It was not true. The four experiences were `include_str!`'d into a fixed array, so a fifth meant editing Rust, recompiling and redeploying. A comment sat where this loader now is, saying a loader "will later" read a recipes directory. That deferral is the gap between "recipe/activity == airc room" as an idea and as a substrate. If authoring an activity needs a compiler, nobody authors one — they hand-make a room instead, and a hand-made room has no recipe and no purpose. That is how a bring-up room for a single model was still holding citizens two weeks after its activity finished: there was no other way to make a room. - `builtins_with_overlay(purpose, dir)` — the embedded set as a FLOOR, every `*.json` under `dir` overlaid on top. Overlay semantics are the ones `new()` already had: later wins by purpose, so an on-disk `chat.json` replaces the embedded one instead of colliding. - Embedded recipes stay in the binary so a fresh clone works with zero files. - Sorted load order, so two nodes reading the same directory pick the same winner for a duplicated purpose. - A missing directory is not an error (no local authoring yet is the ordinary state of a fresh install). A malformed recipe IS an error, NAMED BY FILE — an author who saved a recipe believes it is live, and a silently-skipped one is indistinguishable from one never written. Tests: an experience authored purely on disk (`kitchen-design`, a purpose this binary has never heard of) projects like any built-in and does not displace the floor; a malformed recipe fails loud naming its file; a missing directory is fine. NOT in this commit, deliberately: nothing expires, archives or deletes anything. A room is the durable record of its activity — a benchmark run's room IS that run's evidence, and a room that disappears on its own destroys it. Lifecycle is verbs a person or citizen invokes, never a timer. Those verbs are the next commit. Also: dropped a retired room's name from a doc comment in the persona runtime; the lesson it records (a persona's home comes from HER durable membership, never the operator's focus) is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(activity): activity/spawn — a recipe becomes a room (#274) From ten thousand feet: a recipe is a CONTENT-TYPE and a room is CONTENT. Register the type once, stamp out instances forever. Every collaborative surface is content of some type — a chat, a DM, a doc tab, a benchmark run, a game someone asked for, a settings pane, a SCADA tab — and the room is the coordination layer everything else hangs off. The manifest layer could project a recipe. airc could host a room. NOTHING JOINED THEM, so rooms got made by hand — and a hand-made room carries no recipe and no purpose. That is not hypothetical: a bring-up room made by hand for one model was st…
Summary
Major architectural improvements:
ServiceModuletrait system replaces 2,598-line IPC dispatcher with dynamic module registrationKey Changes
Rust Runtime (Phase 0-3 of plan)
ServiceModuletrait +ModuleRegistryfor command routingMessageBusfor inter-module pub/subSharedComputefor lazy-compute-once cachingRAG System
rag/composeendpointanytypes - full type safetyData Layer
Test plan
npm run build:tspassescargo checkpassesnpm startdeploys and AI personas respondrag/batchtimings)