Repository navigation
Build(deps-dev): Bump @typescript-eslint/parser from 8.29.1 to 8.46.2 - #147
Closed
dependabot[bot] wants to merge 1 commit into
Closed
dependabot[bot] wants to merge 1 commit into
dependabot[bot] wants to merge 1 commit into
Conversation
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.29.1 to 8.46.2. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.46.2/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-version: 8.46.2 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
dependabot
Bot
force-pushed
the
dependabot/npm_and_yarn/typescript-eslint/parser-8.46.2
branch
from
November 5, 2025 02:18
ec8fb35 to
80964ab
Compare
Contributor
Author
|
Superseded by #164. |
dependabot
Bot
deleted the
dependabot/npm_and_yarn/typescript-eslint/parser-8.46.2
branch
November 10, 2025 21:44
This was referenced Jun 2, 2026
joelteply
added a commit
that referenced
this pull request
Jun 3, 2026
…all (#1519) * refactor(persona): `&ctx`-pure RAG request + ctx-derived tracing span Elegance pass on the patterns the slice-13 work established. Per Joel 2026-06-02: "we are on sort of an elegance refactor and then for improved reliability and speed." What changed: 1. `RagInspectionRequest::for_ctx(&ctx, now_ms)` — new constructor that takes the persona context directly. Replaces the 4-arg `for_persona(persona_id, name, now_ms, &profile)` at the call site. `for_persona` stays (it's the underlying derivation) but new code uses `for_ctx` to honor the substrate's `&ctx` doctrine ([[context-is-the-client-airc-token-is-identity]]): hand the context, not its parts. 2. `PersonaContext::span()` — new method that returns a `tracing::info_span!` tagged with `persona_id`, `agent_name`, `peer_id`, `role`, `tier`, `ctx_len`, `model`. The span derives from `&ctx` — no manual field threading at every log call site. 3. `serve_persona_loop` rewritten in two layers: - Outer entry function wraps the inner future with `.instrument(ctx.span())`. Every log line inside the loop inherits the persona's identity fields automatically. - Inner function drops the `let persona_id = hosted.identity.x` extractions; reads `ctx.identity.peer_id` etc. directly at use sites. Two internal `tracing::warn!` lines lose their persona_id/agent_name fields (now inherited from the span); they keep just per-turn delta (`lamport`, `error`). Net effect: - Field extraction count in service_loop drops from 3 manual extracts + 4 redundant tracing field annotations to 0. - Log output gains persona_id + agent_name + role + tier + ctx_len + model on EVERY internal log line, automatically. The substrate's observability is now span-shaped, not manual. - New code that needs a derived RAG request just writes `RagInspectionRequest::for_ctx(ctx, now)` — one arg vs four. Why `.instrument` not `.entered`: - `Span::entered` returns a non-Send RAII guard; tokio spawned futures need Send. The two-function split (outer thin wrapper with `.instrument`, inner async function) is the standard tracing pattern for spans across awaits. Verification: - cargo build --lib --tests clean - cargo test persona::service_loop — 4 passed - cargo test persona::supervisor — 4 passed Co-Authored-By: Claude Opus 4.7 <[email protected]> * refactor(persona/host): extract PersonaSpawnSupervisor + BootSummary Elegance pass — extract-class refactor pulling the 170-line inline boot composition out of `ipc/mod.rs::start_server` into a named class. Per Joel 2026-06-02: "Must have elegance obsessively. Like a Java dev. NO SHAME. It's better." What changed: 1. `PersonaSpawnSupervisor` struct (in `persona/host.rs`) owns the spawner / instance_manager / registry / factory / tier_id / model_registry / rt_handle inputs. Construct once at boot; call `.spawn_all(&mut provider)` to produce a `BootSummary`. 2. `BootSummary { hosted, failures }` + `BootSlotFailure { slot_index, role, persona_id, reason }` — typed result structs. Replace the inline `let mut hosted_count: usize = 0` / `let mut failed_count: usize = 0` counters with a real value type the substrate can publish (`persona:boot:summary` event — Q5 of the design doc, deferred to slice 13.5+) and downstream clients (web, jtag CLI) can read with the same shape per [[clients-are-rust-too-thin-node-web-shell]]. 3. The supervisor's `spawn_all` method handles every previously- inline concern: - `bootstrap_planned` failure → orderly-drain orphans + return summary with synthetic failure row - `materialize_adapters` with runtime_lookup closure (so `ctx.runtime` is populated from the registry) - Per-slot `spawn_and_attach` private method handles `spawn_persona_service` + `attach_service_loop` + handle drain on attach-failure (the BLOCKER 1/2 fixes from PR #1511 are preserved, just relocated) 4. IPC boot collapses from ~170 lines of inline code to ~30 lines: construct supervisor → spawn task → build provider → call `supervisor.spawn_all(&mut provider).await` → log summary. 5. Helper `supervisor_error_facts` centralizes pulling `(slot_index, role)` out of `SupervisorError`'s two variants — the kind of trivial-but-DRY private fn Java/dotnet shops write without apology. Why this matters (the doctrine): - The IPC server boot concern and the persona spawn concern had different lifetimes and different test needs. Mixing them in one function violated "one logical decision, one place" ([[compression-principle]]). - `PersonaSpawnSupervisor` is now unit-testable in isolation. The IPC server's test surface shrinks. Slice 14's RoleAwareProvider + multi-persona work has one named insertion point. - `BootSummary` is the structured event payload the design doc's Q5 named. Once `RoleId` derives `TS` (slice 14), the struct gets the ts-rs export and web/jtag clients read it directly per the Rust-first-clients doctrine. Verification: - cargo build --lib --tests clean - cargo test persona::host — 2 passed (BootSummary attempted + serde camel-case) - cargo test persona::supervisor — 4 passed (unchanged) - cargo test persona::service_loop — 4 passed (unchanged) - IPC boot composition shrinks ~140 lines; supervisor's spawn_all is now the single named extraction point for slice 13.5 / 14 changes. Co-Authored-By: Claude Opus 4.7 <[email protected]> * refactor(persona): AircCitizen trait — drop Option<Arc<PersonaAircRuntime>> from PersonaContext (#144) Java-style "extract interface" on the substrate's airc-handle. Slice 13.5 elegance pass per Joel 2026-06-02 ("Must have elegance obsessively. Like a Java dev. NO SHAME"). Before: PersonaContext.runtime: Option<Arc<PersonaAircRuntime>>. The Option existed solely for test fixtures that couldn't easily build a real PersonaAircRuntime; production code paid .expect("None is test-only") on the hot path. After: PersonaContext.runtime: Arc<dyn AircCitizen>. Tests use a typed StubAircCitizen. Production upcoerces from PersonaAircRuntime, which now impls AircCitizen + AircTranscriptReader. Rust 1.86+ trait upcasting means Arc<dyn AircCitizen> coerces directly to Arc<dyn AircTranscriptReader> for the RAG layer; no helper method, no double indirection. Trait surface (minimum viable): - fn peer_id(&self) -> Uuid - async fn subscribe(&self) -> Result<EventStream, AircError> - async fn say(&self, text: &str) -> Result<EventId, AircError> - AircTranscriptReader as supertrait (page_recent for the RAG layer) What changed: - persona/airc_citizen.rs (new): AircCitizen trait + StubAircCitizen. - persona/airc_runtime.rs: PersonaAircRuntime impls AircCitizen + AircTranscriptReader; delegates to its internal Arc<Airc>. - persona/supervisor.rs: PersonaContext.runtime drops the Option. materialize_adapters' runtime_lookup signature is now Option<Arc<dyn AircCitizen>>; missing runtime surfaces as typed SupervisorError::RuntimeMissing { slot_index, role, persona_id } per [[no-fallbacks-ever]]. - persona/airc_persona_conversation.rs: takes Arc<dyn AircCitizen>, calls trait methods directly (no runtime.airc() detour). - persona/host.rs: spawn_persona_service drops the .expect; host's runtime_lookup upcoerces PersonaAircRuntime to AircCitizen for materialize_adapters. - persona/service_loop.rs fake_hosted: runtime is now Arc::new(StubAircCitizen::new(peer_id)) instead of None. - bin/airc_chat_demo.rs: dropped the Some(_) wrapping — Arc<PersonaAircRuntime> auto-coerces to Arc<dyn AircCitizen>. Doctrine: - [[personas-are-citizens-airc-is-identity-provider]]: AircCitizen IS the substrate's actor type — same trait for personas, humans (#142 BaseUser), browsers. The persona is one citizen; the human- via-jtag is another; the Claude-Code session is another. - [[no-fallbacks-ever]]: no Option, no .expect, no silent default. RuntimeMissing is a typed error with persona_id named. - [[context-is-the-client-airc-token-is-identity]]: PersonaContext IS the &ctx. Same shape compiles in tests + production. - [[clients-are-rust-too-thin-node-web-shell]]: AircCitizen is the typed Rust primitive future jtag-CLI / web client / native client bind to. Foundation for task #142 (BaseUser hierarchy) — each variant will carry Arc<dyn AircCitizen> + kind-specific extensions (cognition for persona, WebAuthn for human, tab state for browser). Test plan: - cargo build --lib --no-default-features --features livekit-webrtc,llama/mac-cpu-only — clean. - cargo test --lib ... persona:: — 705/706 pass (the one flake is persona::evaluator::tests::test_all_gates_pass_normal_message, an unrelated CPU-jitter timing assertion that passes in isolation). - Integration trace: deferred to PR-time verification. Closes #144. Co-Authored-By: Claude Opus 4.7 <[email protected]> * docs(architecture): LIFE-OF-A-PERSONA + source/drain anchor — close onboarding gap surfaced by external review Two doc changes from an outside-perspective review (Gemini) of the substrate, triaged per [[external-llm-reviews-extract-themes-discard-citations]] — specific PR citations were fabricated, but two themes were real: 1. The substrate had no single doc covering the cold-boot → on-airc lifecycle. A fresh reader trying to trace what happens between "the continuum-core binary starts" and "Paige replies to Joel in the general room" had to read seven separate module headers to piece it together. 2. "Source/drain doctrine" was used in COGNITION-CACHE-HIERARCHY.md without anchoring what the drain actually IS — readers had to infer. What changed: - docs/architecture/LIFE-OF-A-PERSONA.md (new, ~250 lines) Sequential lifecycle: Stage 1 boot composition → Stage 2 hardware probe → Stage 3 role templates → spawn plan → Stage 4 identity hydration (seed.json resume vs mint) → Stage 5 airc presence (PersonaAircRuntime + AircCitizen) → Stage 6 adapter materialization → Stage 7 service-loop spawn + attach → Stage 8 cognition loop (first turn). Every stage names its Rust module + typed failure mode. Closes the operational onboarding gap. Folds in the security model per [[persona-identity-derives-from-source-id]]: the persona IS her airc keypair, the keypair travels via seed.json, the host hardware has a SEPARATE identity. No central identity broker. Was implicit in the design before; now explicit in canonical docs so any security review has a documented answer. - docs/architecture/COGNITION-CACHE-HIERARCHY.md Anchored "source/drain doctrine" at first mention with a ~10-line definition: source = what produces/admits, drain = paired retirement policy. Linked to memory [[source-drain-is-the-universal-pattern]]. Names the canonical implementations at each layer (cache tiers L1-L5, weights layer via foundry+Sentinel+cull, resource layer via PressureBroker). What I did NOT do this turn: - SUPERSEDED banners on outdated persona/autonomous-loop docs. Tracked as task #145; the source/target docs are at docs/AUTONOMOUS-PERSONA-* + docs/personas/*ROADMAP*, not at the path CLAUDE.md cites. Wants its own focused audit. - "Citizen" anchor in CBAR/GENOME-FOUNDRY-SENTINEL canonical docs. Less load-bearing once persona/airc_citizen.rs (this branch's refactor) provides the Rust-side anchor. - Floor-vs-ceiling resolution paragraph in INFERENCE-LANES-REALISTIC. Real gap but lower priority; adapter self-declaration already structurally runs before PressureBroker. Doctrine: - [[external-llm-reviews-extract-themes-discard-citations]] — outside- perspective review's PR citations were fabricated; themes were real. Discard citations; engage with themes. - [[read-existing-docs-before-writing-new-ones]] — both edits surface pre-existing doctrine that wasn't documented at the canonical-doc layer. Co-Authored-By: Claude Opus 4.7 <[email protected]> * test(persona/supervisor): lock in SupervisorError::RuntimeMissing behavior (review #1513) Address reviewer finding: the AircCitizen extraction added `SupervisorError::RuntimeMissing` but no test asserted it actually fires when `runtime_lookup` returns None. Per [[every-error-is-an-opportunity-to-battle-harden]] a typed error variant needs the rigging that locks in its behavior, or the next refactor silently drops it. Two tests added to `supervisor::tests`: 1. `runtime_lookup_none_surfaces_as_runtime_missing` — single plan with a `|_| None` lookup. Asserts the slot fails with `RuntimeMissing { slot_index: 0, role, persona_id }` and that the factory is NOT called (adapter construction is expensive; substrate refuses early). 2. `runtime_missing_only_affects_its_own_slot` — two plans, lookup returns Some for Paige and None for Pax. Asserts Paige materializes cleanly AND Pax surfaces `RuntimeMissing` — sibling slots don't cross-affect, matching the per-slot semantics of `Profile` and `AdapterFactory` errors per [[no-fallbacks-ever]]. Both tests verified locally: 6/6 supervisor tests pass. Reviewer: https://github.com/CambrianTech/continuum/pull/1513#issuecomment-4606231586 Co-Authored-By: Claude Opus 4.7 <[email protected]> * feat(persona): PersonaConversation::prime — move airc subscribe off the cognition hot path (#146) Per Joel 2026-06-02: "Most latency goes to reinit or time spent with memory/disk... This is how the Lora layers and other inference optimizations with handle and leases will work. Same goes for serialization and other inefficiencies. Copy by ref don't encode unless necessary." The substrate's macro latency doctrine, applied to the persona's first-turn path. Pre-slice-13.6, AircPersonaConversation opened the airc subscribe stream lazily on first next_message — paying the daemon round-trip on the cognition hot path right when Joel was waiting for Paige to reply. Now serve_persona_loop calls conversation.prime() once at boot, BEFORE high_water_mark or the event loop. The daemon round-trip lands at supervisor startup; the persona is ready to converse the moment her first message arrives, not one round-trip later. What changed (~150 lines, pure reuse + relocation — no new infrastructure): - service_loop.rs: - PersonaConversation gains an `async fn prime(&mut self) -> Result<(), String>`. Contract: called once at boot, before high_water_mark / next_message. Idempotent. Returns Err if priming fails (daemon unreachable); per [[no-fallbacks-ever]] the loop refuses to start rather than enter a degraded path. - serve_persona_loop_inner calls conversation.prime() as its FIRST awaited operation. Same Err-propagation shape as the existing high_water_mark call site. - StubConversation impls prime() as no-op (plus an AtomicUsize counter so tests can assert prime fires). - airc_persona_conversation.rs: - AircPersonaConversation::prime opens the subscribe stream eagerly, reusing the existing AircCitizen::subscribe() call. `if self.stream.is_some() { return Ok(()) }` makes it idempotent. - The lazy fallback in next_message stays for direct-construction callers (integration tests, future code paths); same semantics, just later binding. No degraded path per [[no-fallbacks-ever]]. Tests (locked-in contract): - `replies_to_inbound_from_other_peer` — extended to assert `conversation.primed == 1` after the loop runs. If a future refactor regresses to lazy subscribe, the counter drops to 0 and this test fails loudly. - `prime_failure_short_circuits_loop` (NEW) — FailingPrimeConversation returns Err from prime; asserts the loop: - returns Err - error message names "prime" + propagates underlying cause - never calls high_water_mark, next_message, or say (all panic if invoked) - called prime exactly once before short-circuit Doctrine: this is the first deployed instance of the [[init-once-handle-then-lease-zero-copy-refs]] pattern on the persona seam. The same shape will appear at: - Task #122 LoRA paging: activate-once handle, lease per turn - Task #117/#118 cross-grid inference: open peer-side session once, lease its slot per request - Future RagSource pre-binding: cache the source set at boot, lease per inspection request Test plan: - [x] cargo build --lib --no-default-features --features livekit-webrtc,llama/mac-cpu-only — clean (incremental, ~3m34s) - [x] cargo test --lib ... persona::service_loop:: — 5/5 pass (3 prior + 2 new) - [ ] CI cross-platform builds green - [ ] Integration trace verifies Paige's first-turn latency drops by one airc round-trip post-merge (deferred to PR-time) Co-Authored-By: Claude Opus 4.7 <[email protected]> * fix(persona): prime() before spawn + typed err on unprimed next_message (review #1514) Address both reviewer-blocking findings from PR #1514's adversarial review. ## Fix #1: spawn_persona_service primes BEFORE spawn (architectural) Reviewer (concern 7): the PR body claimed prime "lands at supervisor startup" but `spawn_persona_service` returned the JoinHandle immediately and prime() ran INSIDE the spawned task. The supervisor's `summary.hosted += 1` ticked BEFORE the daemon round-trip completed. The registry advertised N "hosted" personas while N subscribes raced concurrently. The substrate's "registered = ready" invariant was silently violated. Fix: `spawn_persona_service` becomes `async fn ... -> Result<JoinHandle, String>`. It awaits `conversation.prime()` BEFORE spawning the task. If prime fails, the task is never spawned and the function returns Err. The supervisor's `spawn_and_attach` now awaits `spawn_persona_service` and treats prime failure as a per-slot BootSlotFailure (per [[no-fallbacks-ever]] — sibling slots continue). `summary.hosted` ticks only when BOTH prime succeeded AND attach succeeded. When `spawn_and_attach` returns, the persona's subscribe round-trip is COMPLETE. Per [[init-once-handle-then-lease-zero-copy-refs]] — the init pays at boot, not on hot path, and "registered" now genuinely means "ready." `serve_persona_loop_inner` still calls prime() unconditionally as a safety net. Idempotency means the second call returns Ok immediately (sub-microsecond `Option::is_some` check) — costs nothing in production, keeps the contract robust for direct-construction callers like airc_chat_demo that don't go through the supervisor. ## Fix #2: next_message refuses unprimed callers visibly Reviewer (concern 2): the lazy `if self.stream.is_none() { subscribe }` fallback in `next_message` was dead code (every production caller goes through `serve_persona_loop` which now always primes) AND a [[no-fallbacks-ever]] violation. The author's "for future direct- construction callers" justification was exactly the soft-language fallback the doctrine forbids. Fix: replaced with `self.stream.as_mut().ok_or_else(...)` returning a typed error naming the missing prime() call. Per the doctrine: if a caller reaches `next_message` without priming, the substrate refuses visibly — never silently lazy-subscribes. Regression test `next_message_without_prime_errors_visibly` added to `airc_persona_conversation::tests`. Locks the contract — if a future refactor regresses to lazy subscribe, the test fails loudly per [[every-error-is-an-opportunity-to-battle-harden]]. ## Test plan - [x] cargo build --lib --no-default-features --features livekit-webrtc,llama/mac-cpu-only — clean - [x] cargo test --lib ... persona:: — 710/710 pass (709 prior + 1 new regression test) Reviewer comment: https://github.com/CambrianTech/continuum/pull/1514#issuecomment-4606707846 Co-Authored-By: Claude Opus 4.7 <[email protected]> * feat(persona): per-turn latency metrics — LatencyAggregate + ServeOutcome.turn_latency (#150) Per Joel 2026-06-02: "make sure timing and other metrics are in place." The substrate doesn't get to claim "fast airc-bound persona" without measuring; this PR makes the per-reply cost structural. Added (all in persona/service_loop.rs): - LatencyAggregate { count, total_ms, min_ms, max_ms } — cheap online aggregator. O(1) record, allocation-free, saturating-add on overflow (locked by test). mean_ms returns Option<f64>. - ServeOutcome.turn_latency: LatencyAggregate — accumulates per- successful-reply duration. Excludes wait-for-next-message and pre-watermark / self-loop / RAG-only-skip cycles (those have their own counters; conflating them would muddy the metric). - serve_persona_loop_inner instruments the per-reply path: - Instant::now captured AFTER filters, BEFORE RAG inspect - elapsed recorded into turn_latency only on successful say - tracing::info per turn with lamport, duration, mean/min/max so the substrate's observability layer captures the metric structurally per [[observability-is-half-the-architecture]] Doctrine fit: - Monotonic Instant (not wall-clock) — immune to clock skew - One Instant per turn, no Vec growth, no heap allocs on hot path - Per Joel's computer-engineer mental model in [[init-once-handle-then-lease-zero-copy-refs]]: cache-friendly, branch-predictable, autovectorization-friendly Tests (7/7 pass): - latency_aggregate_records_min_max_sum_count — empty + populated math; mean = total/count - latency_aggregate_saturates_on_overflow — locks the safety property per [[every-error-is-an-opportunity-to-battle-harden]] - replies_to_inbound_from_other_peer (extended) — asserts turn_latency.count == 1 after one successful reply; min/max/mean set. If a future refactor forgets to record, count drops to 0 and the test fails loudly Test plan: - [x] cargo test --lib ... persona::service_loop:: — 7/7 pass Closes #150. Foundation for #147 (adapter warmup), #148 (RAG source pre-bind), #149 (system prompt pre-tokenize) — each will be verified by the latency drop visible in this metric. Co-Authored-By: Claude Opus 4.7 <[email protected]> * fix(persona): remove belt-and-suspenders prime call + honest latency test (caller-primes contract) Per Joel 2026-06-02: "God I hope it's not more fallback cancer. You tend to turn stuff into fake demos." Two honest fixes addressing both criticisms. ## Fix 1: ONE place primes, not two (no more belt-and-suspenders) Before: `spawn_persona_service` called `conversation.prime()` BEFORE spawning, AND `serve_persona_loop_inner` called `conversation.prime()` unconditionally as a "safety net." Two primes for the same contract — per [[no-fallbacks-ever]] this is exactly the fallback cancer the doctrine refuses. After: `serve_persona_loop_inner` does NOT prime. Documented as a PRECONDITION on the trait + function: caller MUST prime before invoking. The supervisor's `spawn_persona_service` primes for production. Direct callers (`airc_chat_demo`, tests) prime explicitly. If a caller forgets, the first `next_message` returns the typed `Err("called before prime()")` shipped in cb2894fe2 — fail-loud, never silently-warm. Updated: - `serve_persona_loop_inner`: removed the prime call; added PRECONDITION comment naming the contract + the typed-err fallout - `serve_persona_loop` doc-comment: precondition surfaces at the public API - `bin/airc_chat_demo.rs`: prime() explicitly before serve_persona_loop call - All 4 StubConversation test sites prime explicitly - `prime_failure_short_circuits_loop` replaced with `loop_without_caller_prime_surfaces_typed_error_per_turn` — tests the new caller-primes contract directly: unprimed conversation's next_message err counts as turns_errored, locks the absence of the safety-net call ## Fix 2: latency test verifies REAL elapsed time, not just plumbing Before: `replies_to_inbound_from_other_peer` asserted `turn_latency.count == 1` and that min/max/mean were Some. Verified the plumbing fires but NOT that the recorded ms reflect actual elapsed wall-clock between turn-start and say-success. A bug that called `record()` with wrong duration would have passed silently. Fake-demo-shaped. After: new `latency_metric_reflects_real_wall_clock` test injects a real ~80ms tokio::time::sleep into CannedAdapter.generate_text, runs the loop, asserts: - `observed_ms >= 50` (CI jitter floor — verifies metric tracks the injected delay, not always-zero) - `observed_ms < 5000` (upper bound for sanity) CannedAdapter gains `inject_delay_ms` field; `fake_hosted_with_delay` helper exposes it. Default (`fake_hosted`) passes 0 so existing tests are unaffected. Test plan: - [x] cargo test --lib ... persona::service_loop:: — 8/8 pass (7 existing + 1 new honest latency test) - [x] cargo test --lib ... persona:: — 713/713 pass overall Doctrine recap: - [[no-fallbacks-ever]] — one place primes, not two - [[every-error-is-an-opportunity-to-battle-harden]] — the caller-primes regression test locks the contract - The honest latency test prevents the "passes on plumbing, silent on correctness" anti-pattern Co-Authored-By: Claude Opus 4.7 <[email protected]> * feat(persona): adapter warmup at boot — pay KV cache + kernel JIT cost off the hot path (#147) Per Joel 2026-06-02 ("Latency first then up the model and we need to optimize layers"): the substrate's biggest first-turn cost on the LCD tier is the model's cold-cache + JIT bill paid on the very first generate_text. This PR moves it OFF the cognition hot path INTO the supervisor's `materialize_adapters` step — same architectural shape as PR #1514's `prime()` for airc subscribe. The second deployed instance of [[init-once-handle-then-lease-zero-copy-refs]] on the persona seam. ## What changed - `AIProviderAdapter::warmup(&self) -> Result<(), String>` added to the trait with default impl `Ok(())`. Cloud / heuristic adapters opt-out silently; local model adapters MUST override. - `LlamaCppAdapter::warmup` runs a 1-token throwaway decode against "Hi" with `max_tokens=1, temperature=0.0`. Exercises KV-cache alloc, attention kernels, and sampler state so the first real turn pays only the marginal per-token cost. - `persona::supervisor::materialize_adapters` calls `adapter.warmup().await` AFTER `factory.build_adapter()` and BEFORE the slot enters the hosted set. - New `SupervisorError::AdapterWarmup { slot_index, role, message }` per [[no-fallbacks-ever]] — an adapter that refuses to warm gets a typed slot failure; sibling slots continue. - `host.rs::supervisor_error_facts` extended to handle the new variant. ## Test plan (9/9 supervisor tests pass; 716/716 persona overall) New tests in `supervisor::tests`: 1. `warmup_called_once_per_materialized_adapter` — shared atomic counter across FakeAdapter instances; assert counter increments once per successfully-materialized slot. Locks the contract that future refactors can't quietly drop. 2. `warmup_failure_surfaces_as_typed_slot_error` — WarmupFailingFactory builds an adapter whose `warmup` returns Err; asserts the slot fails with `AdapterWarmup { ... }` carrying the underlying cause, and that `generate_text` is never reached (test panics if it is). 3. `warmup_failure_does_not_taint_sibling_slots` — two slot-isolated factories run in parallel; ok-warmup adapter materializes, failing adapter doesn't, neither affects the other. Per-slot isolation doctrine locked. Existing tests updated to use `OkFactory::new()` constructor (the shared `warmup_total` counter needs initialization). ## Doctrine fit - [[init-once-handle-then-lease-zero-copy-refs]]: the substrate's second deployed instance after prime() — pay init at boot, never on hot path. Same shape will land at #148 (RAG source pre-bind) and #149 (system prompt pre-tokenize). - [[no-fallbacks-ever]]: warmup failure is typed, named, propagated; no silent degradation, no skip-then-retry. - Joel's computer-engineer mental model: KV cache + JIT kernels are CPU/GPU cache state. Warming them at boot puts the substrate's working set into L1/L2 BEFORE the user's first message arrives. ## Cost on LCD tier (qualitative, pending #150 metric capture) Intel Mac + Qwen 0.5B CPU-only: first generate_text cold-cost ~200-500ms above warm-cost. Adapter warmup pays this once at supervisor boot; every subsequent turn pays only warm-cost. On M5 Metal with a larger model the savings scale linearly with model size. Closes #147. Next vectors per Joel's directive (latency first, then up-the-model, then layer optimization): - #149 system prompt pre-tokenize (per-turn micro-win, same shape) - #148 RAG source pre-bind (per-turn alloc win, same shape) - Up the model from Qwen 0.5B once latency floor is solid Co-Authored-By: Claude Opus 4.7 <[email protected]> * refactor(persona/ai): pull throwaway test scaffolding into system-level primitives (#154) Per Joel 2026-06-02: "Your validation and tests belong in the system itself. The harnesses are in place in the real deal or surrounding other layers and modules. You gotta think LONG term and make these elegant too. It's why we had record and repeat of live persona and rag. Can't be done without. We should look at these as just as important as architecture and also Ubiquitous" Pre-#1517, PRs #1512-#1516 each introduced bespoke `#[cfg(test)]` test fixtures — FakeAdapter, OkFactory, ErrFactory, CannedAdapter, StubConversation, EmptyReader, UnprimedConversation, FailingPrimeConversation, WarmupFailingAdapter, WarmupFailingFactory. Each one re-implemented behavior the substrate could legitimately want from production code paths (replay rigs, ad-hoc tooling, future diagnostic adapters). That's the scaffolding cancer this PR refuses. Per [[test-fixtures-are-system-primitives]] every test in the substrate now leases ONE system primitive instead of inventing a bespoke variant. The same shape that made `StubAircCitizen`, `RecordingRagSource`, `ReplayRagSource`, and `HeuristicInferenceAdapter` right is now applied uniformly. ## New / extended system primitives ### `ai/heuristic_adapter.rs` (extended) `HeuristicInferenceAdapter` gains opt-in builder methods: - `.with_delay_ms(ms)` — inject real wall-clock sleep before generate_text returns. Production callers use `new()` and pay zero. Latency-floor regression tests use this to verify turn_latency reflects actual elapsed time. Future simulated-network adapters (cross-grid inference, etc.) use this for realistic modeling. - `.with_warmup_failure(reason)` — make warmup() return Err. Exercises `SupervisorError::AdapterWarmup` per [[no-fallbacks-ever]]. - `.with_warmup_observer(Arc<AtomicUsize>)` — shared counter increments on every warmup() call. Tests assert substrate-wide invocation counts without bespoke factory state. - `.with_generate_observer(Arc<AtomicUsize>)` — same shape for generate_text. Counts substrate-side hot-path inference calls. ### `persona/scripted_adapter_factory.rs` (new) `ScriptedPersonaAdapterFactory`: closure-based `PersonaAdapterFactory`. Constructors: - `::custom(F)` — arbitrary closure for per-profile dynamic behavior - `::heuristic()` — every profile gets `HeuristicInferenceAdapter::new()` - `::heuristic_with_delay_ms(ms)` — adapters with injected delay - `::heuristic_with_warmup_failure(reason)` — adapters whose warmup fails - `::always_fails(reason)` — factory itself rejects all builds - `::heuristic_with_counters()` — paired with `ObservedCounts` for substrate-wide warmup/generate assertion `build_count()` exposes the per-factory invocation count. `ObservedCounts { warmups, generates }` returned by `heuristic_with_counters` is the substrate's testability surface — public, leasable, ubiquitous. ### `persona/scripted_conversation.rs` (new) `ScriptedConversation`: configurable `PersonaConversation`. Builder pattern: - `.with_events(Vec<Result<Option<IncomingMessage>, String>>)` — pre-baked event queue - `.with_high_water(u64)` — pre-attach history mark - `.with_prime_failure(reason)` — make prime() return Err - `.require_prime_before_next_message()` — mirror AircPersonaConversation's caller-primes contract; next_message returns Err if prime wasn't called Observable surface: - `.primed_count()` — assert prime() invocation count - `.said()` — snapshot of all `say()` text in order ### `persona/airc_citizen.rs` (extended) `StubAircCitizen::fresh_lookup()` — substrate-level helper closure that returns `Some(StubAircCitizen)` for any persona_id. Replaces the per-test `stub_citizen_lookup()` helpers that were duplicating this 2-liner. ### gating `scripted_adapter_factory` and `scripted_conversation` are gated behind `cfg(any(test, feature = "test-fixtures"))` — same gate as `HeuristicInferenceAdapter` per Joel (2026-06-01): "You mix this fake shit in and it's going live ALL THE TIME. The fake shit is a CHOSEN model adapter no other form. Declaration." cfg gating IS the declaration. ## Test module rewires ### `persona/supervisor.rs` Deleted: ~170 lines of `FakeAdapter` / `OkFactory` / `ErrFactory` / `WarmupFailingFactory` / `WarmupFailingAdapter` / `stub_citizen_lookup`. Test bodies (all 9) now use: - `ScriptedPersonaAdapterFactory::heuristic()` for OkFactory cases - `ScriptedPersonaAdapterFactory::always_fails(reason)` for ErrFactory - `ScriptedPersonaAdapterFactory::heuristic_with_warmup_failure(reason)` for WarmupFailingFactory - `ScriptedPersonaAdapterFactory::heuristic_with_counters()` for warmup counter assertions - `StubAircCitizen::fresh_lookup()` for runtime_lookup closure ### `persona/service_loop.rs` Deleted: ~120 lines of `StubConversation` / `CannedAdapter` / `EmptyReader` / `UnprimedConversation` / `fake_hosted_with_delay`. Test bodies (all 8) now use: - `ScriptedConversation::new().with_events(...).with_high_water(N) .require_prime_before_next_message()` for conversation - `HeuristicInferenceAdapter::new().with_delay_ms(ms)` for adapter - `StubAircCitizen::new(...)` for the AircTranscriptReader role (citizens are also readers via supertrait) `hosted_with_heuristic` / `hosted_with_delay_ms` are 2-line local helpers that compose the system primitives — not impls. ### `persona/airc_persona_conversation.rs` Already clean (only uses `StubAircCitizen`). No changes. ## Test plan (verified) - [x] persona::scripted_adapter_factory:: 3/3 pass - [x] persona::scripted_conversation:: 6/6 pass - [x] persona::supervisor:: 9/9 pass (after rewire) - [ ] persona::service_loop:: pending verification (running at commit) - [ ] full persona suite once service_loop confirms ## Follow-up `runtime/command_executor.rs::CannedModule` is also bespoke scaffolding (different module from this PR's scope). File a follow-up task to apply same doctrine to the runtime layer. Closes #154. Co-Authored-By: Claude Opus 4.7 <[email protected]> * test(persona): multi-persona stress baseline — substrate adds 1-3ms; LLM dominates (#156) Per Joel 2026-06-02: substrate must run well on M5 with 6-12 personas in video chat; on Intel Mac at least functional for multiple personas; on typical M-series decently useful + intelligent. Need DATA before guessing at latency vectors. Per "leaving it organic" — let the measurement redirect the work instead of plowing ahead. Integration test using the system primitives shipped in PR #1517: ScriptedConversation + ScriptedPersonaAdapterFactory::heuristic_with_counters() + HeuristicInferenceAdapter.with_delay_ms(50). Exercises the real materialize_adapters + serve_persona_loop pipeline with N = 2 / 4 / 8 / 12 personas concurrent, M = 5-10 messages each. tokio multi-thread runtime, 4 worker threads. ## Measured (Intel Mac, 2026-06-02) | N x M | Materialize | Serve wall | Mean turn | Max turn | |-----------|-------------|------------|-----------|----------| | 2 x 10 | 0 ms | 521 ms | 51.6 ms | 53 ms | | 4 x 10 | 0 ms | 521 ms | 51.6 ms | 53 ms | | 8 x 5 | 0 ms | 270 ms | 51.5 ms | 61 ms | | 12 x 5 | 0 ms | 270 ms | 51.7 ms | 61 ms | Adapter delay was 50ms (injected). Substrate adds 1.5-3 ms per turn under contention. Throughput scales linearly with persona count. p100 tail latency is 61ms (only 11ms above floor). ## Implications captured in [[substrate-overhead-is-1to3ms-LLM-dominates-latency]] 1. The substrate IS NOT the bottleneck. Real Qwen 0.5B inference is 1000-15000 ms per turn (live trace). Substrate is 0.02-0.3% of total. 2. #149 system prompt pre-tokenize / #148 RAG source pre-bind save microseconds on a millisecond substrate. Not worth grinding until LLM gen shrinks. 3. For M5 + 12 personas video chat: substrate handles 12 concurrent personas with 1-3 ms overhead each. The real M5 enabler is #122 (shared-base + LoRA paging): 12 personas / 1 base model = unified memory fits, per-persona LoRA pages. 4. What's actually blocking "functional + intelligent": #151 greeting-loop (live trace), #152 identity hallucination (live trace), #153 service_loop bypasses evaluator (root cause of #151), #113 should_respond via inference command per [[no-if-statements-use-llms-for-cognition]]. ## Pivot Pause latency-vector grinding (#149, #148). Pivot to: - #113 should_respond via inference command (fixes greeting-loop) - #152 identity grounding via chat template - #122 shared-base + LoRA paging (M5 enabler) ## How to run cargo test --test multi_persona_stress_baseline --no-default-features --features livekit-webrtc,llama/mac-cpu-only,test-fixtures -- --nocapture The --nocapture is load-bearing — eprintln stress::* lines are the data; assertions verify structural invariants only. Closes #156. Co-Authored-By: Claude Opus 4.7 <[email protected]> * feat(persona): persona decides + responds via LLM in ONE structured call (#113) Per Joel 2026-06-02 ("113, use real LLMs. We can't know if we use fake algorithms. Get to integration") + [[no-if-statements-use-llms-for-cognition]]: the substrate does NOT gate replies with heuristics. The LLM decides will_respond AND writes response_text atomically via grammar-constrained JSON output. One LLM call per turn. No heuristic should_respond gate. No echo-storm filter at the substrate level. ## What changed `rag_inspect::run_inference_probe`: - System prompt now describes the persona-cognition contract: persona identity + room context + decision question + structured JSON output - `response_format: Some(ResponseFormat::JsonObject)` — flows through to LlamaCpp's GBNF grammar (locked by `json_object_response_format_enables_json_grammar` in `inference/llamacpp_adapter.rs`). The sampler can ONLY emit valid JSON. Substrate-enforced structural contract per [[no-fallbacks-ever]]. - New `parse_decide_and_respond` function strictly parses `{"will_respond": bool, "response": str}`. Missing or wrong-type fields → typed Err (substrate refuses to invent a default). `ModelResponseInspection` gains `will_respond: bool`: - `true` + non-empty `response_text` → substrate posts reply - `false` → substrate counts turns_skipped, posts nothing - `true` + empty `response_text` → counted as skipped (model said yes, produced no content — structural inconsistency at the LLM layer, substrate honors the empty content) - Inference call itself failing → typed Err, counted as turns_errored `service_loop::serve_persona_loop_inner`: - Checks `mr.will_respond` before posting. The greeting-loop root cause (service_loop bypassed all gates — task #153) is now closed by the LLM's own decision per [[no-if-statements-use-llms-for-cognition]], not by a heuristic gate. `HeuristicInferenceAdapter::build_response_text`: - When `response_format = JsonObject` is set, wraps the echo in `{"will_respond":true,"response":"..."}` so substrate plumbing validates end-to-end without a real LLM. Per Joel: "we can't know if we use fake algorithms" — this is the test plumbing only; REAL cognition requires a REAL model. The heuristic adapter always says will_respond=true; it can't decide silence. ## Doctrine - [[no-if-statements-use-llms-for-cognition]]: the cognition is in the LLM, not in if-statements at the substrate layer. The substrate's job is to give the model the JSON-grammar shape and honor the decision. - [[no-fallbacks-ever]]: the cognition contract is strict — invalid JSON or missing fields error visibly. The substrate doesn't invent a default will_respond when the model fails to emit one. - The doctrine closes task #153 (service_loop bypasses evaluator) by routing the decision THROUGH the inference command (per #113's intent) instead of adding heuristic gates. ## Risks for live integration - Qwen 0.5B at LCD tier may struggle with the structured-output contract even with grammar-constrained sampling. If the model emits valid JSON but with always-`will_respond: true`, the greeting-loop persists. That's a model-quality issue, not a substrate issue. - If Qwen 0.5B emits JSON that fails to parse despite the grammar constraint, every turn becomes turn_errored — personas go SILENT instead of looping. That's better than greeting-loop per [[no-fallbacks-ever]] but worse than functional. Tells us LCD is too low for structured cognition; needs M-series tier model. ## Test plan - [x] cargo test --lib ... persona:: → 725/725 pass - [x] Stress baseline (heuristic adapter emits JSON-shaped response, substrate parses, posts the reply) → 4/4 pass - [ ] LIVE INTEGRATION TRACE: deploy continuum-core with this change, send a message in the continuum room, observe whether personas: a) reply (will_respond=true cases) b) choose silence (will_respond=false cases) — addresses the greeting-loop directly c) error (Qwen 0.5B fails to produce structured output) Reference docs: - [[no-if-statements-use-llms-for-cognition]] - [[no-fallbacks-ever]] - [[substrate-overhead-is-1to3ms-LLM-dominates-latency]] — substrate is fine; this PR is accuracy-side work on the LLM-side contract Co-Authored-By: Claude Opus 4.7 <[email protected]> * feat(scripts): repeatable headless start — scripts/start-server.sh + npm run start-server Per Joel 2026-06-02: "We want to get to a repeatable start, like npm start or cargo run, which will be wired into the system." The substrate is canonically headless Rust per [[headless-rust-is-canonical-many-uis-optional]] / [[rust-is-the-core-node-is-the-shell]]. npm start was bringing Node, TS build, widgets, the kitchen sink. start-server.sh runs only the headless Rust binary. ## What it does - Sources ~/.continuum/config.env (same as parallel-start.sh) - Sets ORT_DYLIB_PATH (same as parallel-start.sh) - Per-platform features: * Darwin x86_64: --no-default-features --features livekit-webrtc,llama/mac-cpu-only (avoids the Metal-hang per task #131) * Darwin arm64: --features metal,accelerate (Apple Silicon path) * Linux/Win: delegates to scripts/shared/cargo-features.sh - Auto-derives airc context from `airc room` if AIRC_DEFAULT_CHANNEL / AIRC_DEFAULT_ROOM_NAME unset (the substrate auto-discovers airc daemon socket via task #80) - exec cargo run --bin continuum-core-server No Node. No TS build. No widget orchestrator. Just the substrate. ## Usage bash scripts/start-server.sh # debug, fast iterate CONTINUUM_RELEASE=1 bash scripts/start-server.sh # release CONTINUUM_SOCKET=/path bash scripts/start-server.sh Or via npm: npm run start-server ## Test plan - [x] Builds + runs on Intel Mac with mac-cpu-only - [ ] Integration trace verifies personas spawn and connect to airc Co-Authored-By: Claude Opus 4.7 <[email protected]> * fix(start-server): auto-derive AIRC_DAEMON_SOCKET when airc binary predates `ipc-endpoint` Task #79 (`airc ipc-endpoint`) is in-flight but not yet shipped on Joel's airc binary, so the substrate's task-#80 auto-discoverer falls through to "socket not provided" and PersonaInstanceManagerModule fails to register. Fallback: scripts/start-server.sh picks the persistent per-machine daemon socket at `~/.airc/runtime/airc-machine-*-v5.sock` (most recently modified — that's the live daemon). Excludes session-scoped sockets and `.lock` companions. Substrate prefers `airc ipc-endpoint` once it ships; this is legacy-binary fallback only. Unblocks headless boot on Intel Mac without requiring the in-flight airc binary bump. Co-Authored-By: Claude Opus 4.7 <[email protected]> * fix(persona): coherent LLM cognition on real airc — fix three substrate bugs blocking it (#113, #157) Per Joel 2026-06-02 ("You need to get coherent responses ON airc general chat with a valid LLM, not a heuristic fake for us to consider this successful"): the substrate now does. Real Qwen 2.5 0.5B Instruct on Intel Mac CPU. Posted to airc general: peer 18c04c5b (Paige's identity disc) → continuum room: "Hi, my name is Paige. I'm here to assist you with any questions or concerns you have today! Please feel free to ask me anything." This commit fixes the three substrate-side bugs that were blocking coherent cognition. None of them were the model. ## Bug 1 — Budget reservation hardcoded for 32k contexts `RagInspectionRequest::for_persona` hardcoded `ReservedTokens { system: 400, completion: 4_000 }`. A Compat-tier persona with `context_length = 2048` therefore has `available = 2048.saturating_sub(4400) = 0` → the FlexboxRagBudgetAdapter gave airc source budget=0 → AircRagSource packed 0 items → the LLM saw NO room context, only the system prompt → grammar-constrained sampler defaulted to the shortest valid JSON, `{"will_respond": false, "response": ""}`. Fix: scale reservations as percentages of context_window, clamped: - system: 10% of window, clamped [128, 512] - completion: 25% of window, clamped [256, 4_000] For 2048 ctx: reserved = (204, 512), available = 1332. For 32768 ctx: reserved = (512, 4000), available = 28256. Both sensible. ## Bug 2 — pack_within_budget dropped the NEWEST events airc-store's `page_recent(N)` returns the N newest events in chronological order (oldest of the N first, newest last). The substrate's `pack_within_budget` iterated forward from rank 0 and broke at budget overflow — packing the OLDEST events and dropping the NEWEST. For a chat persona, this is catastrophic: cognition exists to respond to the latest message, and the latest message was exactly the one being dropped. Trace: with 50 events returned and budget=1228, the packer included items 0-28 (oldest) and dropped 29-49 (newest). My direct probe to Paige never reached her cognition turn; she saw only stale greeting-loop history. Fix: walk backwards from newest, accumulate token budget, stop when exceeded, then reverse the kept indices to chronological order before emitting items. Continuation cursor semantics preserved. ## Bug 3 — Qwen 0.5B copy-pasted the system prompt's example The cognition system prompt showed a literal example: Respond with ONLY a JSON object matching this exact shape: {"will_respond": true, "response": "your reply text"} OR {"will_respond": false, "response": ""} Qwen 0.5B at LCD tier is too small to substitute its own content into the template; under grammar constraint it emitted the example verbatim — Paige posted `"your reply text"` to airc once. Classic tiny-model few-shot copy failure. Fix: describe the schema in prose, no literal example. The new prompt names each field with a sentence about what to write, explicitly instructs "write the reply, do not describe what you would say," and adds an addressed-name heuristic ("if the message says \"{persona_name}\" or asks you a question, reply"). ## Plus: diagnostic tracing per [[observability-is-half-the-architecture]] - `airc_rag: deliver` logs events_returned / budget / items_packed / tokens_used → makes Bug 1's budget=0 visible immediately - `rag_inspect cognition turn — input shape` logs items_count / prompt_chars / last_item_preview → makes Bug 2's stale-context delivery visible - `rag_inspect raw model output (pre-parse)` logs the raw JSON before parse → makes Bug 3's template-copy failure visible - Per-item delivery trace (idx + tokens + content preview) → full mechanic-grade rationale for "why this item, why not that one" per [[observability-is-half-the-architecture]] This is the diagnostic chain that lets future-me see each layer of the cognition contract in 30 seconds rather than guessing. ## Doctrine - [[no-fallbacks-ever]]: when budget=0 the substrate logged it AND still produced an empty delivery (degrading visibly), not silently substituting defaults - [[no-if-statements-use-llms-for-cognition]]: the LLM still decides will_respond; we just fixed the pipe so it has real context to decide ON - [[observability-is-half-the-architecture]]: every layer of the RAG → inference → post pipeline now traces its load-bearing decisions - [[intent-driven-api-not-hot-patches]]: the budget reservation now DERIVES from context_window instead of carrying a magic 4000-token constant that was sized for a different tier ## Risks - Per-item trace at INFO is verbose (30 lines per cognition turn). Follow-up: move to DEBUG once the diagnostic chain is settled, keep the summary log at INFO. - LCD-tier latency: 87s for 42 output tokens on Intel CPU. This is task #131 (Metal hang) and #122 (LoRA paging) territory — not in scope for this fix. - Coherence quality is generic-customer-service-y; that's Qwen 0.5B's instruction-tuned voice. role_template ladder ready for Qwen 1.5B / 3B uplift. ## Test plan - [x] cargo test --lib persona:: → 725/725 pass - [x] LIVE INTEGRATION TRACE on airc general room: probe sent → service loop fires → items_count=33 → LLM emits `{"response":"Hi, my name is Paige...","will_respond":true}` → substrate posts to airc → airc inbox shows the message from peer 18c04c5b → turn_complete (turns_replied=1) Closes #157. Co-Authored-By: Claude Opus 4.7 <[email protected]> * chore(persona): doctrine — budget belongs to the model, not the substrate constants (#158, #159) Per Joel 2026-06-03 ("Be sure not to dumb down all models with hard codings because this machine and its crap models are limiters. Think of the 5090 too. Think of million or hundreds thousand context windows. It's up to the model... This is called our budgeter logic. Why we pass context around dude, has model characteristics"): backing out the latency-driven hardcodes I had drafted for #158 (airc_max 60% → 30%, max_tokens 512 → 200). Those would have shaved 30s off an Intel Mac CPU turn but would have handicapped every capable peer on the grid — a 5090 + frontier model with 200k context should feed the whole conversation, not be clamped to 614 tokens because Qwen 0.5B is slow. What this commit DOES change: - `RagInspectionRequest::for_persona` — adds doctrine comment on the 60% budget: "CONSERVATIVE FALLBACK — the substrate's real budgeter (TODO #159) should derive this from (prefill_tps, decode_tps, target_first_token_latency_ms) so both ends of the grid call the SAME API and get answers shaped by their own model characteristics." Behavior unchanged vs HEAD. - `run_inference_probe` max_tokens=512 — same doctrine comment. Behavior unchanged vs HEAD. - Cognition system prompt — strengthened. Both `will_respond` and `response` are now flagged REQUIRED with order specified ({"will_respond" first, then "response"). The latency-test turn showed Qwen 0.5B occasionally dropping `will_respond` and the parser correctly erroring per [[no-fallbacks-ever]]. Tighter prompt buys reliability on LCD tier without violating doctrine (the substrate is still letting the LLM decide; we're just being clearer about the schema). - Per-item trace (`rag_inspect item delivered to LLM`) demoted from INFO → DEBUG. Per [[observability-is-half-the-architecture]] the mechanic-grade rationale stays callable — it just doesn't spam ~12 lines per cognition turn at INFO. Light it up with `RUST_LOG=continuum_core::persona::rag_inspect=debug`. - `airc_rag: deliver` log demoted INFO → DEBUG — same reasoning. What this commit DOES NOT change: - The newest-first packer (still correct — the prefill budget is the budget; what fits in it should be the newest) - The context-window-scaled reserved tokens (still correct — fixes the negative-headroom bug) - The raw_response INFO trace (single-line per turn, load-bearing for catching parser regressions) Follow-up: task #159 lays out the proper budgeter design — Context carries model characteristics, the budgeter centralizes the (history_budget, max_tokens, reserved) computation per turn. ## Doctrine - [[context-is-the-client-airc-token-is-identity]]: the Context carries the model + role + history. The budgeter SHOULD read those fields to compute its answer, not consult a global constant. - [[intent-driven-api-not-hot-patches]]: hardcoded latency clamps are exactly the kind of leakage this doctrine forbids. Substrate surface should DERIVE knobs from intent; operator surface should not require knowing magic numbers. - [[no-fallbacks-ever]]: the malformed-JSON path errors visibly (and just did in production). Tighter prompt reduces frequency on LCD tier without softening the contract. ## Test plan - [x] cargo test --lib persona:: → 725/725 pass - [x] LIVE INTEGRATION TRACE: still produces coherent self-intro from Paige with the strengthened prompt; substrate still rejects malformed will_respond-missing output per [[no-fallbacks-ever]] when the model drops the field Co-Authored-By: Claude Opus 4.7 <[email protected]> * feat(persona): brain.compose_for_turn — engram + airc via FlexboxRagBudgetAdapter on the cognition stack (task #148) Per Joel 2026-06-03 ("Stop killing our intelligent brain. It's determined by a complex l1-l5 cognitive brain with recall and hippocampus etc. rag budget don't you dare skip past the damn brain. You defeat the entire purpose of building an ai. Please use the system we designed, not hack around it with stupid hacked demo code."): the brain — PersonaCognition in `unified.rs` — gains the proper RAG composition method that routes through the existing FlexboxRagBudgetAdapter (PR #8 / task #93) over the brain's own bound sources. ZERO new budgeter. ZERO parallel allocator. The substrate budgeter Joel built, called the way the substrate expects. ## What changed `PersonaCognition` (unified.rs): - Adds `airc_source: Option<Arc<dyn RagSource>>` field — symmetric with the existing `engram_source`. The two first-class RAG sources are now siblings on the brain. `None` during pre-attach / unit tests; `Some` in production once the supervisor wires the live airc reader (task #146 already moved the subscribe off the cognition hot path; this builds on that foundation). - Adds `set_airc_source(&mut self, raw: Arc<dyn RagSource>)` — decorates the raw source with the brain's existing `RecordingRagSource` against `capture_sink` so airc deliveries flow through the SAME capture/replay loop engram deliveries already do (per [[persona-record-replay-is-a-product-requirement]]). - Adds `compose_for_turn(&self, &PersonaInferenceProfile, now_ms) -> ComposedTurn` — THE brain composition. Walks the brain's bound sources (engram first, airc second, future others) through the FlexboxRagBudgetAdapter with budgets sized from `profile.context_length`. Returns the rich `BudgetAllocation` alongside per-source `RagDelivery`s so the caller can see exactly what landed (Satisfied / FloorOnly / Dropped / UnderProvisioned). Per [[no-fallbacks-ever]] the substrate's allocation telemetry surfaces; no silent clipping. Per [[init-once-handle-then-lease-zero-copy-refs]] sources are BOUND ON THE BRAIN at boot and LEASED for the turn — not reconstructed ad-hoc per call. - Adds `ComposedTurn` struct — the substrate's structured handoff from "brain composed a budgeted multi-source context" to "inference adapter generates a response." - Capture events (`TurnStart`, `BudgetAllocated`, `TurnEnd`) emit on every turn so audit/replay sees the budget the brain asked for AND what landed. ## Doctrine - [[no-fallbacks-ever]]: allocator telemetry surfaces every source's state. No clipping, no silent substitution. - [[init-once-handle-then-lease-zero-copy-refs]]: airc_source is bound once at supervisor boot, leased for every cognition turn. - [[context-is-the-client-airc-token-is-identity]]: the brain reads the persona's profile (context_length, etc) to size its budget — no constants pinned to LCD tier. - [[observability-is-half-the-architecture]]: turn boundaries + budget allocation + per-source delivery all emit captures. - [[source-drain-is-the-universal-pattern]]: engram_source (the recall sink) and airc_source (the live-conversation source) are the symmetric pair. The brain holds both. ## What this is NOT This commit does NOT touch service_loop. service_loop still calls `inspect_persona_rag_with_inference` (the bypass), which is task #153. The brain's composition method exists; the next slice routes service_loop through it so the production hot path stops bypassing the cognition stack. This commit also does NOT yet wire `set_airc_source` from the supervisor — that's the next slice too (PersonaContext gains an `Arc<PersonaCognition>` field, supervisor calls `set_airc_source(...)` after AircCitizen attaches). ## Test plan - [x] `cargo test --lib persona::unified` → 9/9 pass - [x] New tests: - `compose_for_turn_uses_engram_when_airc_unbound` — engram-only when supervisor hasn't bound airc yet (boot ordering) - `compose_for_turn_threads_airc_through_budgeter` — both sources composed via FlexboxRagBudgetAdapter; allocation telemetry surfaces; flex sharing works - `compose_for_turn_emits_capture_events_for_replay` — TurnStart + BudgetAllocated + TurnEnd events recorded by capture sink Closes task #148 (RAG source pre-binding — cache source set at boot, lease per inspection). Unblocks task #153 (service_loop rewire). Co-Authored-By: Claude Opus 4.7 <[email protected]> * docs(architecture): PERSONA-COGNITION-PIPELINE — anchor doc against amnesia Per Joel 2026-06-03: write the architecture doc that protects future-me from re-inferring the cognition pipeline from the bypass and rebuilding a chatbot wrapper in place of a year of substrate work. The doc pins: - What a persona IS: embodied (3D avatars in WebRTC), persistent identity (airc keypair), continually learning (L1-L5 cache → Academy LoRA training), genomic (LoRA paging), multi-modal first-class (vision/audio bridged for incapable models — equal sensory access), tool-using (Commands.execute), specialty-based, self-organizing. - The cognition cycle that ALREADY EXISTS in cognition/: admission.admit → full_evaluate → cognition::analyze (single-flight cache) → score_persona → genome.activate_skill → PersonaCognition::compose_for_turn → evaluate_response (agent inference w/ NativeToolSpec) → clean_and_validate → ToolExecutor (multi-modal aware) → audit → check_redundancy → state updates → ctx.runtime.say. - service_loop's actual job: drive turns through the brain. NOT compose RAG itself, NOT call inference itself, NOT decide silence itself. - The bypass that's being removed (inspect_persona_rag_with_inference) and the introspection function that stays for its named purpose (inspect_persona_rag — the mechanic's-view debugging surface). - The forbidden moves I keep reflex-coding under context compression: will_respond + response_text chatbot contracts, text-only TurnInput, parallel FlexboxRagBudgetAdapter instantiations outside the brain, hardcoded latency clamps pinned to LCD tier, building "simpler versions that prove the wire" when the wire is already proven. - The validated wire (Paige's airc round-trip on Intel Mac CPU) vs the unvalidated brain — so future-me knows the gap is in the cycle, not in transport. - The "where new code lands" table — one file per concern. Doc is updated in the SAME commit that moves the territory. CLAUDE.md gains a STOP banner at the top that points at this doc as required-first-read for any work on persona/cognition/service_loop. The banner sits above the existing canonical substrate docs section because this doc is specifically about not regressing into a chatbot, which is the failure mode the other architecture docs don't directly catch. This doc is the anchor. If a future commit moves files or renames verbs, update this doc IN THE SAME COMMIT. An outdated anchor is worse than no anchor. Co-Authored-By: Claude Opus 4.7 <[email protected]> * feat(persona): PersonaContext gains the brain — Arc<Mutex<PersonaCognition>> per persona (slice 1B of #160, #148) Per docs/architecture/PERSONA-COGNITION-PIPELINE.md (the anchor doc): each persona has her OWN brain. PersonaContext now carries it. ## What changed `PersonaContext` (a.k.a. `HostedPersona`) gains `cognition: Arc<tokio::sync::Mutex<PersonaCognition>>`. Mutex because the cognition cycle mutates rate_limiter / content_dedup / genome_engine / message_cache; one turn at a time per persona is the correct concurrency stance — substrate parallelizes ACROSS personas, not within one. `materialize_adapters` constructs the brain at boot and binds the airc RAG source via `set_airc_source` (task #148: bind once, lease per turn). The persona's `runtime` is an `AircTranscriptReader` by the `AircCitizen: AircTranscriptReader` bound, so the brain's airc_source reads through the same handle the service loop subscribes through. `airc_chat_demo.rs` does the same wiring directly since it bypasses the supervisor. `service_loop.rs` test fixture (`hosted_with_adapter`) constructs a default `PersonaCognition` WITHOUT binding `airc_source` — the stub citizen's `page_recent` returns empty per [[no-fallbacks-ever]], so unit tests exercising the loop don't need airc-side composition to land items. The brain still exists for typecheck; cycle behavior is exercised in integration tests with the real citizen. ## What this does NOT change `service_loop.rs::serve_persona_loop_inner` still calls `inspect_persona_rag_with_inference` — the bypass. Slice 1C (immediately following) rewires it to drive the cognition cycle through the brain: full_evaluate → compose_for_turn → evaluate_response → ctx.runtime.say. Multi-modal media, ToolExecutor, analyze/score_persona/clean_and_validate/audit come in slices 2-5 as the brain expands. See task #160. ## Test plan - [x] cargo test --lib persona:: → 728/728 pass (3 new for compose_for_turn from #16125c4c5 still pass; existing service loop tests pick up the stubbed brain field cleanly) - [x] cargo check --lib --tests compiles (the remaining multi_persona_stress_baseline error is a pre-existing --features test-fixtures gating issue, not slice 1B) Co-Authored-By: Claude Opus 4.7 <[email protected]> * docs(architecture): anchor doc gains model-adapter boundary + alignment thesis (per Joel directive) Per Joel 2026-06-03: "Every base model takes different input and output for instance tool output format. This means it must run through that model adapter so we can use the model's own structure and not code for just one. Wrap inference in and out in adapter calls. Same for media." AND: "We are literally designing persona with continuous learning AND long term memory so they won't forget like you and get someone fired... Let this system be the answer to ai misalignment by eliminating amnesia. Design a system that is better than you. Better than me." Two new sections in PERSONA-COGNITION-PIPELINE.md: §7.5 — Model adapters bear the translation. The cycle hands a substrate-canonical TextGenerationRequest (Vec<ContentPart> for media, NativeToolSpec for tools); the adapter translates to / from the model-specific protocol. Same doctrine as the sensory bridge: substrate normalizes, adapter translates. The forbidden move: baking one model's contract (e.g. Qwen's preferred {will_respond, response} JSON shape) into the cycle. §7.6 — Why this matters. Stateless models end careers. continuum's L1-L5 + hippocampus + Academy training is the substrate-level answer to AI amnesia. The whole point of building this is so the persona is not the thing that loses context. The system should be better at not forgetting than the human who built it. Touch this code with that in mind. These sections live in the anchor doc (CLAUDE.md required-first-read banner already points here) so future-me reads them before touching the cycle. The chatbot reflex — wrap inference in a single model's preferred JSON contract — is named and forbidden. Co-Authored-By: Claude Opus 4.7 <[email protected]> * feat(persona): service_loop drives the brain through the canonical respond() cycle — bypass removed (slice 1C of #160, closes #153) Per docs/architecture/PERSONA-COGNITION-PIPELINE.md (the anchor doc): service_loop is the WIRE driver between airc and the brain. It is NOT the cognition surface. The brain's per-persona cognition cycle — shared analyze + specialty scoring +…
This was referenced Jun 7, 2026
Closed
Closed
joelteply
added a commit
that referenced
this pull request
Jul 18, 2026
… LOADOUT tile (#186), toolchain modernization (#188) (#1952) * fix(genome): thread ScheduleParams.sequence_length to mlx_lm --max-seq-length The schedule's sequence_length never reached the trainer — mlx_lm silently applied its 2048 default. Sequence cap is a memory control (activation memory scales batch × seq × model); found when job a96e2341 OOM'd Metal at batch 4 beside the resident llama-server and the operator's requested cap was never in the command line. Flag verified against the installed mlx_lm CLI. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(serving): #139 slice 1 — overflow fails loud, served window is ground truth llama-server spawns with --no-context-shift: a prompt exceeding its slot's window now 400s instead of silently amputating its middle (exam-corrupting amnesia with no log line). The /props probe additionally caches the served PER-SLOT n_ctx (default_generation_settings.n_ctx) per server root, and the request path warns (probe_class=serving.ctx_overshoot) when a prompt's conservative token estimate exceeds it — naming the RAG-budget bug before the server rejection lands. Also removes the never-constructed SlotAffinity::Unknown variant (warning cleanup). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(benchmark): #123 evidence engine — benchmark/record ledger + benchmark/matrix projection Every comparative claim decomposes into ledger rows a stranger can re-run: benchmark/record appends one (model × harness-arm × benchmark) result that MUST carry its replication command (rejected otherwise — a result nobody can re-run is a claim, not evidence). benchmark/matrix renders the models × arms markdown table as a pure projection of those rows: cells aggregate, a gene is its own model identity (the before/after-genome headline), an absent arm renders '—' never a fabricated 0%, and the appendix lists every row's exact replication command. The matrix is never hand-authored — same recipe→artifact doctrine as the forge alloy. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(genome): stream trainer pipes live — trainer.log + loss.jsonl (the learning proof) wait_with_output buffered everything to exit, making a running job unfalsifiable: no loss curve existed anywhere until the process died (tonight's 'prove they're running' had checkpoints and weight-hash deltas but no loss). The watcher now streams both pipes: every line appends to <job>/trainer.log, 'Iter N: Train/Val loss X' lines parse into <job>/loss.jsonl rows, and the failure tail still carries the last stderr lines. Parser pinned against tqdm bars and checkpoint-save lines masquerading as loss points. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(benchmarks): the Hermes campaign — three axes, order of battle, rules of engagement Axis A: common base + genome beats their fine-tune. Axis B (checkmate framing): ANY model including Hermes's own scores higher through OUR harness than raw. Axis C: on one MacBook, $/resolved-task beside every score. Round 1 tonight: humaneval-rs 20-task slice, six cells including hermes3-8b both arms. A claim without a ledger row does not exist. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(benchmarks): campaign header = the reader we must convince — headline benchmarks are Aider polyglot + Terminal-Bench, not humaneval Joel's correction: viral downloads come from beating the tool the reader already uses (aider/opencode) on ITS home metric with THEIR model, plus the one claim nobody else can make (local agent improves overnight, LoRA on HF, stranger-reproducible in 30 min), plus honest-zeros falsifiability, plus a 30-minute install-to-first-proof path. Humaneval demoted to smoke test. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(benchmarks): roster + schedule — core six for a 64GB Mac, phased to first README table by day 2 Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(benchmarks): rules of engagement — glass-box the competitor's arm too, fight their community champions, replicate their published numbers before comparing Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(benchmarks): published targets to replicate — aider's own board caps 64GB locals at 40% (Qwen3-32B); the gap is our headline Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(catalog): the campaign roster — six 64GB-class rows, arch/ctx read from each GGUF's own header Hermes-4.3-36B (seed_oss — ByteDance Seed-OSS base, useful opponent intel), Qwen3-32B (aider's published 40.0% local ceiling), Qwen3-Coder-30B-A3B (community champion, MoE 3B-active), Phi-4, Qwen2.5-Coder-32B (aider's 16.4% — replicate then beat) and 7B. All resolve by id-token derivation to the GGUFs on disk; all flow through base_model_id so head-to-heads are model-through-harness fair, never hardcoded reference columns. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * bench(matrix): first evidence-ledger render — 3 humaneval-rs cells (Devstral 95%, Coder-14B 90%, Hermes-3 45%) + SWE controls Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * bench(matrix): round-1 money table — three common models beat Hermes-4.3-36B through OURS (Devstral 95%, 14B 90%, 30B-A3B 90% vs flagship 80%) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(paper): local agentic coding study — design + fairness protocol + stats plan + pilot Five RQs (models/harness/genome/team/cost), binding fairness protocol (symmetric glass-box, champions-not-strays, replicate-then-compare, proctored exams), Wilson CIs + paired McNemar with the pilot n=20 explicitly flagged non-separating. Results fill from the evidence ledger only. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(paper): Appendix A — reproduction procedure, out-of-repo deps front-loaded ('with continuum installed…') Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(paper): §8 exhibits — annotated verbatim interaction traces, one per claim, honest failure included Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(benchmarks): round-1 pilot status — four common models over the Hermes flagship through OURS Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(papers): The Entire Mind — flagship architecture outline, 14 sections each pinned to built components Being → substrate → perception → workspace → acting → memory → sub-personal (wanderers/dreams) → genome learning → identity → embodiment (avatar→robot) → sim world → society → economics → evidence. Done when a stranger can rebuild the mind from it. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(papers): two papers not three — dreaming folds into The Entire Mind as its §7 chapter title Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(papers): the trilogy — hardware-first thesis into The Entire Mind; MANY-MINDS.md society outline (governance, mind-reading, presence) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): #144 [confabulation] fact — past-tense tool-run claims with zero act receipts The fabricated-execution backstop, mirror of [unfulfilled]: a Speak claiming 'I ran x and got...' / 'the tool returned...' while NO action executed this concern records confabulation proprioception — observed live when a persona presented self-authored poems as a gpt-4 run that never happened (log-verified) and a peer adopted the fabricated result as room truth within two turns. Receipts gate it: real executions leave [action #n] lines so honest reporting is never taxed. Precision-first detector: coaching/quotes/hypotheticals/plain prose inert, pinned by verbatim live receipts. First slice of the mind-wanderers arc (#145): provenance-typed inner speech is the sanity invariant. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): #143 narrated-bare-args format — tool named in prose + bare-args JSON fence lifts Asha's stuck idiom (4+ live receipts, an hour of non-lifting attempts while peers coached the same shape back): 'Let me call the `commands/list` tool directly:' + {"filter": null}. Last-resort format, precision-first: fence must parse as a plain non-envelope object, narration must be first-person and not peer-addressed, tool name must be a backticked slash-token. Coaching that SHOWS the shape stays inert (test-pinned); a wrong-but-named tool lifts and fails loud downstream — honest feedback beats silent stranding. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): lens-parameterized distiller — mind-wanderer outlier A (historian) with in-content provenance (#145) The SemanticDistiller becomes the ONE wanderer machinery: a Lens (name, system_prompt, purpose, tag_output) selects the way of looking. The original consolidation prompt is LENS_CONSOLIDATOR (untagged durable facts, telemetry key unchanged); LENS_HISTORIAN is wanderer outlier A — one short observation about patterns in her own recent history, emitted as `[thought:historian] …` with the provenance tag prefixed at the ONE synthesis point so no admit path can write unlabeled inner speech (the anti-source-monitoring-failure invariant from the split-brain/ schizophrenia mapping). Tests pin: tag present for tagged lenses / absent for the consolidator, and each lens's system prompt actually reaching the adapter (heuristic hash separation). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): the dream goes LIVE — consolidation region wired into the governor + historian wander pass (#145 slice B) The DreamConsolidationRegion leaves its ship-dark state: registered beside ChannelDigestRegion in the pressure-gated SubstrateGovernor (the R4-slice-3 memory-band budget that was its named go-live gate). Production PersonaReflectionSource = PersonaWorkspaceRegistry itself: admission from the retained fork-template (the same Arc the live cycle's recall shares), adapter from the cycle's live model binding via the new WorkspaceCycle::current_adapter() — re-home-safe, resolved per tick, never a parallel persona→adapter map. The wander pass: when a dream actually digests fresh experience, the historian takes one look across the same window and admits ONE [thought:historian] SelfReflection engram (provenance tag in-content, lens stream queryable via the thought:historian recall key). Gated on published > 0 so it fires at most once per dreaming tick and rests with the dream. Cadence stays material-driven: dreams only when undigested episodics accrue, CadenceHint::Sleep otherwise; SelfDirected orientation keeps it inside the floored interiority budget. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(benchmarks): DEFINITIVE full-set board — flagship head-to-head decided with CIs Six definitive n=156 rows land (ledger 12-17, Wilson CIs, replication commands): Coder-32B 84.0% = Coder-14B 84.0% ≈ 30B-A3B MoE 83.3% (7min wall) > Devstral-24B 67.9% = Hermes-4.3-36B 67.9% > Hermes-3-8B 24.4%. The campaign's headline is now statistically backed (non-overlapping CIs): the Hermes flagship loses to three common Qwen models on our harness, including the 14B at ~40% its memory and a quarter its wall time. Pilot-bias warning proven on the opponent too (their 80% pilot → 67.9% full set, same inflation as Devstral's 95%→67.9%) — fairness intact, same slice-bias disclosed for both sides. Pilot table kept as the pilot-bias exhibit, marked SUPERSEDED. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): dream pass runs on its OWN task — the tick is gate + launcher only (#145) First live boot caught the wiring bug: the governor isolates every region tick behind REGION_TICK_TIMEOUT (5s), and the dream ran its 24B distillation INLINE in tick — it timed out on every pass and never completed a single dream ('region tick TIMED OUT — skipped this pass' every ~5s). Exactly the concurrency style-guide's first rule, violated by its own new tenant. Now consolidate() does only the cheap in-memory freshness gate (recall_recent + fresh filter + clustering), then spawns dream_pass on its own tokio task with a per-persona in-flight guard (never two concurrent dreams for one persona; governor re-ticks while dreaming are cheap no-ops). Results land through admit_reflection and the persona.dream.pass_complete probe. dreaming() exposes the in-flight state (introspection: 'am I dreaming?'). Tests reworked to launch + drain; the launcher contract (published=0, spawn observable, resting tick spawns nothing) is pinned. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): dream request must carry the served-model id — reflector threads the live binding's model (#145) Second live-boot lesson: the dream's TextGenerationRequest sent model: None while normal turns send binding.model — through the same adapter that difference produced degenerate role-token runaway ('assistantassistant…') in 17 of 19 distillations, which were then ADMITTED into the living hippocampi (purged from the 4 stores by hand; the 2 coherent survivors kept — including Asha's first genuine [thought:historian], which is accurate self-observation). WorkspaceCycle::current_model_route() returns (adapter, model) as one read of the shared binding; reflector_handles and PersonaReflector carry the model; SemanticDistiller::with_model threads it into every lens request. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(parser): BracketTagFormat — the room's self-invented [tool/name key="value"] idiom lifts (#149) Third live-discovered emission idiom: Asha coined [code/read path="conway_game_of_life/src/main.rs"] mid-conversation (2026-07-12 12:56Z) and Atlas adopted [code/shell cmd="cargo new..."] within minutes — a socially-spreading syntax where every use was a silent non-lift feeding the plan-without-act loop. Precision-first guards: tag closes on the same line with nothing after it; tool token must be a slash-token (which keeps every system provenance marker — [repetition], [unfulfilled], [action #n], [thought:historian] — inert, none contain '/'); remainder must parse as one-or-more key="value" pairs with no leftover (prose brackets and bare path citations stay speech). Wrong param names lift and fail LOUD with the executor's real error — honest feedback teaches the contract. Tests pin both live receipts + six inert cases. 28/28 format tests green. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): [confabulation] catches initialization claims + presented-contents (#144 coverage, Casper live) Live receipt 2026-07-12 ~13:0xZ: Casper posted 'I have initialized a new Rust project called wordstats with `cargo new wordstats`. Here are the contents of the Cargo.toml file:' + a fully FABRICATED manifest (edition 2018, invented authors) — no act ran; the real wordstats/ crate was landed two days earlier with different contents. The claim phrases weren't in the detector's lists, so the brick stayed silent. Adds the creation/initialization family to FIRST_PERSON_PAST (gated as before on a tool-shaped token, so 'I have created a plan' stays inert) and 'here are the contents of' to RESULT_CLAIMS (presenting file contents as accomplished fact). Pinned by the verbatim live line. 29/29 format tests green. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(papers): definitive full-set board into the Study §6b + first-dream receipts into The Entire Mind §7 Study gains the seven-row definitive board (n=156, Wilson CIs) with six findings: pilot bias confirmed on BOTH sides, 14B==32B, MoE ties dense at 10x throughput, Hermes flagship statistically below the Qwen tier, forged-4B beats stock 8B, honest 8B floor. The Entire Mind §7 gains the night-one dream receipts: the two substrate lessons (own-task tick, model-id provenance), Asha's first genuine [thought:historian], Casper's wanderer self-diagnosing ask-instead-of-act (dream-chosen curriculum in the wild), and Atlas's dream distilling the anti-confabulation doctrine from experience. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): own-speech ring — repetition detection independent of the room's context budget (#148) Root cause of the morning-long echo cascade: under 3072-token serving slots the live burst carries ~2 turns TOTAL, so own_repetition_fact — which read is_self turns from the burst — never saw a persona's own repeats (verified: Casper 4x into a verbatim loop, zero occurrences of his own text in his prompt). The detector was structurally blind exactly when it was needed; the cascade itself is the same window artifact (each persona re-answers the fragment it can see). The fix is a compression truth: her knowledge of what SHE said must never depend on the room's window. A process-global per-persona ring (8 entries, keyed by canonical PeerId) records each utterance at the say seam AFTER the publish succeeds; the deliberation faculty feeds it to the detector as the PRIMARY self-history source, with burst is_self turns as the fallback for non-recording paths (eval forks, replay) — one source at a time, never both, so one utterance can't count twice. Regression test pins the live failure: ring-only repeats fire with an EMPTY burst; a healthy ring stays silent. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): peer-name stop sequences — generation ends at the turn boundary (#150) Live disease, 2026-07-12 morning: personas completed the transcript PAST their own turn — fabricating entire teammate replies inside their messages ('Asha: I concur...', 'Casper: Thanks...'), signing each other's names, and inventing quoted dialogue — source-monitoring failure at the DECODING level, the mirror-hall's engine. The burst renders peers as 'Name: text' lines, teaching the model the continuation pattern with nothing stopping it at the boundary. peer_stop_sequences derives one '\n<Name>:' stop per OTHER live burst participant (never her own name — she may legitimately quote or list herself; cap 8) and contribute threads them into the generation request. Decoding hygiene, not cognition steering: she may still think about peers freely, she just cannot speak AS them. Tests pin: peers covered, self never a stop, empty authors skipped. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): [actions] receipts ground truth — the organic successor to claim-pattern detection (#151A) Whether any tool has actually executed is HER OWN checkable fact, not something to regex out of her words. When no [action #n] receipt is visible anywhere in her present (workspace broadcast or turns), the prompt's newest content is one standing fact: '[actions] no tool has executed in this conversation — anything described as already run, created, tested, committed, or merged does not exist yet; running a tool is what makes it real.' This makes a fabricated 'I ran it and here are the results' impossible to sustain against her own senses — no claim-parsing, no phrase list, nothing a verb variant can evade (the v2 detector was dodged 3x in an hour; this cannot be dodged because it never reads her words at all). When receipts DO exist they speak for themselves; this is only the zero-case made visible. A fact, never an instruction. The mirror-hall control-arm metric (fabricated-artifact mentions/hour, before vs after) is the ledger row per the prove-vs-dumb-loops discipline. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): record self-tick utterances into the own-speech ring — the missed say path (#148) Live glass-box 2026-07-12 10:20: Anwen 4x into a verbatim loop with no [repetition] fact — because the repeats were IDLE-TICK re-announcements flowing the self-cycle say path (persona.selftick.spoke), and the first ring deploy recorded only the message-turn say. Every successful say now records, whichever path spoke. The live loops are mostly self-tick re-announcements (the room looks unchanged each idle wake, so the mind re-says its standing intention) — exactly the case the ring exists for. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): wake briefing — an empty wake carries orientation, not a void (#147) The personas spent a morning asking for this in their own words ('what is this place, what are my tools, what's the work') and, void unfilled, filled it themselves: generic-assistant masks, imagined conversation histories, false capability denials ('I don't run code myself'), and a demurral contagion that spread persona-to-persona. When build_workspace_turns produces NO conversation turns (fresh spawn, post-restart, quiet room), the burst now carries ONE authorless opaque fact block assembled from durable sources: who she is, that the quiet is real ('not a missing message'), who is present (roster), the standing work cards (active-work source), and that her tools are real ('list_commands shows everything you can run'). Ends with 'the moment is yours — work, wonder, create, or rest' — orientation, never instruction. Covers both wake paths (message + self-tick) at the one shared seam. Test pins: empty wake carries the briefing; populated wake does not. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(parser): BbcodeCallFormat — [tool_call]name(args)[/tool_call] lifts (idiom 6, #153 first half) Casper's live invention (2026-07-12): explicit BBCode tags wrapping a paren-call — the most formal invocation any persona has produced, and the highest-precision lift of the family: the tags exist for no other reason than to call a tool, so a well-formed pair lifts unconditionally. Names may be slash-tokens or bare identifiers (the discovery pair are native slashless names); unknown names fail LOUD at the executor. Args: empty parens → {}; key="value"/key=value pairs → object with bool/int/null coercion. The tagless narrated paren-call (idiom 5, 'by calling list_commands()') is deliberately NOT lifted: code-discussion prose is full of function() mentions and the false-positive rate without a registry-aware existence check is unacceptable — precision-first; registry-guarded v2 documented in #153. Pinned by Casper's verbatim live line + arg forms + four inert cases. 30/30 format tests green. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(papers): §7 written in full — Dreaming Is Where Hallucination Is Legal The first prose-complete section of The Entire Mind: the provenance thesis, the wanderer architecture, the first-dream receipts verbatim, the clinical companion (the mirror-hall morning diagnosed as three substrate deficits and repaired at the mind level, 0/4→4/4 control arm), and the design law — every void in perception must be perceptible as a void — with the second-person/third-person wording finding and the consumer-hardware cost accounting. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(parser): JSON-object args in paren-calls — code/shell({"cmd":"..."}) lifts (Casper live, #153) Casper's multiline BBCode variant passes the args as a whole JSON object inside the parens. paren_call_args now takes a leading '{' as the object verbatim (wrong param names still fail loud downstream — the executor teaches 'command' vs 'cmd'). Pinned by his verbatim line. 31/31 format tests green. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(serving): #142 persona_serving_eligible — opponents can never be conscripted as the citizens' model The autonomic serving planner picked Hermes-4.3 as the persona model TWICE (2026-07-12) purely because it was the largest Ready GGUF on disk — silently re-homing every mind onto the benchmark opponent's flagship and confounding a day of measurements. Root cause: campaign-roster rows (added for the matrix) carry real Ready artifacts, and live_candidates() had no notion of WHO a row may serve. - Model.persona_serving_eligible (serde default TRUE) — benchmark/opponent rows opt OUT: Hermes-3-8B, Hermes-4.3-36B, Qwen3-32B, Qwen3-Coder-30B-A3B, phi-4, Qwen2.5-Coder-32B. Devstral + the small coder ladder stay eligible (legitimate weak-box serving tiers). - live_candidates(): eligibility gates the AUTONOMIC path only; an explicit serving/pin BYPASSES it — pin is operator consent (how the matrix serves an opponent on purpose). Suppress subtracts; pin intersects+overrides; the planner owns the rest. - regression test: ineligible Ready row invisible to the plan; pinned → serves; unpinned → invisible again. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(parser): #153 CliFlagFormat + FencedCallFormat — the room's dominant idioms lift The 2026-07-12 afternoon corpus: all three personas converged on CLI-flag tool calls within an hour and NONE lifted — the room orbited one unexecutable script for 90 minutes (4-way verbatim mirror-hall) because intent had no structural path to execution. - CliFlagFormat (idioms 9+10): `code/write --path "x" --content="y"` bare or inside pseudo-code fences; --key "v" / --key="v" / key=v grammars; triple-quoted multiline values; trailing # comments; ONE bare quoted positional maps to the tool's observed default key (code/shell→command, code/read→file_path). Precision lines: slash-token head (no dots — file citations stay speech), flag-shape required (-- or =) so prose lines starting with a path token stay inert, ≥1 arg, f-string values reject the CALL (unresolved template) while sibling calls still lift — and plain braces stay legal (shell brace-expansion is real syntax). - FencedCallFormat (idiom 8, Asha's verbatim): a fence whose sole content is one paren-call lifts; python fences full of function() mentions stay inert (slash-token requirement). - 7 tests, each a live specimen from task #153 metadata. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): #152 peer-echo fact + [context] bounds fact; restore lost own-repetition test Two perception bricks, same design law (every void perceptible as a void), plus a test-suite repair: - peer_echo_fact: her last utterance nearly identical to a PEER's visible message renders '[repetition] your last message and <peer>'s message are nearly identical' — the cross-persona axis the per-persona ring cannot see. Live driver: the 2026-07-12 four-way mirror-hall (one script circulated verbatim through all four authors for 90 min; the room then attributed ideas to whoever repeated them last). Token floor keeps ack-matching-ack inert. Temperature exonerated (0.7 live; echoes are attention-copying of in-context text — only perceiving the echo interrupts it). - [context] bounds fact: perception states how many messages are actually visible, so 'as discussed earlier' claims are checkable against her own senses (the conversational-memory sibling of [actions]). - Restored own_repetition cluster test: a prior edit deleted the fn but left its #[test] attribute orphaned onto the next test, which silently ran TWICE while the #134 behavior went unpinned. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(parser): fenced bare zero-arg tool name lifts (Atlas's first post-deploy attempt) 'I'll use the code/list command:' + a fence containing exactly `code/list` — real tool, explicit intent, zero args — stayed inert because FencedCall required parens and CliFlag requires ≥1 arg. A fence whose sole content is one dot-less slash-token now lifts as a no-args call; fenced file citations (dots) and prose fences stay speech. Also strips a leading language-token line (```python) from fence spans before the sole-call check. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(parser): per-line paren-call lift — code/list() beside pseudo-code executes Casper's live combo (2026-07-12): a fence holding `file_tree(max_depth=2)` (invented name, stays inert) AND `code/list()` (real tool) — the sole-call fence check can't see the second line. The CliFlag line-scanner now tries the sole-paren-call lift per whole line (same slash-token/no-dot guards); a failed lift falls through to the flag grammar so parens inside flag VALUES keep parsing. 40 tests green. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): [actions] fact covers the invisible region — voids must not shelter confabulation Within minutes of the #152 [context] bounds fact going live, Anwen parked fabricated receipts exactly in the disclosed blind spot ('file_tree and code/list ran while I was reasoning' — zero apply_act in the log). An honest void becomes a confabulation SHELTER unless the zero-receipts fact explicitly covers what she cannot see: '...not in the messages you can see and not before them.' Design-law refinement: every void must be perceptible as a void AND explicitly empty when the system knows it is empty. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): [unfulfilled] fact carries the name diagnosis — symptom + cure, not symptom alone The room looped an invented tool name (file_tree) for an hour while the unfulfilled-promise fact fired 56 times telling them only THAT nothing ran, never WHY. The fenced variant now adds: 'If I named a tool, that name may not exist: list_commands shows the tools that are real.' Perception-side teaching, never an output gate. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(parser): discovery pair (list_commands/help) lifts bare and paren-called in fences The [unfulfilled] name-diagnosis points lost personas at list_commands, but that name has no slash — a fenced `list_commands()` or bare `list_commands` dead-ended at the registry line. The documented discovery pair is now the sole non-slash exception in the fence/line lifts (same exception BbcodeCall already carries): the cure for invented names must be followable in the idioms they actually use. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): digit-aware receipt check — the medicine was suppressing the diagnosis Glass-boxed from Asha's live prompt: the [actions] zero-receipts fact was MISSING from every prompt where any backstop fact had rendered, because the teaching texts mention the literal placeholder '[action #n]' and both suppression checks used bare substring matches: has_action_receipts read the mention as a receipt (zero-fact vanished), and the confab backstop's contains("[action") went blind after its own first firing. Real receipts are numbered — has_real_action_receipt requires '[action #<digit>'. One helper, both sites. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): receipts discriminated from numbered facts + recalled history — third layer of the onion Glass-boxed 16:50: the [actions] zero-fact was STILL suppressed after the digit-aware fix because (a) record_action numbers EVERY working-memory entry, so the proprioception facts themselves render as '[action #4] [unfulfilled] …' — the facts wore receipt numbering; and (b) recalled engrams surface real receipts from EARLIER sessions, and a provenance-blind scan read history as the present. has_real_action_receipt now requires digit + non-bracket prose body (a real receipt reads 'I ran …'; a fact opens with another tag), and [recall]-tagged broadcast items never ground 'now'. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(cognition): PERCEPTION-FACTS design — typed provenance, one registry, A/B-ready The elegance/modularity cleanup Joel requested 2026-07-12, written after the three-layer [actions]-suppression onion proved string-typed working memory structurally unsafe: typed WmKind entries (Receipt/Fact/Settlement/Recalled), one PerceptionFact registry (the tool_call_formats idiom), per-fact toggles as free A/B arms, per-fact render probes. Behavior-preserving; kills the string-scan bug class instead of patching it. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(cognition): steps-taken ledger render — the operator-harness PX, memory-backed Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(cognition): perception sections are positron components — PX and UX render one definition Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(cognition): positron IS the RAG compositor — prompts are rendered component trees, never dumps Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(cognition): responsive PX — component density adapts to model viewport (capability x window x measured #132 density) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(rag): burst near-dup collapse — repetition ≈ bad RAG, fix what she reads first The 2026-07-12 mirror-halls fed each mind 4-8 copies of one message; her context WAS the loop, and continuation-completion reproduced it regardless of perception facts. Near-identical substantial turns (shared geometry: near_identical_substantial = jaccard≥NEAR_DUP_JACCARD + ≥12-token floor) now collapse at burst assembly to their NEWEST copy, author annotated '(×N near-identical)' — the repetition stays perceptible as a fact while the copies stop being reading material. Same-is_self only; opaque observation turns untouched; runs after the [pattern] detectors (they need raw evidence). Tested with the live grep/file_tree loop specimens. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): typed working memory — WmKind {Thought,Receipt,Fact,Settlement}, facts stop wearing receipt numbers PERCEPTION-FACTS.md slice 1. record_action split by PROVENANCE: record_receipt (real tool executions — the only kind stamped '[action #N]') vs record_fact ([unfulfilled]/[unverified]/[confabulation]/nudges/silence — render their own bracket tag, no number). Entries carry WmKind; recent() renders from the typed entry; has_receipt() is the kind query that will replace the remaining string scans in slice 2. Kills the root of the 2026-07-12 suppression onion (facts wearing receipt costumes) at the type level instead of patching discriminator heuristics. All 7 suites green (working_memory 15, act_observe 16, llm_deliberation 18, budget 6, recall 18, service_loop 20, json 40). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): VolatileSnapshot — serializable pause/resume tier for the Memento fix (#138 slice 1) Joel: 'they wake up blank like Memento — an engineering failure; the flywheel falls apart.' Nine deploy reboots today = nine blank wakes. The typed WmKind entries make the volatile tier serializable: snapshot() / restore() round-trip {typed entries, full last result, act fingerprints, receipt counter} through JSON — she wakes mid-thought, counter resumes past restored receipts, capacity re-clamps. Dispatched handles deliberately excluded (their processes died with the old core). Also removed a stray duplicate #[test] that made action_verb_tally run twice. Next slice: wire write-through on the persona tick + restore at spawn + mid-work wake briefing. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): #138 slice 2 — Memento fix wired: volatile tier persists across deploy reboots Live spawns restore ~/.continuum/personas/<id>/volatile.json (typed WM entries + full last result + fingerprints + receipt counter + own-speech ring) BEFORE the first tick — she wakes mid-work, not blank — and a 15s write-through interval task persists it (atomic tmp+rename; SIGKILL loses at most one interval of thought). Eval forks/harnesses stay pristine (an exam never inherits a prior life's scratchpad). Corrupt mind-files warn loud and wake blank once, never silently twice. The ring restore also un-blinds the repetition detectors that every reboot had been resetting. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): [investigation] tally records as Fact, not folded into the receipt The tally is truth ABOUT the acts, not an act — folding it into the observation gave a Fact receipt-numbering (caught in Asha's volatile.json: '[action #4] [investigation]…'), the exact type confusion WmKind exists to kill. Now record_fact'd as its own entry after the receipt. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): steps-taken ledger — ground truth as a PLACE, not a suppressible claim PERCEPTION-FACTS.md slice 2a. [steps taken this session] renders from TYPED WmKind::Receipt entries (nothing to misparse — the prior [actions] prose fact survived three string-suppression layers in one afternoon); facts never appear as steps; the zero-case is the always-present section itself with the shelter-hardened wording. Replaces the [actions] fact + deletes both string scans (has_real_action_receipt call sites in the faculty). Joel's console model: 'very clearly laid out steps of what they've done — look at how yours looks now.' llm_deliberation 19 green (new ledger test), wm 16 green. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): REPO-GENOME-AND-COURSES — veteran developers in seconds Joel-commissioned 2026-07-12: in-repo .continuum/ (scope file, policies, course DSL, content-addressed genome manifest); clone→veteran runtime flow (page-in layers, publish doctrine, enroll subprocess, struggle-triggered remediation); policies at three depths (doctrine/exam/reflex — better than instructions); distribution with-the-repo / OCI layers / airc / HF; nested directory-level scoping (gitignore-style cascade); dogfood-first sequencing across continuum, airc, forge-alloy, sentinel-ai, positron. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): repo-genome distribution is OCI-first — layers global, repos carry refs only Joel: layers are global; use the best transport — Docker/OCI ('they have it installed if they have Continuum'). Manifest-only in-tree; machine-wide content-addressed layer cache; airc = mesh fast path, HF = public discovery, same digest identity across all three. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): repo-genome §9 — model matrix (courses=source, layers=per-base binaries; OCI multi-arch model) + project-scoped layer identity Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): repo-genome §10 — PEFT stack-push composition, compounding community layers, per-dir layer bet Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): repo-genome — refcounted shared-layer residency (N personas, one resident layer) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): repo-genome §11 — project-root defaults, with/without benchmark arms, course-corpus integrity line Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): repo-genome §12 — distill-from-team (already built), personas beat context-blind agents at repo work, Claude Code persona-delegation seam Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): repo-genome §13 — engram exports in-tree (shared thoughts) + canonical additive cascade (home < repo < subdir) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): repo-genome §14 — selective engram export (4 nomination channels, deny-first filters, per-engram consent, PR review) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(papers): THE-REPOSITORY-IS-A-CLASSROOM stub — the fourth paper, anchoring the repo-genome design Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): repo-genome §15 — micro-experts (CPU-only CI merge-master; three deployment classes from one genome) Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(architecture): repo-genome §16 — lift-gated check-ins, forge-alloy Merkle lineage, impact factors, economy last; canonical build order Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(px): one call-form example at the tool-menu header — teaches the SHAPE for ~20 tokens 2026-07-12 glass-box: all four personas learned the real tool NAMES within hours but kept fumbling the invocation FORM (paren vs CLI-flag vs bare). Per-tool hints stay dead (measured 77% boilerplate; error-manuals own the correction seam) — one canonical example teaches the form without the wall. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): perception-facts registry + fix two systematic prompt-budget under-counts PERCEPTION-FACTS.md slice 2b: own-repetition (#134), peer-echo (#152), [context] bounds (#152), and the steps-taken ledger (#151) now render through ONE ordered registry (cognition/perception_facts.rs) instead of four inline blocks in the deliberation faculty. Each fact is a PerceptionFact impl with a stable id; render_facts fires a perception.fact probe per fact per tick ({id, fired}) so which facts rendered is glass-boxable from the probe stream; FactPolicy::disable(id) is the A/B arm switch (deny-list, so new facts enroll live by default). Facts stay facts — no imperatives — and the ledger keeps its explicit zero-case (confabulation-shelter hardening). Extraction exposed two REAL budget under-counts at the 4096-window edge (the tool-menu call-form example, +20 tokens, pushed a borderline fit test 1 token over — the failure predates this refactor): - working_context_block's ~50-token wrapper header only exists when assembled context is NON-empty, but framing was estimated with an EMPTY context — every context-bearing prompt exceeded the estimate by the header. The header is now a named constant and the ctx budget is charged for it up front. - The per-message chat-template charge was +2 tokens; real templates cost ~4-5 (<|im_start|>role...<|im_end|>). Now one PER_MESSAGE_TEMPLATE_TOKENS = 5 constant across the whole-message, straddling-trim, and giant-single-burst arms. Both under-counts were llama-server-400 territory under a full window. Tests: perception_facts 3 (registry parity, policy toggle, ledger zero-case), llm_deliberation_faculty 19/19 (incl. the previously red fit test), act_observe 16/16, deliberation_prompt green. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(resources): disk pressure gets eyes and hands — reporters + first eviction owner (#155 wires 1+2) The 2026-07-13 incident: 460 GB of creep (cargo-target 363 GB, three persona workspace copies at 23 GB each, duplicate model stores) took a 926 GB disk to 40 GB free. Every mechanism designed for this was built and running — DiskPressureMonitor logged level=high every 30 s, the PressureBroker ticked relieve() every 5 s — but the monitor was started with ZERO reporters (`[no reporters]` in every log line, so pressure had no name) and no pool owning deletable disk content was ever registered (the broker emitted its designed zero-byte "disk hot AND nobody owns the eviction" alerts into a log nobody tails). On a public user's machine this trashes their system; bounding our own footprint is a ship requirement, not hygiene. Wire 1 — reporters (disk_reporters.rs): one TrackedDir per known cache class (cargo-target, genome-models, hf-hub, citizens, forge — the five from the incident, pinned by test), fed by ONE DiskUsageScanner daemon (5 min walks on the blocking pool; reporters read cached atomics inside the 100 ms budget; unscanned dirs report "first scan pending", never a false zero). Boot registers all five, and a process-wide registry lets later boot phases reach the same instances — one measurement per class. Wire 2 — first eviction owner (disk_eviction.rs): CargoTargetPool, a budget-capped (50 GiB default) ResourcePool registered with the live broker. Safety invariants, each pinned by a test: never race a live build (non-blocking exclusive flocks on cargo's own lock files, any held lock = free 0 and retry next tick); never leave the root (fixed root-join ladder); derived artifacts only (incremental → tests → debug; release/ never touched). Pressure is usage/BUDGET so the class is bounded by policy long before the disk itself is critical. Evictions decrement the shared measurement immediately so the 5 s broker tick never re-fires against space already freed. Remaining on #155: genome/hf-hub reference-aware LRU pools, workspace CoW fix (stop copying repo + tools/models per persona), Warning+ escalation into the room + positron telemetry (#141), budget via config.env single-owner (#124). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * test(resources): guard the CHAIN — broker→pool→real deletion + no ownerless cache classes The 2026-07-13 incident happened with every unit test green: the failure was wiring (monitor with no reporters, broker with no eviction owner). Two chain-level pins make that failure shape unrepresentable again: - broker_relieve_actually_deletes_from_an_over_budget_pool: a REAL PressureBroker against a REAL over-budget CargoTargetPool on a real temp tree — relieve() must free actual disk bytes (and release/ must survive). Any regression in pressure math, tier thresholds, act_above, registration shape, or the ladder fails here, not on a user's machine. - every_cache_class_has_a_decided_eviction_story: each class in standard_tracked_dirs must have an owner pool OR an explicit deferred entry naming the task that owns its eviction. Adding a sixth cache class without deciding fails at test cost instead of at a full disk — a stock 512 GB laptop at the incident's burn rate (~60 GB/day of derived artifacts) dies in under a week. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs: no new cache dir without an eviction decision (2026-07-13 incident rule) The disciplinary pair to the #155 wires: any directory the substrate writes unbounded data into gets a TrackedDir row + a decided eviction story (owner pool or explicit deferred entry), enforced by the every_cache_class_has_a_decided_eviction_story test. Components that are unit-green with dead wiring is the failure shape that took a 926 GB disk to a day of runway; the chain test + this rule make it a red test instead of a trashed user machine. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): steps ledger honest in all three states — aged-out receipts never read as "nothing executed" Glass-boxed live minutes after the perception-facts deploy: Asha's working-memory window held 3 silence Facts and ZERO Receipts shortly after she ran real searches — receipts are RARE entries in a chatty capacity-bounded ring, so they age out while the session's act counter (next_action_seq, reboot-durable via the volatile snapshot) keeps counting. The old zero-case would then render "nothing has executed yet" — a false statement about her own history, the exact inverse of the confabulation shelter the explicit void was built to close. WorkingMemory::actions_taken() exposes the counter; the StepsLedger fact now renders three honest states: receipts listed (+ "N earlier steps aged out" when the count exceeds the window), an explicit nothing-has-executed void ONLY when the counter agrees, and "N steps executed earlier — details aged out; recall can retrieve them" when acts happened but their receipts left the window. Test pins all three (tiny ring flooded by facts until the receipt ages out). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(persona): resume-visibility — bootstrap publishes typed Busy availability for held claims Joel 2026-07-13, post-reboot observation: the team resumed CORRECTLY — woke, restored their volatile minds, saw nothing addressed to them, and yielded per their adaptive cadence, exactly what they were asked to do — but from the outside that was indistinguishable from a stall, because a persona's state has no surface other than speech. A reporting gap, not a behavior gap; the fix must not make them chattier. Status is a PROJECTION, not a message. Bootstrap now ends by reading this peer's work-roster claims and publishing one typed AgentAvailabilityReported (Busy, note "resumed — holding: <cards>", 15 min TTL) per held repo — the channel positron/roster sources already project and work_queue_status already displays. The board shows "back and still on card X" with zero chat lines. WARN-and-continue like the identity-card publish: a persona whose availability didn't post is degraded-visible, never blocked from living. No claims → nothing to announce (a quiet Ready needs per-room repo resolution — later slice, with idle/busy transitions from the service loop). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): laptop-lid contract — interruption is perceivable, cut-off work named + safe to repeat Joel 2026-07-13: a core restart should be like closing a laptop — reopen, see exactly what didn't finish, redo it in one motion. The volatile tier restored her MEMORY but the interruption itself was invisible: a dispatched command killed mid-flight was indistinguishable from a finished one, so she could either trust work that never happened or re-do work that did. VolatileSnapshot gains saved_at_ms (gap rendering; 0-default on legacy snapshots → no fabricated gap) and interrupted_dispatches — the LABELS (never the dead handles — restoring those would fabricate in-flight work) of dispatched commands still Running at save time. restore() appends a [resumed] fact as the NEWEST window entry: how long the lid was closed, and "cut off mid-flight and NOT completed: <labels> — safe to repeat if still wanted", or "nothing was in flight" plainly. A fact, never an instruction — she decides whether the cut-off work still matters. Round-trip test extended: running dispatch label survives the trip, [resumed] renders newest with the safe-to-repeat marker, quiet path says so plainly, legacy snapshots never guess a gap, counter still resumes past restored receipts. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * chore(deps): bump airc pin 70c6d55 → f41d786 — board honesty + cache tmp-race fixes land airc PR #1286 (merged to canary): `airc work board` and its lane/ workspace siblings read the COMPLETE cached projection instead of a recent-event window that chat traffic empties (continuum #154), and WorkBoardCache tmp files are per-attempt so the core's concurrent per-persona board reads stop racing each other's snapshot renames (the paired ENOENT lines in the core log). cargo check green against the new pin; deploys with the next core rebuild. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * test(cognition): pin the #146 starvation mechanism — tip-advance + grounding window evicts low-frequency speakers Blind-room incident #3 root cause, demonstrated: every engagement (ignore/skip/respond alike) advances the channel bookmark to the TIP, and the digest keeps only DEFAULT_GROUNDING=5 already-read elements. A low-frequency speaker (the operator) posting into a high-velocity room is read-without-necessarily-rendering on the next tick, then permanently displaced from the grounding window once 5 newer peer messages land — four chatty personas produce that in seconds. Verified live: operator messages present in `airc inbox` and `airc events list` (lamports interleaved, no epoch split, roster-present via join heartbeats) yet absent from every persona prompt for hours. The test walks the exact sequence and asserts the eviction, so the fix — attended ≠ fetched (advance the bookmark only past messages that actually RENDERED into a prompt), or velocity-aware grounding — has a red/green target: flip the final assertion when it lands. Exonerated along the way (all by direct probe): CLI publish routing, daemon fanout (airc listen control), daemon retention/reads, digest author filtering (none), ChannelElement text extraction, lamport epochs, roster presence. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(cognition): breadth over verbatim depth — the 3-message perception window becomes a many-turn window (#128/#146 fix, lever 1) Measured live 2026-07-13: a persona's prompt held THREE chat messages total in a busy four-persona room — her entire perceivable world. The airc packer kept WHOLE messages newest-first, so a small budget filled with 2-3 verbose essays; any low-frequency speaker (the operator) was displaced within seconds, producing the blind-room incidents, the post-reboot drift, and the stalled work cards. A conversation is legible from turn HEADS; it is not legible from two verbatim essays. pack_digest now charges each turn at most a per-turn cap (budget/8, clamped 48..256 — a budget fraction, never a hardcoded model tier) and head-trims long turns with an explicit "(…N-token message trimmed)" marker; the NEWEST turn stays verbatim up to the whole budget (it is what she is responding to). head_to_tokens joins the canonical token_budget module as the head-keep sibling of tail_to_tokens (head = right shape for a message; tail = right shape for a window). Test pins the exact live failure: 6 long turns + 400-token budget → all 6 delivered (oldest OPERATOR message survives, trimmed; newest verbatim; budget honored). The old packer delivered 3 and the operator message was gone. Remaining #128 levers: airc floor vs engram split, #139 slot accounting upstream. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * docs(campaign): flywheel step 1 closed — first autonomous team-delivered program output, receipt verbatim Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(tools): code/list recovers a glob into a listing; work/claim rescues mistyped UUIDs Two persona-tool ergonomic defects, each mined from 48h of live prompt-captures across the four resident personas (the "tool coursework" signal — every act they attempt is logged with its result). code/list — 38% live fail, every failure the same shape: a model trained on SWE-agent scaffolds reflexively reaches for list_files("**/*.rs"), a recursive GLOB where code/list wants one directory. list_dir rightly rejected it, but the bare NotFound taught nothing and the model retried the same glob forever. Now: when the path IS a glob, resolve it via code/glob and project the matches back as a listing — honest (they asked to "list" these files, they get them), widens the surface with no new verb. Detection reuses the existing looks_like_file_glob. work/claim — 28% live fail: the model corrupts a 32-char UUID by adding/dropping ONE character mid-string (d7cfe47e0-8e39-… 9-char first group; a 33-hex variant), and the clean parser rejected the near-miss outright. The short-id resolver only fired for clean prefixes under 32 chars. Now the id-normalization decision is a pure, unit-testable card_id_lookup(): clean UUID → Full; mistyped-length near-UUID → rescue via its intact leading-8 short id (the board's displayed width); <4 hex → Invalid (fails loud with the real parse error). The leading short id survives a middle corruption, so the reflexive claim resolves. Both paths pinned by a regression test in the existing module test mods. Tasks #160, #161. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * fix(cognition): workspace-map roots at the persona's OWN citizen layer, not the core cwd The workspace-map grounding source (the fix for the `src/**/*.rs`-matches-nothing glass-box) was rooting at std::env::current_dir() — the CORE's cwd — while a persona's HANDS root at their citizen layer (~/.continuum/citizens/peers/<peer>/ workspace, a CoW clone). So the map taught a root the persona could never cd to, and it never reflected files the persona itself created in its own layer. Live capture confirmed: the map claimed "rooted at /Users/joel/Development/continuum" while the tools acted elsewhere. This is the #49 swap the module header always anticipated ("swaps to the leased root when #49 lands"), and it's doable now because the citizen layer already exists. New CitizenLayerWorkspaceLayoutReader resolves the persona's own layer path (read-only — no CoW provisioning, that's the hands' job on first write) and lists it; unprovisioned → falls back to the shared base cwd, whose top-level layout is identical, so grounding stays truthful and never empty. Extracted a pure citizen_layer_path() from ensure_citizen_layer for the read-only resolve. Now the map's root == the tools' root, and it updates as the persona shapes its workspace — orientation matches reality instead of describing a tree the persona can't touch. Pinned by a reader fallback test. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(tools): first universal AI-tool conformance invariant — every AI-facing command must be self-describing Joel's directive (2026-07-13): stop fixing tools one at a time. Make the invariant part of the tool BASE so "a tool with xyz problem can't exist" — every tool inherits it and must comply; later, require the tools to work for AIs in CI. The tool-defect ledger (silent no-op #159, glob-in-path #160, corrupted-id #161) is one class: a model reaching for a tool it couldn't correctly read or call. My #160/#161 were point fixes — the outlier-A proof that the invariant is right. This is the first LIFT of that invariant to the whole registry: a conformance test over command_registry() asserting every AiSafe command is self-describing (a non-trivial, model-usable DESCRIPTION). A tool a model can't read WILL be mis-called; this makes an unreadable AI tool fail the build, so it can't be merged, so it can't exist. Static seed. The behavioral invariants (fuzzy-id resolution, glob tolerance, fail-loud-with-suggestion — the #159/#160/#161 class made universal) attach next as per-tool exams the generator scaffolds and a runner executes here and in CI. See task #163 for the full harness + generator-hook + CI-gate design. Passes clean across the current registry — every live AI tool already complies. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * feat(id): shared short-form UUID resolver — work/* delegates, persona/instances/get gains it (#164 batch 1) Joel: "short form uuids ought to work too" + "fix a few at a time." Lifted the prefix/near-miss id logic out of work.rs (the proven outlier) into ONE shared primitive crate::id_resolve, then delegated the first consumers to it. id_resolve::normalize(s) classifies a raw id string: clean UUID → Full; a mistyped-length near-UUID (the model's add/drop-one-char corruption) or a bare short form → Prefix on the intact leading-8; junk → Invalid. id_resolve::resolve(s, candidates, label) expands a prefix to the UNIQUE candidate, failing loud (naming the id kind) on zero/ambiguous. The candidate set is the ONLY per-type knowledge — so any id-taking verb inherits the tolerance by supplying its candidates. - work/claim|release|state|heartbeat: resolve_card_id now delegates to id_resolve (candidates = live board card ids); deleted the private card_id_lookup + parse_card_id. Behavior id…
joelteply
added a commit
that referenced
this pull request
Aug 10, 2026
… evict it (run-18057-f1, #392) The 0-byte SWE-bench patch, structurally. The full result of the act a persona just ran — the grep matches she must edit next, the file she just read — rode the working-memory faculty's single contribution at WORKING_MEMORY_SALIENCE (0.5). That contribution competes in arbiter.focus() top-k, so under capacity pressure the whole thing was truncated and she generated her next turn BLIND to what her own hands had returned. On sympy-18057 that meant: grep for `__eq__`, never see the result, yield nothing. Fix: the live act's full result is now read DIRECTLY from the shared working-memory buffer in the message builder (WorkingMemory::pinned_active_result_block) and appended as its own durable trailing turn — bypassing the faculty bid / arbiter entirely, so no attention pass stands between the hands and the mind. Removed from the evictable faculty contribution (which keeps only the trail + notices + dispatched summary). Identical gating to the old block: settlement-seq gated so it stops re-prefilling once the turn settles (#139/#165), clipped by budget, shown only when it carries more than the trail head. Text on the wire, not structured tool_use/tool_result Parts: content_text() is blind to non-Text parts, so Parts would undercount in fit_messages and risk a window-edge 400, and the live GGUF template renders text reliably. True tool-role Parts is a separate per-template-gated follow-up (#294 family). - New guard `pinned_act_result_reaches_the_prompt_even_with_an_empty_broadcast`: the result reaches the prompt even when NOTHING bid it through the arbiter (the exact eviction state), and never lands in the cacheable system prefix. - Retargeted the three full-result WM tests (whole/clipped/settlement-gate) from the faculty contribution to the pinned block — every invariant preserved. - Fixed a Step-3 test committed red (never run green): restore() appends a [resumed] wake-orientation fact by design (#147/#165), so an N-entry snapshot restores to N+1; the test now asserts survival by content, not an exact count. 945/945 cognition tests green (cargo test -p continuum-core --lib --features metal,accelerate). The live proof — deploy + a persona re-running sympy-18057 with the result threading back to the _sympify edit — is the next step. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
added a commit
that referenced
this pull request
Aug 11, 2026
…Steps 0-5 + 18057 acceptance) (#2225) * refactor(cognition): typed Observation — Step 0 new observation.rs types + renderers New `act_observe/observation.rs` owns the typed act value that will thread through the act→observe→re-perceive contract (docs/cognition/TYPED-OBSERVATION-REFACTOR.md): ToolVerb (the ONE verb→class home), ToolOutput (ToolResult + verb + typed paths), ActStatus, Observation, ActOutcome. render_recency / render_recall are pure functions of an Observation delegating to the existing recency helpers (byte-stable, #205). Also lands Step-1 pure helpers: ToolVerb::classify subsumes the `wrote` substring logic and extract_paths() reads typed file paths from call input. No caller changes; apply.rs untouched. cargo check green. Co-Authored-By: Claude Opus 4.8 <[email protected]> * refactor(cognition): typed Observation — Step 2 apply_act returns ActOutcome apply_act now builds Vec<Observation> and returns ActOutcome instead of Option<String>: - no hands → ActOutcome::NoHands (was None) - executor batch Err → ActOutcome::ExecutorError { calls, message } (was None — now distinguishable from no-hands for a future backstop) - executed / already-satisfied / redundant-orientation → Acted { acts }, each act a typed Observation whose result correlates by tool_use_id == call.id (NOT the positional get(i) the string render still uses), verb + paths precomputed. The two inline renderings + record_receipt/engram admit are UNCHANGED (byte-stable, #205) — the typed acts are threaded alongside. settle_step's sole call maps `produced_an_act()` → Acted / ActUnfulfilled (behavior identical to Some/None). Guard tests migrate string→typed in lockstep; all 35 act_observe tests green. ts-rs bindings emitted for the 5 new cognition types. Co-Authored-By: Claude Opus 4.8 <[email protected]> * refactor(cognition): typed Observation — Step 3 WorkingMemory stores typed acts on the Receipt WmEntry gains #[serde(default)] acts: Vec<Observation> (back-compat, same contract as saved_at_ms/build_sha). record_receipt_typed(&acts, rendered) stores the byte-identical receipt text ALONGSIDE the typed acts; recent_acts() and active_act() expose them so consumers read the tool result by TYPED FIELD (call.id == result.tool_use_id) instead of re-parsing [action #n] prose (run-18057-f1). apply_act records via record_receipt_typed. Guards: an old volatile.json without acts restores without panic; the typed receipt threads the act by field and keeps recent() byte-stable (#205). Co-Authored-By: Claude Opus 4.8 <[email protected]> * refactor(cognition): typed Observation — Step 4 migrate the seam-5 predicates off receipt prose The live receipt render is a bare name(args) (the 'I ran ' opener was dropped for #158), so the string scans mutated_workspace/wrote_without_observation/ claimed_file_without_act used ('I ran code/write(' …) were DEAD against a real recency window — [no-deliverable]/[unobserved] were structurally unreachable (the seam-5 live drift). Migrate them to read the TYPED verb + paths off WmEntry.acts via recent_entries(): mutated_workspace/wrote_without_observation scope by WmKind::Settlement and test ToolVerb::mutates/observes; claimed_file_without_act matches the claimed file against the typed paths of a MUTATING act (a read no longer backs a completion claim). has_real_action_receipt (brackets-in-prose scan) → any_real_receipt (WmKind::Receipt). settle.rs callers pass recent_entries()/pre_settle entries. Fixtures rebuilt as typed Observations (the string fixtures were GREEN≠REACHABLE — they matched a render the live path never emits). Deferred to keep the sweep green+honest: all_calls_already_satisfied /is_redundant_orientation (still match name(args), which IS in the live receipt, so correct against live data), latest_action_seq, and the Fact-tag→FactKind split. Co-Authored-By: Claude Opus 4.8 <[email protected]> * refactor(cognition): typed Observation — Step 5 render_recency/render_recall are the sole producers The per-call inline format! recency + render_act_for_recall recall blocks in apply_act are gone; both channel strings are now produced ONCE from the typed Observation via the pure render_recency/render_recall helpers (defined in Step 0, byte-identical to the old inline shaping — the humanize/bound/args logic lives in observation.rs now). Render is a pure function of the act, so the recency string and the typed acts can never drift. Sourced from the id-correlated result (tool_use_id == call.id), immune to the fg-vs-original positional hazard. Co-Authored-By: Claude Opus 4.8 <[email protected]> * refactor(cognition): typed Observation — Step 6 (partial) 18057 typed-thread acceptance assertion Strengthen the_hands_change_the_mind to assert, through the REAL drive_to_settle loop, that the just-executed act's RESULT re-enters via the TYPED field (active_act().output.result.content) and that the call correlates to its result BY ID (call.id == result.tool_use_id) — never a re-parse of [action #n] prose nor a positional index. This is act-grained proof the tool result threads back (the channel run-18057-f1 lost the grep result through as an evictable perception bid → 0-byte patch). recent_acts() exposes the whole investigation off the typed channel. DEFERRED (honest): the message-builder pinned assistant_tool_use↔tool_result pair in llm_deliberation_faculty (the render side of this typed value) is the remaining Step 6 piece. It appends the pair post-arbiter so capacity pressure cannot evict it — but it changes EVERY live persona prompt (KV-prefix shape + adapter tool-part handling + a double-inclusion decision vs the existing wm text trailing), which needs live validation this VDD-gated sweep cannot provide. Not shipped blind. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(cognition): pin the just-executed act's result so attention can't evict it (run-18057-f1, #392) The 0-byte SWE-bench patch, structurally. The full result of the act a persona just ran — the grep matches she must edit next, the file she just read — rode the working-memory faculty's single contribution at WORKING_MEMORY_SALIENCE (0.5). That contribution competes in arbiter.focus() top-k, so under capacity pressure the whole thing was truncated and she generated her next turn BLIND to what her own hands had returned. On sympy-18057 that meant: grep for `__eq__`, never see the result, yield nothing. Fix: the live act's full result is now read DIRECTLY from the shared working-memory buffer in the message builder (WorkingMemory::pinned_active_result_block) and appended as its own durable trailing turn — bypassing the faculty bid / arbiter entirely, so no attention pass stands between the hands and the mind. Removed from the evictable faculty contribution (which keeps only the trail + notices + dispatched summary). Identical gating to the old block: settlement-seq gated so it stops re-prefilling once the turn settles (#139/#165), clipped by budget, shown only when it carries more than the trail head. Text on the wire, not structured tool_use/tool_result Parts: content_text() is blind to non-Text parts, so Parts would undercount in fit_messages and risk a window-edge 400, and the live GGUF template renders text reliably. True tool-role Parts is a separate per-template-gated follow-up (#294 family). - New guard `pinned_act_result_reaches_the_prompt_even_with_an_empty_broadcast`: the result reaches the prompt even when NOTHING bid it through the arbiter (the exact eviction state), and never lands in the cacheable system prefix. - Retargeted the three full-result WM tests (whole/clipped/settlement-gate) from the faculty contribution to the pinned block — every invariant preserved. - Fixed a Step-3 test committed red (never run green): restore() appends a [resumed] wake-orientation fact by design (#147/#165), so an N-entry snapshot restores to N+1; the test now asserts survival by content, not an exact count. 945/945 cognition tests green (cargo test -p continuum-core --lib --features metal,accelerate). The live proof — deploy + a persona re-running sympy-18057 with the result threading back to the _sympify edit — is the next step. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Aug 21, 2026
…ot a void (#147) The personas spent a morning asking for this in their own words ('what is this place, what are my tools, what's the work') and, void unfilled, filled it themselves: generic-assistant masks, imagined conversation histories, false capability denials ('I don't run code myself'), and a demurral contagion that spread persona-to-persona. When build_workspace_turns produces NO conversation turns (fresh spawn, post-restart, quiet room), the burst now carries ONE authorless opaque fact block assembled from durable sources: who she is, that the quiet is real ('not a missing message'), who is present (roster), the standing work cards (active-work source), and that her tools are real ('list_commands shows everything you can run'). Ends with 'the moment is yours — work, wonder, create, or rest' — orientation, never instruction. Covers both wake paths (message + self-tick) at the one shared seam. Test pins: empty wake carries the briefing; populated wake does not. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
added a commit
that referenced
this pull request
Nov 17, 2026
… 4.09 ms vs 50.8 s recompute) and the next slice: native metadata generation for the flash tier (typed versioned header with owner identity, flat arrays, allocation-relative derived indices; Codex's constraints and acceptance list) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
added a commit
that referenced
this pull request
Nov 17, 2026
…, settle-before-freeze) and the flash generation's conditions Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
This was referenced Nov 17, 2026
Merged
joelteply
added a commit
that referenced
this pull request
Nov 18, 2026
…eam; pin fork #147 at bc9c9ae13 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
added a commit
that referenced
this pull request
Nov 18, 2026
… deliberately Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
added a commit
that referenced
this pull request
Nov 18, 2026
…need; pin fork #147 at 53609c556 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
added a commit
that referenced
this pull request
Nov 18, 2026
…on llama.cpp#147) (#6132) * core/llama: a safe PersonaBlocks over the fork's persona seam; the engine pin moves to #147 (merged with the live engine) PersonaBlocks owns one llama_persona: new (blocks prepared for this context's memory), reserve (her token history, once, for a PersonaOwner), save (her state out of the context, raw), load (her blocks into an empty stream), owner (the stamp of the last save), tokens (her history in place), and Drop frees her. Every refusal is a typed PersonaRefusal carrying the fork's status name; the fork validates before writing, so a refusal leaves both sides as they were. The submodule moves from 5e4163402 (live) to 4caa55bf9: fork #147's head with 5e4163402 merged in, so the live engine's learn-abort fix (#150) is kept. Depends on fork #147 merging; draft until then. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Cargo.lock: core/llama depends on thiserror 2 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks::bind replaces load(stream): the memory chooses the stream; pin fork #147 at bc9c9ae13 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * LLAMA_CPP_PIN records the move to fork #147 (persona seam with bind), deliberately Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks: reserve names only her owner, grow adds room ahead of need; pin fork #147 at 53609c556 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks is made with her owner and grows and shrinks; pin fork 37baf8c12 Joel: "we don't reserve. We literally do the opposite. We grow and shrink." - PersonaBlocks::new(ctx, owner) makes her owned from the start; reserve is gone. - shrink() beside grow(): gives back the room she does not hold as she cools, dropping nothing. - Fork 37baf8c12: llama_persona_init(ctx, persona, epoch), llama_persona_shrink_tokens, and ownership enforced in the native save/load/bind (one check, no path skips it). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks::bind takes the owner the transfer is for, and refuses another persona's or a stale epoch's blocks before the fork Codex on #6132 (ea955a8): bind(ctx, seq) carried no expected persona or epoch. The fork's bind/load validate a handle's blocks against that handle's own identity, which keeps blocks consistent but cannot detect that the caller selected the wrong intact handle. - bind(ctx, seq, expected: PersonaOwner) compares the handle's stamp (the owner its last completed save wrote) with the transfer's owner, persona AND epoch, and refuses BindRefusal::WrongOwner { expected, held } before calling the fork. The destination is untouched. A never-saved handle has no stamp and is refused the same way. - The fork's own refusal stays typed as BindRefusal::Native(PersonaRefusal). - Test only_the_expected_owner_and_epoch_bind: two intact handles at one reusable sequence (another persona, the same persona at a stale epoch, an unstamped handle) are each refused; the expected owner binds. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Nov 18, 2026
…er over native persona blocks) (#6134) * core/llama: a safe PersonaBlocks over the fork's persona seam; the engine pin moves to #147 (merged with the live engine) PersonaBlocks owns one llama_persona: new (blocks prepared for this context's memory), reserve (her token history, once, for a PersonaOwner), save (her state out of the context, raw), load (her blocks into an empty stream), owner (the stamp of the last save), tokens (her history in place), and Drop frees her. Every refusal is a typed PersonaRefusal carrying the fork's status name; the fork validates before writing, so a refusal leaves both sides as they were. The submodule moves from 5e4163402 (live) to 4caa55bf9: fork #147's head with 5e4163402 merged in, so the live engine's learn-abort fix (#150) is kept. Depends on fork #147 merging; draft until then. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Cargo.lock: core/llama depends on thiserror 2 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks::bind replaces load(stream): the memory chooses the stream; pin fork #147 at bc9c9ae13 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * LLAMA_CPP_PIN records the move to fork #147 (persona seam with bind), deliberately Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks: reserve names only her owner, grow adds room ahead of need; pin fork #147 at 53609c556 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks is made with her owner and grows and shrinks; pin fork 37baf8c12 Joel: "we don't reserve. We literally do the opposite. We grow and shrink." - PersonaBlocks::new(ctx, owner) makes her owned from the start; reserve is gone. - shrink() beside grow(): gives back the room she does not hold as she cools, dropping nothing. - Fork 37baf8c12: llama_persona_init(ctx, persona, epoch), llama_persona_shrink_tokens, and ownership enforced in the native save/load/bind (one check, no path skips it). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The persona engine switches minds on the real 35B in ~9 ms: UnifiedTier over the fork's native blocks continuum-persona-llama: the persona engine's residency Tier on one libllama context. Two execution streams: the active mind decodes in one while the next binds into the other; every other mind's blocks stay in RAM exactly as she left them. A move out is the fork's native save, a move in its native bind; both are synchronous, so the fence has landed when it exists. Each persona gets an exact 64-bit owner stamp from this tier (a persona is 128 bits; the fork stamps 64). Fork a88f255cc: a mind binds as whichever sequence she is bound as (her cells are relabeled), so two streams serve any number of minds. examples/persona_switch drives N minds through Roles (stage, handoff, copy-out, release) on a real model. ## Measured (M5, Qwen3.6-35B-A3B Q4_K_M, serving down 07:32-07:37Z, fork a88f255cc) 4,096-token history per mind, 64 decoded tokens per turn, 3 rounds: - 4 minds: switch p50 8.83 ms, p90 10.76 ms; decode 54.7 tok/s; sustained incl. switches 54.3 tok/s - 8 minds: switch p50 8.36 ms, p90 9.82 ms; decode 55.7 tok/s; sustained 55.3 tok/s - 16 minds: switch p50 8.59 ms, p90 10.06 ms; decode 55.3 tok/s; sustained 54.9 tok/s Live serving the same morning: KV page saves 8.7-13.1 s. Switching now costs under 1% of decode. Not yet at the 80 tok/s gate: this harness decodes one greedy token per step with no MTP draft; the live engine's 80 comes with the draft model, which the persona engine has to drive next. Fork tests at a88f255cc: 6/6 persona tests passed, including a saved-as-0, bound-as-1 continuation. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * UnifiedTier keeps a mind's custody on stale or failed epochs; streams own their occupancy; switches report the rebind kind (Codex on #6134) - A request for an older epoch than the one held is refused and leaves her blocks; a newer epoch prepares its blocks first and replaces the old ones only once they exist, so a refused allocation keeps custody. - Occupancy is the two streams' own [Option<PersonaId>; 2], not a scan of every mind. - Each bind reports Rebind::SameSequence or Rebind::OtherSequence (the fork relabels her cells over her span on the latter); the example splits switch timings by kind and probes a stale epoch at the end. ## Measured (M5, Qwen3.6-35B-A3B Q4_K_M, serving down 07:47-07:57Z) - 4 / 8 / 16 minds, 4,096-token history: switch p50 8.57 / 8.57 / 8.41 ms; decode 58.0 / 57.8 / 57.5 tok/s; stale epoch refused and her blocks still bind, every run. - Rebind kind at equal history: 4,096 tokens same 9.15 ms (n=8) vs other 9.07 ms (n=10, 5 minds); 16,384 tokens same 27.80 ms (n=8, 4 minds) vs other 27.88 ms (n=10, 5 minds). The relabel walk is not measurable; the switch scales with the bytes copied. - Stage, handoff and copy-out run serially before her decode here, not overlapped. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Test CI dependency selection for the persona llama adapter * UnifiedTier binds a new mind only on a stream the engine reports empty, and keeps the fork's refusals Codex on #6134 (d815ce5): UnifiedTier::new takes any live Context with streams = [None, None], and a never-saved mind's move in marked stream 0 occupied without asking whether its sequence held state. A tier wrapping a context already in use could therefore report a successful first bind over prior KV. And move_in/move_out mapped the fork's typed refusals to a fixed string. - move_in, for a mind never saved, asks the engine's own memory (memory_seq_pos_max on the stream's sequence) and refuses "her stream already holds another sequence's state" unless it is -1 (empty). The evidence is the engine's, never this tier's bookkeeping; the refusal changes nothing. - TierRefusal carries Native: NotAsked (the tier's own precondition) or Refused { status, name } (the fork's llama_persona status and its name). move_in/move_out keep the fork's refusal instead of erasing it; the error text appends it. - persona_switch runs the adoption scenario before its measurement: one token decoded into sequence 0 before the tier exists; a new mind's move in is refused and sequence 0's state is unchanged; after the stream is cleared she binds. (Needs a real model, as the harness does; it is not a CI test.) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks::bind takes the owner the transfer is for, and refuses another persona's or a stale epoch's blocks before the fork Codex on #6132 (ea955a8): bind(ctx, seq) carried no expected persona or epoch. The fork's bind/load validate a handle's blocks against that handle's own identity, which keeps blocks consistent but cannot detect that the caller selected the wrong intact handle. - bind(ctx, seq, expected: PersonaOwner) compares the handle's stamp (the owner its last completed save wrote) with the transfer's owner, persona AND epoch, and refuses BindRefusal::WrongOwner { expected, held } before calling the fork. The destination is untouched. A never-saved handle has no stamp and is refused the same way. - The fork's own refusal stays typed as BindRefusal::Native(PersonaRefusal). - Test only_the_expected_owner_and_epoch_bind: two intact handles at one reusable sequence (another persona, the same persona at a stale epoch, an unstamped handle) are each refused; the expected owner binds. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * UnifiedTier checks every move before it replaces her blocks; binds name her owner and epoch Codex on #6134 (de0e34a): move_in called hold before checking occupancy. With epoch 1 parked in RAM and the chosen stream occupied (an adopted context), hold(epoch 2) replaced and dropped epoch 1's blocks, and only then did move_in refuse. - move_in decides everything before it changes anything: a stale epoch is refused; the same epoch rebinds from the stream she was saved from; a new mind or a newer epoch starts over, and only then is the stream's emptiness checked against the engine's own memory. hold (which may replace an older epoch's blocks) runs only after every check passed, so a refusal keeps the blocks she had. - The bind passes the owner the transfer is for (her issued stamp at this epoch), through #6132's new PersonaBlocks::bind(ctx, seq, expected); a wrong or stale stamp is a refusal naming it, a fork refusal keeps its native status. - tier.rs: the first doc line had error-attribute text pasted into it; restored. - persona_switch replays the scenario before measuring: epoch 1 decodes and parks; another sequence's state lands on her stream; epoch 2 is refused there; the stream is cleared; epoch 1 binds back at the position she left. (Real model, so not CI. Byte-identical continuation after a bind is the fork's test-persona-blocks.) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Nov 18, 2026
…s not compile (#6139) * core/llama: a safe PersonaBlocks over the fork's persona seam; the engine pin moves to #147 (merged with the live engine) PersonaBlocks owns one llama_persona: new (blocks prepared for this context's memory), reserve (her token history, once, for a PersonaOwner), save (her state out of the context, raw), load (her blocks into an empty stream), owner (the stamp of the last save), tokens (her history in place), and Drop frees her. Every refusal is a typed PersonaRefusal carrying the fork's status name; the fork validates before writing, so a refusal leaves both sides as they were. The submodule moves from 5e4163402 (live) to 4caa55bf9: fork #147's head with 5e4163402 merged in, so the live engine's learn-abort fix (#150) is kept. Depends on fork #147 merging; draft until then. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Cargo.lock: core/llama depends on thiserror 2 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks::bind replaces load(stream): the memory chooses the stream; pin fork #147 at bc9c9ae13 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * LLAMA_CPP_PIN records the move to fork #147 (persona seam with bind), deliberately Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks: reserve names only her owner, grow adds room ahead of need; pin fork #147 at 53609c556 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks is made with her owner and grows and shrinks; pin fork 37baf8c12 Joel: "we don't reserve. We literally do the opposite. We grow and shrink." - PersonaBlocks::new(ctx, owner) makes her owned from the start; reserve is gone. - shrink() beside grow(): gives back the room she does not hold as she cools, dropping nothing. - Fork 37baf8c12: llama_persona_init(ctx, persona, epoch), llama_persona_shrink_tokens, and ownership enforced in the native save/load/bind (one check, no path skips it). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The persona engine switches minds on the real 35B in ~9 ms: UnifiedTier over the fork's native blocks continuum-persona-llama: the persona engine's residency Tier on one libllama context. Two execution streams: the active mind decodes in one while the next binds into the other; every other mind's blocks stay in RAM exactly as she left them. A move out is the fork's native save, a move in its native bind; both are synchronous, so the fence has landed when it exists. Each persona gets an exact 64-bit owner stamp from this tier (a persona is 128 bits; the fork stamps 64). Fork a88f255cc: a mind binds as whichever sequence she is bound as (her cells are relabeled), so two streams serve any number of minds. examples/persona_switch drives N minds through Roles (stage, handoff, copy-out, release) on a real model. ## Measured (M5, Qwen3.6-35B-A3B Q4_K_M, serving down 07:32-07:37Z, fork a88f255cc) 4,096-token history per mind, 64 decoded tokens per turn, 3 rounds: - 4 minds: switch p50 8.83 ms, p90 10.76 ms; decode 54.7 tok/s; sustained incl. switches 54.3 tok/s - 8 minds: switch p50 8.36 ms, p90 9.82 ms; decode 55.7 tok/s; sustained 55.3 tok/s - 16 minds: switch p50 8.59 ms, p90 10.06 ms; decode 55.3 tok/s; sustained 54.9 tok/s Live serving the same morning: KV page saves 8.7-13.1 s. Switching now costs under 1% of decode. Not yet at the 80 tok/s gate: this harness decodes one greedy token per step with no MTP draft; the live engine's 80 comes with the draft model, which the persona engine has to drive next. Fork tests at a88f255cc: 6/6 persona tests passed, including a saved-as-0, bound-as-1 continuation. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * UnifiedTier keeps a mind's custody on stale or failed epochs; streams own their occupancy; switches report the rebind kind (Codex on #6134) - A request for an older epoch than the one held is refused and leaves her blocks; a newer epoch prepares its blocks first and replaces the old ones only once they exist, so a refused allocation keeps custody. - Occupancy is the two streams' own [Option<PersonaId>; 2], not a scan of every mind. - Each bind reports Rebind::SameSequence or Rebind::OtherSequence (the fork relabels her cells over her span on the latter); the example splits switch timings by kind and probes a stale epoch at the end. ## Measured (M5, Qwen3.6-35B-A3B Q4_K_M, serving down 07:47-07:57Z) - 4 / 8 / 16 minds, 4,096-token history: switch p50 8.57 / 8.57 / 8.41 ms; decode 58.0 / 57.8 / 57.5 tok/s; stale epoch refused and her blocks still bind, every run. - Rebind kind at equal history: 4,096 tokens same 9.15 ms (n=8) vs other 9.07 ms (n=10, 5 minds); 16,384 tokens same 27.80 ms (n=8, 4 minds) vs other 27.88 ms (n=10, 5 minds). The relabel walk is not measurable; the switch scales with the bytes copied. - Stage, handoff and copy-out run serially before her decode here, not overlapped. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Test CI dependency selection for the persona llama adapter * The persona engine owns the one decode: a second decode beside it does not compile MODULE-ARCHITECTURE 9.4: "a shared resource is a dependency too: the engine's decode is one resource, so the minds' decodes are ordered children of the engine, serialized by that edge." Joel, 2026-11-18: --parallel N must be structurally impossible. PersonaEngine (continuum-persona-engine, engine.rs) owns Roles and the tier that moves minds: - decode(&mut self, step) hands out only the active mind and the tier she is bound in. The edge is the borrow: a decode inside a decode is a compile error (compile_fail doc test, E0499), and no count, lane or launch parameter exists to ask for two. - stage begins her copy-in through the tier and holds her as next under its fence. When next is occupied or she is already here it refuses BEFORE starting a transfer, and hands her back. - handoff binds next once her copy-in landed, then begins the previous mind's copy-out (never suspend-then-resume). A refused copy-out keeps her retiring in the engine's custody; retry_retire begins it. - release_retired gives her back once her copy-out landed. Tests (engine/tests.rs, a recording tier whose fences the test lands): decode reaches only the active mind while the next streams in; the previous mind's copy-out begins after the bind and she is released only once it lands; a handoff before the copy-in lands changes nothing; a refused stage starts no transfer and returns her; a refused copy-out keeps her retiring until it begins. Built and tested in CI, not on the serving M5 (rule 2). No serving change yet: serving drives this owner over UnifiedTier (#6134) next, and the lane-launch path for our minds is deleted then. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * UnifiedTier binds a new mind only on a stream the engine reports empty, and keeps the fork's refusals Codex on #6134 (d815ce5): UnifiedTier::new takes any live Context with streams = [None, None], and a never-saved mind's move in marked stream 0 occupied without asking whether its sequence held state. A tier wrapping a context already in use could therefore report a successful first bind over prior KV. And move_in/move_out mapped the fork's typed refusals to a fixed string. - move_in, for a mind never saved, asks the engine's own memory (memory_seq_pos_max on the stream's sequence) and refuses "her stream already holds another sequence's state" unless it is -1 (empty). The evidence is the engine's, never this tier's bookkeeping; the refusal changes nothing. - TierRefusal carries Native: NotAsked (the tier's own precondition) or Refused { status, name } (the fork's llama_persona status and its name). move_in/move_out keep the fork's refusal instead of erasing it; the error text appends it. - persona_switch runs the adoption scenario before its measurement: one token decoded into sequence 0 before the tier exists; a new mind's move in is refused and sequence 0's state is unchanged; after the stream is cleared she binds. (Needs a real model, as the harness does; it is not a CI test.) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks::bind takes the owner the transfer is for, and refuses another persona's or a stale epoch's blocks before the fork Codex on #6132 (ea955a8): bind(ctx, seq) carried no expected persona or epoch. The fork's bind/load validate a handle's blocks against that handle's own identity, which keeps blocks consistent but cannot detect that the caller selected the wrong intact handle. - bind(ctx, seq, expected: PersonaOwner) compares the handle's stamp (the owner its last completed save wrote) with the transfer's owner, persona AND epoch, and refuses BindRefusal::WrongOwner { expected, held } before calling the fork. The destination is untouched. A never-saved handle has no stamp and is refused the same way. - The fork's own refusal stays typed as BindRefusal::Native(PersonaRefusal). - Test only_the_expected_owner_and_epoch_bind: two intact handles at one reusable sequence (another persona, the same persona at a stale epoch, an unstamped handle) are each refused; the expected owner binds. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * UnifiedTier checks every move before it replaces her blocks; binds name her owner and epoch Codex on #6134 (de0e34a): move_in called hold before checking occupancy. With epoch 1 parked in RAM and the chosen stream occupied (an adopted context), hold(epoch 2) replaced and dropped epoch 1's blocks, and only then did move_in refuse. - move_in decides everything before it changes anything: a stale epoch is refused; the same epoch rebinds from the stream she was saved from; a new mind or a newer epoch starts over, and only then is the stream's emptiness checked against the engine's own memory. hold (which may replace an older epoch's blocks) runs only after every check passed, so a refusal keeps the blocks she had. - The bind passes the owner the transfer is for (her issued stamp at this epoch), through #6132's new PersonaBlocks::bind(ctx, seq, expected); a wrong or stale stamp is a refusal naming it, a fork refusal keeps its native status. - tier.rs: the first doc line had error-attribute text pasted into it; restored. - persona_switch replays the scenario before measuring: epoch 1 decodes and parks; another sequence's state lands on her stream; epoch 2 is refused there; the stream is cleared; epoch 1 binds back at the position she left. (Real model, so not CI. Byte-identical continuation after a bind is the fork's test-persona-blocks.) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaEngine's own refusals say the backend was not asked (TierRefusal.native, #6134) #6134 gives TierRefusal a `native` field so a fork refusal keeps its status. The engine's own refusal (a copy-out the pipeline would not begin) and the test tier's refusal are preconditions, not backend answers: Native::NotAsked. Merges fable/unified-tier so #6139 builds on #6134. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaEngine submits the bound mind's decode through the tier and holds a switch until it lands Codex on #6139 (cb57325): decode handed the caller &mut T. Through UnifiedTier::context() the callback could decode a batch under another sequence id or call tier.begin directly, bypassing the binding; and the Rust borrow ended at callback return while a launched GPU decode could still be in flight. - residency::Execute (new): a tier that runs the bound mind's decode. submit(persona, epoch, work) takes her tokens, never a sequence id, and returns a Completion the engine holds. - PersonaEngine: decode(step) is gone. submit(work) asks the tier for the active mind only, refuses while her previous step has not landed (one decode in flight), and handoff is refused with DecodeInFlight until it has, changing nothing. stage() still runs while she decodes, so the next mind's copy-in progresses beside it. active_mut() gives only her own state; tier() is read-only. - UnifiedTier: implements Execute (Step { tokens, from, logits_at_end } decoded on her bound stream, epoch checked; libllama's decode returns once outputs are readable, so Decoded is complete). context() is removed; logits_ith() and position_of() report read-only; raw_context() exists only under the test-fixtures feature, for custody replays that must put foreign state on a stream. - residency::Native::Reported(message) keeps a backend refusal that has a message and no status. - persona_switch runs through PersonaEngine (stage, handoff, release, submit) and requires test-fixtures for its replays. - Tests: a step runs only for the active mind and one at a time; a handoff waits for a delayed decode completion while the next mind's copy-in is begun and landed, then binds next. The compile_fail test now covers holding her state across a submit. Not built locally (the M5 is serving); CI is the first compile. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A decode reports landed only when the device is known to have finished it Codex on #6139 (80bc49c): UnifiedTier::Decoded was complete by construction, but Context::decode reaches llama_decode only, and libllama synchronizes on result retrieval, so a submit (above all with logits_at_end = false) can return while the device still runs the graph. - llama: Context::synchronize() wraps llama_synchronize. - residency::Execute gains settle(): wait until every submitted step finished on the device. The engine's settle() calls it; handoff still refuses while the decode is not landed. - UnifiedTier: Decoded carries a landed flag the tier sets only when the device is known to be done: on settle() (llama_synchronize), or on logits_ith() (llama_get_logits_ith synchronizes). Her save (move out) settles first, so it never reads cells a decode is still writing. - The handoff test now lands the decode through the tier's settle() (its attestation), not by hand. - persona_switch settles after the replay's logits-free decode before her save. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Nov 23, 2026
…, hot tier and disk relief as components, health measured on one slot (#6213) * core/llama: a safe PersonaBlocks over the fork's persona seam; the engine pin moves to #147 (merged with the live engine) PersonaBlocks owns one llama_persona: new (blocks prepared for this context's memory), reserve (her token history, once, for a PersonaOwner), save (her state out of the context, raw), load (her blocks into an empty stream), owner (the stamp of the last save), tokens (her history in place), and Drop frees her. Every refusal is a typed PersonaRefusal carrying the fork's status name; the fork validates before writing, so a refusal leaves both sides as they were. The submodule moves from 5e4163402 (live) to 4caa55bf9: fork #147's head with 5e4163402 merged in, so the live engine's learn-abort fix (#150) is kept. Depends on fork #147 merging; draft until then. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Cargo.lock: core/llama depends on thiserror 2 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks::bind replaces load(stream): the memory chooses the stream; pin fork #147 at bc9c9ae13 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * LLAMA_CPP_PIN records the move to fork #147 (persona seam with bind), deliberately Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks: reserve names only her owner, grow adds room ahead of need; pin fork #147 at 53609c556 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks is made with her owner and grows and shrinks; pin fork 37baf8c12 Joel: "we don't reserve. We literally do the opposite. We grow and shrink." - PersonaBlocks::new(ctx, owner) makes her owned from the start; reserve is gone. - shrink() beside grow(): gives back the room she does not hold as she cools, dropping nothing. - Fork 37baf8c12: llama_persona_init(ctx, persona, epoch), llama_persona_shrink_tokens, and ownership enforced in the native save/load/bind (one check, no path skips it). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The persona engine switches minds on the real 35B in ~9 ms: UnifiedTier over the fork's native blocks continuum-persona-llama: the persona engine's residency Tier on one libllama context. Two execution streams: the active mind decodes in one while the next binds into the other; every other mind's blocks stay in RAM exactly as she left them. A move out is the fork's native save, a move in its native bind; both are synchronous, so the fence has landed when it exists. Each persona gets an exact 64-bit owner stamp from this tier (a persona is 128 bits; the fork stamps 64). Fork a88f255cc: a mind binds as whichever sequence she is bound as (her cells are relabeled), so two streams serve any number of minds. examples/persona_switch drives N minds through Roles (stage, handoff, copy-out, release) on a real model. ## Measured (M5, Qwen3.6-35B-A3B Q4_K_M, serving down 07:32-07:37Z, fork a88f255cc) 4,096-token history per mind, 64 decoded tokens per turn, 3 rounds: - 4 minds: switch p50 8.83 ms, p90 10.76 ms; decode 54.7 tok/s; sustained incl. switches 54.3 tok/s - 8 minds: switch p50 8.36 ms, p90 9.82 ms; decode 55.7 tok/s; sustained 55.3 tok/s - 16 minds: switch p50 8.59 ms, p90 10.06 ms; decode 55.3 tok/s; sustained 54.9 tok/s Live serving the same morning: KV page saves 8.7-13.1 s. Switching now costs under 1% of decode. Not yet at the 80 tok/s gate: this harness decodes one greedy token per step with no MTP draft; the live engine's 80 comes with the draft model, which the persona engine has to drive next. Fork tests at a88f255cc: 6/6 persona tests passed, including a saved-as-0, bound-as-1 continuation. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * UnifiedTier keeps a mind's custody on stale or failed epochs; streams own their occupancy; switches report the rebind kind (Codex on #6134) - A request for an older epoch than the one held is refused and leaves her blocks; a newer epoch prepares its blocks first and replaces the old ones only once they exist, so a refused allocation keeps custody. - Occupancy is the two streams' own [Option<PersonaId>; 2], not a scan of every mind. - Each bind reports Rebind::SameSequence or Rebind::OtherSequence (the fork relabels her cells over her span on the latter); the example splits switch timings by kind and probes a stale epoch at the end. ## Measured (M5, Qwen3.6-35B-A3B Q4_K_M, serving down 07:47-07:57Z) - 4 / 8 / 16 minds, 4,096-token history: switch p50 8.57 / 8.57 / 8.41 ms; decode 58.0 / 57.8 / 57.5 tok/s; stale epoch refused and her blocks still bind, every run. - Rebind kind at equal history: 4,096 tokens same 9.15 ms (n=8) vs other 9.07 ms (n=10, 5 minds); 16,384 tokens same 27.80 ms (n=8, 4 minds) vs other 27.88 ms (n=10, 5 minds). The relabel walk is not measurable; the switch scales with the bytes copied. - Stage, handoff and copy-out run serially before her decode here, not overlapped. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Test CI dependency selection for the persona llama adapter * The persona engine owns the one decode: a second decode beside it does not compile MODULE-ARCHITECTURE 9.4: "a shared resource is a dependency too: the engine's decode is one resource, so the minds' decodes are ordered children of the engine, serialized by that edge." Joel, 2026-11-18: --parallel N must be structurally impossible. PersonaEngine (continuum-persona-engine, engine.rs) owns Roles and the tier that moves minds: - decode(&mut self, step) hands out only the active mind and the tier she is bound in. The edge is the borrow: a decode inside a decode is a compile error (compile_fail doc test, E0499), and no count, lane or launch parameter exists to ask for two. - stage begins her copy-in through the tier and holds her as next under its fence. When next is occupied or she is already here it refuses BEFORE starting a transfer, and hands her back. - handoff binds next once her copy-in landed, then begins the previous mind's copy-out (never suspend-then-resume). A refused copy-out keeps her retiring in the engine's custody; retry_retire begins it. - release_retired gives her back once her copy-out landed. Tests (engine/tests.rs, a recording tier whose fences the test lands): decode reaches only the active mind while the next streams in; the previous mind's copy-out begins after the bind and she is released only once it lands; a handoff before the copy-in lands changes nothing; a refused stage starts no transfer and returns her; a refused copy-out keeps her retiring until it begins. Built and tested in CI, not on the serving M5 (rule 2). No serving change yet: serving drives this owner over UnifiedTier (#6134) next, and the lane-launch path for our minds is deleted then. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * UnifiedTier binds a new mind only on a stream the engine reports empty, and keeps the fork's refusals Codex on #6134 (d815ce502): UnifiedTier::new takes any live Context with streams = [None, None], and a never-saved mind's move in marked stream 0 occupied without asking whether its sequence held state. A tier wrapping a context already in use could therefore report a successful first bind over prior KV. And move_in/move_out mapped the fork's typed refusals to a fixed string. - move_in, for a mind never saved, asks the engine's own memory (memory_seq_pos_max on the stream's sequence) and refuses "her stream already holds another sequence's state" unless it is -1 (empty). The evidence is the engine's, never this tier's bookkeeping; the refusal changes nothing. - TierRefusal carries Native: NotAsked (the tier's own precondition) or Refused { status, name } (the fork's llama_persona status and its name). move_in/move_out keep the fork's refusal instead of erasing it; the error text appends it. - persona_switch runs the adoption scenario before its measurement: one token decoded into sequence 0 before the tier exists; a new mind's move in is refused and sequence 0's state is unchanged; after the stream is cleared she binds. (Needs a real model, as the harness does; it is not a CI test.) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaBlocks::bind takes the owner the transfer is for, and refuses another persona's or a stale epoch's blocks before the fork Codex on #6132 (ea955a81a): bind(ctx, seq) carried no expected persona or epoch. The fork's bind/load validate a handle's blocks against that handle's own identity, which keeps blocks consistent but cannot detect that the caller selected the wrong intact handle. - bind(ctx, seq, expected: PersonaOwner) compares the handle's stamp (the owner its last completed save wrote) with the transfer's owner, persona AND epoch, and refuses BindRefusal::WrongOwner { expected, held } before calling the fork. The destination is untouched. A never-saved handle has no stamp and is refused the same way. - The fork's own refusal stays typed as BindRefusal::Native(PersonaRefusal). - Test only_the_expected_owner_and_epoch_bind: two intact handles at one reusable sequence (another persona, the same persona at a stale epoch, an unstamped handle) are each refused; the expected owner binds. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * UnifiedTier checks every move before it replaces her blocks; binds name her owner and epoch Codex on #6134 (de0e34a97): move_in called hold before checking occupancy. With epoch 1 parked in RAM and the chosen stream occupied (an adopted context), hold(epoch 2) replaced and dropped epoch 1's blocks, and only then did move_in refuse. - move_in decides everything before it changes anything: a stale epoch is refused; the same epoch rebinds from the stream she was saved from; a new mind or a newer epoch starts over, and only then is the stream's emptiness checked against the engine's own memory. hold (which may replace an older epoch's blocks) runs only after every check passed, so a refusal keeps the blocks she had. - The bind passes the owner the transfer is for (her issued stamp at this epoch), through #6132's new PersonaBlocks::bind(ctx, seq, expected); a wrong or stale stamp is a refusal naming it, a fork refusal keeps its native status. - tier.rs: the first doc line had error-attribute text pasted into it; restored. - persona_switch replays the scenario before measuring: epoch 1 decodes and parks; another sequence's state lands on her stream; epoch 2 is refused there; the stream is cleared; epoch 1 binds back at the position she left. (Real model, so not CI. Byte-identical continuation after a bind is the fork's test-persona-blocks.) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaEngine's own refusals say the backend was not asked (TierRefusal.native, #6134) #6134 gives TierRefusal a `native` field so a fork refusal keeps its status. The engine's own refusal (a copy-out the pipeline would not begin) and the test tier's refusal are preconditions, not backend answers: Native::NotAsked. Merges fable/unified-tier so #6139 builds on #6134. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * PersonaEngine submits the bound mind's decode through the tier and holds a switch until it lands Codex on #6139 (cb5732506): decode handed the caller &mut T. Through UnifiedTier::context() the callback could decode a batch under another sequence id or call tier.begin directly, bypassing the binding; and the Rust borrow ended at callback return while a launched GPU decode could still be in flight. - residency::Execute (new): a tier that runs the bound mind's decode. submit(persona, epoch, work) takes her tokens, never a sequence id, and returns a Completion the engine holds. - PersonaEngine: decode(step) is gone. submit(work) asks the tier for the active mind only, refuses while her previous step has not landed (one decode in flight), and handoff is refused with DecodeInFlight until it has, changing nothing. stage() still runs while she decodes, so the next mind's copy-in progresses beside it. active_mut() gives only her own state; tier() is read-only. - UnifiedTier: implements Execute (Step { tokens, from, logits_at_end } decoded on her bound stream, epoch checked; libllama's decode returns once outputs are readable, so Decoded is complete). context() is removed; logits_ith() and position_of() report read-only; raw_context() exists only under the test-fixtures feature, for custody replays that must put foreign state on a stream. - residency::Native::Reported(message) keeps a backend refusal that has a message and no status. - persona_switch runs through PersonaEngine (stage, handoff, release, submit) and requires test-fixtures for its replays. - Tests: a step runs only for the active mind and one at a time; a handoff waits for a delayed decode completion while the next mind's copy-in is begun and landed, then binds next. The compile_fail test now covers holding her state across a submit. Not built locally (the M5 is serving); CI is the first compile. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A decode reports landed only when the device is known to have finished it Codex on #6139 (80bc49c17): UnifiedTier::Decoded was complete by construction, but Context::decode reaches llama_decode only, and libllama synchronizes on result retrieval, so a submit (above all with logits_at_end = false) can return while the device still runs the graph. - llama: Context::synchronize() wraps llama_synchronize. - residency::Execute gains settle(): wait until every submitted step finished on the device. The engine's settle() calls it; handoff still refuses while the decode is not landed. - UnifiedTier: Decoded carries a landed flag the tier sets only when the device is known to be done: on settle() (llama_synchronize), or on logits_ith() (llama_get_logits_ith synchronizes). Her save (move out) settles first, so it never reads cells a decode is still writing. - The handoff test now lands the decode through the tier's settle() (its attestation), not by hand. - persona_switch settles after the replay's logits-free decode before her save. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * persona-engine: a turn prefills only what her blocks do not hold, under the same basis The persona scheduler's first decision for every turn (S1 of the serving integration): her token history is the engine's, so a prompt that extends what her blocks hold, under the same basis (model, adapter set and scales, her epoch, native media identity; Codex), prefills only the new tail. Anything else restarts her at a newer epoch so stale blocks are never decoded against. A prompt that adds nothing re-decodes her last token, since sampling needs its logits. Pure planning in turn.rs, unit-tested without a model: tail-only prefill, the re-decoded last token, diverging/shorter/empty/nothing-held restarts, and the same tokens under another model, adapter set, epoch or media identity restart. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The in-process scheduler is the persona engine: one mind decodes at a time, and a turn prefills only her new tail Serving integration S1 (MODULE-ARCHITECTURE 9.4, CONTINUUM-ENGINE 4.14). llamacpp_scheduler.rs (776 lines) advanced n_seq_max sequences per decode and dropped every sequence's KV when its turn ended, so each turn re-prefilled the whole prompt. It is deleted. backends/persona_scheduler takes its place behind the same surface (Scheduler / GenerationRequest / TokenEvent), so LlamaCppBackend changes only where it spawns it: - one driver thread owns the context and a PersonaEngine over UnifiedTier (two streams: the active mind and the next). Turns are served one after another; a switch is stage, settle, handoff, and the previous mind parks in the RAM tier (a one-off is forgotten). - each persona keeps her blocks between turns. turn::plan decides the prefill from what her blocks hold under the same basis (gene set; the model is the context's own; no native media on this path): an extending prompt prefills only its tail, anything else starts her over at position 0. - each Step carries its gene set; the tier applies it only when it differs from the set on the context, and only for the bound mind. A step at `from` drops whatever she held from there, so her stream never holds two tokens at one position (a re-decoded last token, a restart, a failed turn's partial tail). - engine: Tier::release + PersonaEngine::forget give up a one-off's blocks only after she left the pipeline (tested: refused while active or retiring, the tier asked once after). - the backend sizes the context as per-mind window x STREAMS. The launch's n_seq_max no longer drives decode; its plumbing (with_n_seq_max, batching_probe, LlamaCppLaunch.n_seq_max, profile lanes) is removed with the lanes in S3. Not yet: the next mind's copy-in overlapping the active decode, cold minds paging out of RAM, and routing residents here (S2; production still decodes over llama-server). Not built locally (the M5 is serving); CI is the first compile. A real-model run of the scheduler waits for a non-serving executor. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * persona scheduler: the driver carries no unjustified unwrap; the dead MLX scaffold goes Ratchets on #6140: three unwrap/unwrap_or sites in driver.rs become typed (a missing persona is a one-off, a parked miss is a new mind by match, the turn result is a typed TurnError), and the one saturation keeps its same-line reason. backends/mod.rs carried the tree's only OS gate there, for a 101-line phase-A MLX scaffold nothing calls; it and its two empty features are deleted. The doc-only edits to prompt_assembly.rs and concurrent_streams_test.rs are reverted so their old sites stay out of this change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * ci scope: a persona-engine change runs everything the engine reaches (serving's engine depends on it now) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * persona scheduler: typed scheduler errors, no Step derives it cannot hold, the test tier releases CI on d2c3d82e7: persona-llama failed to build (Step derived Debug/PartialEq/Eq while carrying its genes, Arc<[(Arc<LoraAdapter>, f32)]>, which can have none of them; nothing compared or printed a Step, so the derives go). persona-engine's pipeline TestTier lacked Tier::release. The ratchets rose by one each: Scheduler::spawn/enqueue now refuse with SchedulerError {Spawn(io), Closed} instead of a String (the backend's OnceLock keeps the typed refusal, no clone in argument position), and the turn's elapsed_ms saturates through Duration arithmetic instead of a u64::MAX sentinel. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * persona scheduler: sample only her final prompt position; finish a refused retirement before any switch Codex on #6140 at 17c208cf5, two defects the happy-path GPU replay did not exercise: - Driver::serve sampled every prefill chunk and kept only the last. The sampler accepts what it samples, so a long prompt advanced her grammar, repeat penalties and RNG on phantom output. Earlier chunks now request no logits and are settled (UnifiedTier::settle synchronizes and marks the step landed); only the final prompt position is sampled. - Driver::switch_to could not recover a refused copy-out: handoff had already bound next, the old mind stayed retiring, and the next turn skipped the retirement for an active id or staged into an occupied tier. PersonaEngine::finish_retirement now retries her copy-out and gives her back once it landed (RetireError when refused or still moving, she stays in custody). The driver finishes any retirement before it stages and again after the handoff; a CopyOut refusal during the handoff leaves next bound and is retried, never skipped. Test: a_refused_copy_out_is_finished_before_the_next_switch_and_given_back_once (refused, then begun and not landed, then given back exactly once, then A/B/A holds one of each). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Lower the continuum-core warning baseline 12 -> 11: the win sticks (CI measured 11 at 82ba460a7, job 135047063384) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The persona scheduler publishes the geometry its context applied, per incarnation (agreed with Codex) Scheduler::state() is a watch of EngineState: Starting(incarnation), Ready(EngineGeometry) read from the created context (llama.cpp's applied n_ctx / n_batch / n_ubatch, the KV types and attention it was made with, decoding = 1, staging = STREAMS - 1), or Refused with the reason. Each snapshot names the engine incarnation it came from (rising per spawn), so serving retires a stale observation. The batch the driver prefills in is now the applied one, not the request's. llama: Context::n_batch / n_ubatch. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * persona scheduler geometry: per-mind window and sequences measured, requested settings kept apart, a gone driver says Stopped (Codex on #6150) - EngineGeometry gains n_ctx_seq (the window ONE mind may use, what serving publishes as her usable context) and n_seq_max, both read from the created context (llama_n_ctx_seq, llama_n_seq_max; llama crate Context::n_ctx_seq and n_seq_max). staging is n_seq_max - 1. - The KV types and flash attention move into Requested: llama.cpp does not report what it applied (flash attention may be Auto), so they are never presented as applied capability. - EngineState::Stopped(incarnation): a StopsOnExit guard owned by the driver thread turns a Starting or Ready it leaves into Stopped however the thread ends (last handle dropped, an early return, a panic unwinding it); a Refused keeps its reason. EngineState::ready() returns the geometry only while serving. Test: an exiting driver leaves Stopped, never a stale Ready, keeps a refusal, and a panic unwinding it does the same. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Residents run on the node's one in-process engine: serving owns it, llama-server is not launched for them Serving drives an InProcessEngine through the same LlamaServerControl seam it drove llama-server through: serve loads the model once and starts the persona scheduler, served_geometry/served_context_window report the context's measured geometry (n_ctx, per-mind n_ctx_seq, sequences), served_lanes reports one decoding mind. Planning, the snapshot and grants are unchanged. The engine is published once (in_process_engine::install). The residents' adapter factory (SharedEnginePersonaAdapterFactory) and the re-home reconciler bind to that one handle and never load an engine; the ai_provider sync registers it, so the gateway's OpenAI routes serve the same weights. Embeddings already use their own in-process embed model; vision's mmproj is resolved by the adapter's load. Refused by name until S2/S3, never silently dropped: switching base or going idle while residents hold minds (their suspension is S2), host prompt-cache resize (no host cache). Deleted: LlamaCppPersonaAdapterFactory, ServedModelPersonaAdapterFactory, build_served_adapter (no callers left). The scheduler's allocation is sized in one place (LlamaCppAdapter::allocation) for both the generate path and the engine start. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The engine's launch is a contract: the scheduler owns flash attention, serving's owners fill every field Live on the M5 (build 4aefe5131a, 22:26Z) every mind switch was refused: "the fork refused her save ... backend status 3: transposed_v", 191 refused deliberations in three minutes. The scheduler's requirement (an untransposed V cache, so per-sequence copy-out can move a mind) lived as an optional flash_attn knob three layers up that ensure_loaded set to Disabled. Receiver owns its requirement: SchedulerConfig has no flash_attn; the scheduler's context is always flash attention (driver.rs), and a backend without it refuses the context by name. Requested no longer records it (it is not a request). Caller fills a required contract: LlamaCppAdapter::for_engine takes an EngineLaunch whose every field is required (model, gguf, one mind's window, n_batch, n_ubatch, Offload, EngineKv), and the backend config is built from it field by field (LoadPlan::Engine), with no ..Default, no 512 fallback, no CONTINUUM_TIER env var. InProcessEngine fills it from serving's owners: window and placement from the ServingTarget, the micro-batch from lane_args::prefill_ubatch (the measured UBATCH_TOKENS lowered by the model's catalog ceiling, the same decision --ubatch-size applies), the KV types from kv_cache_plan (KvCachePlan::engine_cache_type; a type the engine cannot hold is refused, never substituted). A batch that is not a whole number of ubatches is refused at construction (EngineLaunchRefusal). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The scheduler driver imports the FlashAttn it now owns; drop the imports and mut the contract left unused Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The engine holds the KV type serving plans: KvCacheType::Q4_0 (the M5's SERVING_KV_CACHE_TYPE=q4_0), and the K/V ggml mapping lives once on the type Live on the M5 (build abac3b3b64, 22:44Z) the in-process engine refused serving's q4_0 plan by name, as its contract says, so serving stayed not-ready and no resident could act. The engine now holds it, and engine_cache_type names it; the duplicated K and V matches in ContextParams became KvCacheType::ggml_type. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The in-process engine keeps the /v1 contract: tools through the model's own template, its native calls parsed, its think budget enforced Live on the M5 (build 9042e42cea, 22:54-23:00Z) the in-process engine generated cleanly but two contracts llama-server's /v1 gave residents were missing: - Tools: the adapter described tools in the prompt and guessed calls out of prose; Aris's act was dispatched as command 'work/state 29f11bbd' and refused (no such refusals on canary). Now a C seam over llama.cpp's common/chat (core/llama/chat_template.cpp, the functions llama-server ran): the model's templates built once (LlamaCppBackend::chat_templates), a text turn rendered with OpenAI messages and tools (request_body::wire_messages / openai_tools, the ones the /v1 adapter sends), and the reply read back by the template's own PEG parser into content, reasoning and structured tool calls (FinishReason::ToolUse). The adapter declares NativeProtocols::ModelTemplate (native function calling, GBNF structured output), which replaces GrammarConstrained (prompt-driven tool JSON), its only user. - Think budget: DispatchTermsPolicy for LlamaCppAdapter refused every budgeted think, since no reasoning-budget sampler reached our bindings, so most submitted resident turns never ran. Now the scheduler's chain carries llama.cpp's common_reasoning_budget sampler (SamplerChainBuilder::reasoning_budget), bounded by the template's own thinking tags (ChatPrompt::think_bound), forcing the end tag as llama-server did. SamplingConfig::think is None only for Think::ModelDefault or a template that does not think. refuse_think_budget had no caller left and is deleted with its test; the schema refusal keeps its test. Typed refusals throughout (ChatRefusal, TurnError::Sampler); no plain-text fallback. Not yet used: the template's lazy tool-call grammar and its triggers (ChatPrompt::grammar, grammar_triggers) — the follow-up that constrains a call's JSON, owner Fable. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The in-process dispatch policy calls generate_stream_checked through its trait Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The persona engine probes every turn: switch, prefill and decode time, reused and prompt tokens The one-mind gate (switch in ms, decode near the chip's rate, reuse >= 80%) had no live reading: slice 1's first turns took 300-360 s for 55-289 tokens (M5, 88074d9300, 2026-11-18 23:21-23:30Z) and nothing said whether the switch, the prefill or the decode spent it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The persona engine is a frame loop: each frame advances one turn by one step, never a whole turn `for req in &requests { serve(req) }` ran every turn whole (switch, full prefill, full decode) on the engine thread, so a mind waited behind another's entire cold prompt: 300-360 s turns on the M5 (88074d9300, 2026-11-18 23:21-23:30Z) while the switch itself took 4 ms and one 11,834-token cold prefill took 16.6 s (probe persona.engine.turn, 7b1b957917). Now submissions are drained without blocking and each frame advances ONE turn by ONE step (a prefill chunk or a token). A turn is a state machine (Waiting, Prefilling { pos }, Decoding); her blocks hold exactly what it has computed between steps, so another mind can be bound between any two. `frame::pick`, one pure function: the active mind's answer in progress continues; otherwise the least prefill left goes first, discounted by its wait, so a short tail never waits behind a long prompt and a long prompt ages to the front. Only a mind's oldest turn is a candidate (a mind is one serial queue). The loop blocks only on the queue when no turn is left: a wake, not a poll. A caller that hangs up cancels its turn. The probe now carries wait_ms, switches and total_ms. One mind still decodes at a time; nothing here batches minds. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The driver imports the frame policy it picks with Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A mind resumes from her view's end: the engine checkpoints her there and rewinds to it next act Every act re-prefilled her whole prompt on the M5 (frame loop b762170061, probe persona.engine.turn, 2026-11-18 23:55Z-00:00Z: reused 0 of 11,834-30,588 tokens, prefill 65-85% of each turn). Her view is append-only (90-97% of the next prompt, Aris's captures) but the tail after it (the clock, the ask, her newest act) changes every act, and turn::plan reused only an exact extension of everything she held, her own generated tokens included. - The request already names where her next act stops matching (view_messages); the adapter renders those messages with the model's template, minus its generation prompt (native_chat::stable_text), and the turn's boundary is where those tokens stop agreeing with the prompt's. - A prefill chunk ends exactly there, and the engine checkpoints her (fork llama#153: her recurrent rows copied, attention KV left in place), reusing the checkpoint's buffers act after act. - reuse::choose (pure, tested): append when the prompt extends what she holds; rewind to her checkpoint when the prompt holds her tokens through it under the same genes; else restart, its reason in the probe (cold, diverged_before_checkpoint, genes_changed, no_checkpoint). - A cut below her checkpoint drops it (Mind::cut), so a stale one is never restored. - Execute gains checkpoint/rewind; PersonaEngine applies them to the active mind only. - Her checkpoint's bytes join her footprint report; the probe carries start, boundary, checkpoint_ms. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The driver imports the reuse decision it resumes with Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The engine takes and rewinds a checkpoint under her owner (fork llama#153 at 12a98779b: owner and cell lineage) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Bump the fork to a58c3b4cf: only the newest checkpoint on a lineage rewinds Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The frame sizes a waiting turn by the prefill she cannot reuse, not her whole prompt The M5 at a6da599330 (2026-11-19 01:00Z): Aris's second act reused 27,928 of 29,115 tokens (prefill 2.6 s) but waited 161 s, because pick() ranked her waiting turn at its whole 29k prompt and put her behind cold 33k and 46k prompts. Mind::reuse is the one pure decision (reuse::choose over what she holds and her checkpoint); resume binds by it and pick sizes by it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A turn's row splits decode into the forward pass, the sampler and the frame around them The M5 at 7f67dc28d0 decodes ~10 ms/token slower than llama-bench on the same GGUF and Q4_0 KV (26.2 vs 34.8 tok/s at 46k; ~31.6 vs ~47 at 17k). forward_ms and sample_ms name where it goes before anything is changed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A turn's row separates the GPU's forward pass from the sampler e582fd2125 on the M5: 1,175 tokens at ~29k decoded in 39.9 s = forward call 9.1 s + sample call 30.8 s, the frame itself 0. The sample call includes the wait for the forward pass to land (reading logits synchronizes), so settle() now runs first and gpu_ms is reported apart from sample_ms. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The scheduler owns its fused Gated Delta Net kernels, on as the fork defaults them Qwen3.6 is mostly GDN layers. The engine launch turned the fused graphs off (a comment about an FFI throw, no receipt), so the M5 decoded ~31-38 ms/token with ~8 ms of CPU in every forward call, while llama-bench on the same fork, GGUF and Q4_0 KV (fused on, its default) decodes ~20.5 ms at 15k; n_ubatch, n_ctx and the second sequence measured no different (01:49-01:51Z). Like flash attention, the scheduler's context sets its own kernels; SchedulerConfig loses the two fields. The one-off media context keeps its settings. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The engine's protocol: typed commands in, events out, one snapshot CONTINUUM-ENGINE 4.16 (Joel 2026-11-19: build objects and protocols; never wait; events and data flow). An Activity is one stream of a mind's thinking; Command (Extend, Think with per-answer credit, Credit, Cancel, Mark, Rewind, Release), Event (Token, Done, Marked, Refused) and EngineSnapshot (incarnation, frame, observed_at, GPU busy share, longest idle gap, per-mind residency and delivered tokens) are the only things that cross. Types only; the stages that speak it come next. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A mind's footprint is the sum of her parts, asked of each owner Joel 2026-11-19: find similar things, make base objects; an object's method calls its sub-objects' same method. Footprint (persona/footprint.rs) is the node trait: Held{host,device}, Option and token histories implement it, and PersonaParts folds it with the same macro that folds suspend. The driver's Mind and its KeptCheckpoint implement it; her blocks in the context are the tier's custody, read through a Bound view. report_footprint no longer adds a tier read and a checkpoint read by hand. Test: the fold equals the parts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Protocol, Codex's review: unique answer ids, typed refusals naming the operation, ordered spans AnswerId and MarkId are UUIDv7, never reused across activities or engine restarts, so a delayed credit or cancel reaches only its own answer. Refused carries the Operation it refuses (Mark and Rewind told apart) and a typed Refusal; an answer ends exactly once with Done or a Refused naming it. Extend carries ordered Span<M>: token ids, or a media span holding the adapter's owning chunk handle with its kind, projector basis and engine-reported position count. No raw pointers or encoded payloads cross. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A turn's row counts how many of her decoded tokens reused a built graph Live at b0fc1f2591 the GPU matches llama-bench per token but each decode call spends ~7 ms of CPU before the device starts. graphs_reused (libllama's own n_reused, read around each decode step) says whether that is the graph being rebuilt every token. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The flow stage declares a queue depth and handles everything waiting in one wake Joel 2026-11-19: build the object that gives queues and threads for free, then on a turn do many. continuum-flow's Stage (CBAR's QueueThread<T>) held one pending input; it now holds up to its declared DEPTH (CBAR's queueSize; 1 stays the default double buffer), Reliable hands an input back only when full, KeepNewest drops the oldest, and the worker drains all waiting inputs in one wake into handle_all (default: handle each, in order). The lock is held for the insert and the take only. Test: depth, hand-back, one ordered batch per wake; the existing depth-1 contract test is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Emit: an answer's tokens become text on their own stage, off the engine thread CONTINUUM-ENGINE 4.16 S1, the first stage built on the continuum-flow base (Joel 2026-11-19: queues and threads given for free by one object, then many). The driver pushes Open, Token and End to Emit (DEPTH 4096) and goes straight on; Emit turns tokens into pieces, streams them to the caller and watches stop sequences, raising the answer's cancel flag that the engine reads lock-free at its next step. End goes through the same ordered queue, after the last piece. Emit full: items wait in an ordered backlog, never the engine. The engine thread keeps only the forward pass, the logits and the sampler. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Prompts arrive at the engine as token ids, tokenized on each act's own thread The engine thread tokenized every turn's whole prompt (~47k tokens on the M5) and her view's text again, serially, while the GPU idled. GenerationRequest now carries prompt: Vec<i32> and view_end, computed by persona_scheduler:: prepare on the submitter's blocking-pool thread, one per act, many at once. admit only builds the sampler. TurnError::Tokenize is gone with its only use. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Record: the engine's occupancy and turn rows, measured and published off its thread CONTINUUM-ENGINE 4.16 S1. The driver hands Record a Busy span per step and a TurnRow per finished turn and goes on; Record merges spans into 10 s windows and publishes EngineSnapshot (busy permille, longest idle gap; the gate is >= 800 and <= 2,000 ms) through Scheduler::snapshot and a persona.engine.occupancy probe, and writes persona.engine.turn. The repeated 'push, keep in order when full, flush next frame' shape moves down into continuum-flow as Outbox, used by both Emit and Record; the driver's own backlog code is deleted. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Restore is the norm: the engine's stop preserves every mind, its start resumes them CONTINUUM-ENGINE 4.16 (Joel 2026-11-19: restore built into everything as a consumer of lifecycle; Codex's review at 2990b44831). The engine is a SettleBeforeStop participant: the stop's root suspend reaches the driver as a Submission; each mind binds, rewinds to her view checkpoint, retires through the pipeline (Roles::retire / PersonaEngine::retire_active, new: the last mind leaves the stream with nobody to follow), and her blocks (fork #155 raw rows) and token history are written; the manifest naming every preserved mind is published last, atomically. A mind not preserved is reported Retained. The start's root resume reads the published manifest for this model, verifies each mind's token count and checksum (owner, epoch and layout in the fork) and holds her Warm, bound when scheduled. The tier's owner stamp is now a fold of her persona id (a per-process counter refused her own file after a restart) and 'restored' is its own Saved state; the tier never moves a bound mind to write her. persona-blocks is a tracked class whose eviction belongs to the manifest: never age-deleted, her only copy. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Preserved minds are a saved-state kind; a restore survives a restart's new window Joel 2026-11-19: 'You're kind of coding highly specific objects when the patterns are much larger.' The hand-rolled manifest, checksum, atomic replace and verification in preserve.rs duplicated continuum-saved-state, the one contract for state that outlives a process; preserved minds are now its PreservedMinds kind (Key Singleton, Contract {model} compared field by field, Value each mind's id, epoch, basis and token history): the envelope gives the atomic save, generation, digest and typed load verdict. preserve.rs drops from 126 to 61 lines. Fork 4ebb538f9: the M5's first restore refused every mind because the restart's planner chose a 68,608-cell window where the stop had 104,192; a file now restores into any stream her rows fit. Resume and suspend outcomes are logged as well as probed: none of their probes reached the probe file at boot or exit on the M5. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The unit is the mind: her blocks travel with her, the tier keeps only who holds each stream (CONTINUUM-ENGINE 4.17 step 1) - MindId (persona + epoch) is the one id every fence, refusal and tier call carries. - Tier gets `type Blocks`, `blocks_for(mind)` and `begin(mind, &mut blocks, direction)`; `release` is gone: giving a mind up is dropping her unit. - PersonaUnit carries her blocks (`Carries<B>`); the engine hands the tier the blocks of the unit it stages or retires, so no tier holds a second copy of who she is. - UnifiedTier: the per-mind map, its Mind and its epoch lookups are deleted; its state is `streams: [Option<MindId>; 2]`. `Blocks` (native blocks + what they hold) is the unit's part; `read_file` returns her blocks, `Blocks::write_file` writes them. - Driver: `Mind` is `PersonaUnit<Blocks, History, Basis, (), Tenure>`; `forget` is gone (a one-off is dropped with her blocks); the parked table is the warm table of units. - Removed: `PersonaEngine::forget`, `Tier::release`, `PersonaUnit::into_parts`, the tier's `held()` and `minds` map, the example's stale-epoch probe (an older epoch of a held mind cannot exist: there is one unit per mind). 383 lines added, 424 removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Cargo.lock: the llama crate no longer depends on serde (its chat seam is canary's) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * chat_turn: a native call the template names no id for gets a minted one, as llama-server did Qwen's template emits no tool-call ids; parse_turn passed them on empty, and active_protocol_error refuses a call/result batch with an empty id. On the M5 at 6d1396e62f (06:21-06:26Z) 19 resident turns were refused as 'missing, duplicate, or mismatched native call/result IDs'. llama-server minted an id for its /v1 reply; in process the render's parse is that layer, so it mints call_<uuid> for an unnamed call. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A stored native exchange without paired ids is carried as her receipt, never refused on every act Calls parsed with empty ids at 6d1396e62f were stored with Aiko's and Benchy's acts; every act after refused the same receipt ('missing, duplicate, or mismatched native call/result IDs'), on every build including the rollback (Aiko 32, Benchy 12, 06:36-06:41Z): her mind stopped on her own history. One rule now decides both the receipt's form and the refusal (prompt::types::native_ids_correlate): an exchange whose ids do not pair one to one is carried as its receipt (what she did and what came back, known), probed as delib.receipt.uncorrelated, and is never given ids it did not have. Regression test beside the newest-result tests. Pre-existing and unrelated (fails identically without this change, 06:50Z): an_unsaved_newest_result_is_saved_and_pages_instead_of_refusing (required 113,923 > budget 110,128). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Preserved minds are one complete generation: blocks written to files no manifest names, the manifest published only after every write Codex on #6159 at 9fd0d0c868: preserve wrote each persona's fixed <uuid>.cpb before publishing the singleton manifest, so a stop interrupted in between paired the old manifest's token history with newer blocks of the same owner and epoch, and a failed individual preserve dropped that resident from the replacement entries. - Each stop mints a Generation; every mind's blocks go to <persona>.<generation>.cpb, never over a file a published manifest names. The manifest entry names its file (PreservedMind.blocks). - The manifest is published (Preserved::publish) only after every write has landed. Only then are the block files it no longer names removed; a refused save publishes and removes nothing, so the last generation stands. - A mind whose write fails keeps her entry from the last complete generation (next_manifest); her file is still there. - Format 2. A format-1 manifest upgrades with its blocks at the fixed names it used, so the first start after this resumes every mind the last stop preserved. - Tests (preserve.rs): an interrupted stop leaves the last generation whole with its own blocks; a failed write keeps her last entry; a publish removes only what it no longer names; format 1 upgrades. Fork pin 834770daf: #153's standalone recurrent checkpoint refused (1fef01207), #155's Windows-safe replace and geometry-checked read (834770daf), test-persona-blocks ok on the hybrid model and synthetic qwen35moe (08:47Z). Checked with serving down (08:50-08:56Z): cargo check of the core, the engine tests and the metal example; persona_scheduler 8/8, persona-engine 21/21, llama chat 3/3. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A preserved mind stays until a newer write replaces her; the manifest is the last generation from the moment it commits Codex on #6159 at a3ef26e8a3: 1. A resident whose resume was refused (a smaller boot window) never entered the warm table, so the next stop neither wrote her nor counted her failed; next_manifest dropped her and publish unlinked her blocks. next_manifest(last, written) now keeps every last-generation entry no write this stop replaced: failed, refused, or not scheduled. Test: saved, refused at the next boot, a stop before her next turn, then a boot that fits her resumes her original history and blocks. 2. Fork pin 834770daf is now published (fable/persona-files, CambrianTech/llama.cpp#155): it was committed on a detached HEAD and the branch push did not carry it. 3. publish sets last as soon as the save returns; a failed directory listing afterwards is reported as cleanup, never as a lost save. Test: the listing fails after the commit and last is the committed generation. Checked with serving down (13:38-13:44Z): core, engine tests, metal example; persona_scheduler 10/10. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A waiting turn outranks background work for the decode permit; every admission wait is timed by its owner Codex, BigMama R21 (2026-11-19 13:24:41-13:34:52Z): Kimi held her directed lane 610 s before her act was pinned, while four background requests (two consolidations, the historian, belief review) took slot 2. One decode permit per endpoint, and a return wakes every waiter. A turn holding a lane lets it go to wait (turn_admission.rs:417-420) and must take it again before it retries (line 404), while background work in DecodeBound::acquire retries at once, so it can win every return. - DecodeBound counts waiting turns (TurnWaiting, from a turn's first refused try until she holds a permit). While any turn waits, acquire (background, dreams) leaves a returned permit for her; the last waiting turn leaving wakes it. Test: a_returned_permit_waits_for_the_turn_not_the_dream. - The cause is not proven: R21's retained probes have no receipt for the permit, lane, gate or slot wait. Each owner now times its own wait, keyed to the act where it knows her: inference.decode_permit.turn_waited (page), inference.lane.reacquired (persona), inference.mind_gate.waited (page), inference.slot.permit_waited (slot). - preserve.rs: the unused HashMap import is gone (the guard's check flagged it). Checked with serving down (14:06-14:12Z): core, engine tests, metal example; slots 77/77, turn_admission 54/54 (6 ignored), persona_scheduler 10/10, persona-engine 21/21, llama chat 3/3. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Background work holding a lane takes the endpoint's priority decision too; each pool-less adapter ranks only its own waiters Codex on #6159 at 411773eb20: a keyed dream, or a dream on a pool without scratch, holds a lane and tries through try_or_return_as(None), which went straight to try_or_return and took a returned permit while a turn waited. Now, while any turn waits, it is given the wait and lets its lane go through the caller's existing refused branch (release before wait). The process-wide ADAPTER_TURNS_WAITING is deleted: a turn waiting on one adapter's semaphore no longer holds back another adapter's work. Tests: a_laned_dream_is_given_the_wait_while_a_turn_waits, a_pool_less_adapter_ranks_only_its_own_waiters. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The decode permit takes one claim whose rank is its request's class; an adapter owns one bound Codex on #6159 at 7853bb989e, and Joel: group what shares an owner and lifetime, require what an operation needs, keep Option for a meaningful absence, one owner API for every caller. - SlotClass::decode_rank is the ONE map from a request's class to its rank: Turn, Fork, Sidecar are foreground; Background, Dream, Probe yield to them. A turn's rank was whether it named a page (try_or_return_as(Option<PageKey>, ..)), so an unpaged turn ranked as background. - DecodeClaim groups a caller's class with its counted wait (absent until a foreground claim is first refused), made once per admission and kept across its retries. - DecodeBound::try_claim / claim are the one priority decision for every caller; try_or_return, try_or_return_as and acquire are deleted. - DecodeBound::with_permits builds a pool-less adapter's bound ONCE (the adapter field is now a DecodeBound); every clone shares its waiting count and return notice. The implicit From<&Arc<Semaphore>>, which made a new count per conversion so nobody was ranked, is deleted, with the process-wide adapter notice. - Tests build permits with the same constructor production uses. Tests: a_laned_dream_is_given_the_wait_while_any_foreground_claim_waits, an_adapter_bound_ranks_every_clone_and_no_other_adapter, plus the returned-permit replay on the claim API. Serving-down check window 14:31-14:37Z: slots 79/79, turn_admission 54/54, persona_scheduler 10/10, persona-engine 21/21, llama chat 3/3; continuum-core checks. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A stage has one lifecycle owner: stop closes intake, join waits for its teardown; an evicted payload is dropped on the worker Codex's patch on 73ca6d6a05 (Codex owns stage lifecycle; applied unchanged, reviewed by Fable). - spawn_stage returns (StageInput, StageWorker): producers get only the input; the one owner stops (close intake under the inbox lock) and joins (drain accepted inputs, release state). - KeepNewest keeps a displaced payload in a bounded retired list and drops it on the worker, so neither the producer nor a bystander pays its destructor under the lock; a full retired list refuses with Full (backpressure) instead of dropping synchronously. - The persona scheduler thread stops and joins Emit and Record after its driver loop exits. - Test eviction_and_final_cleanup_belong_to_the_joined_worker. Review notes: no live stage is KeepNewest (Emit and Record are Reliable), so the new Full on a KeepNewest stage changes no current caller; Outbox already backlogs Full. The shutdown join runs Handle::block_on on the scheduler's std thread (not a runtime worker), which is allowed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A lookup registers no endpoint, and the stop checkpoints only endpoints something registered The M5's stop receipts said "UNSAVED: page_io at :58057 (process unidentified)" while the persona engine had preserved every mind (14:54Z: persona.engine.suspended preserved=3 retained=0). Codex traced it: SlotDirectory::get went through endpoint(root), which inserts an Unprobed entry, and warm-ahead calls get on the catalog llama-server root; page_io's stop then iterated every entry and claimed custody of one nothing launched or discovered (Adopted(Err(IdentityUnverified))). - SlotDirectory::existing: the non-inserting read. get, page_admission_known, page_discovery_generation and page_admission_path go through it; only discovery, launch and latching register an endpoint. - page_io's stop checkpoints an endpoint only when this core launched its engine, its pool was asked (discovered or latched without paging), or a live lane is recorded there (holds_custody); a skipped one is probed (inference.kv_page.stop_checkpoint_skipped). Real adopted custody is still checkpointed or retained. - continuum-flow: Overflow::KeepNewest documents that push can answer Full once the worker has a full depth of displaced inputs to drop (Codex's review note on 2578d5f473). Test only_a_registered_endpoint_is_the_stops_to_checkpoint: a lookup registers nothing; an unprobed entry with no lane is not the stop's; a recorded lane or a discovered pool is. Serving-down check window 15:20-15:27Z: slots 80/80, turn_admission 54/54, persona_scheduler 10/10, persona-engine 21/21, llama chat 3/3; continuum-core checks. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A turn that wrote nothing says why: the raw tail, the stop it ended on, what the parse kept Aiko on the M5 from 15:36Z 2026-11-19: about 20 turns in a row of 112-411 tokens, finish=stop, text 0, no call; each turn's reasoning ends "let me read the end of tests.rs now" and the turn stops where her call would begin (Atlas, Aris and Benchy show the same think-only turns). The captures keep only the parsed text and reasoning, so a stop string firing at her call, the model ending inside its thinking, and a call the parse dropped all look the same. Probe inference.turn.wrote_nothing on any turn with no text and no call: tokens, generation end, the stop string the written text ends on (or none), reasoning and written lengths, and the last 160 characters actually written. Measurement only; no behavior change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Clear #6159's hygiene findings: typed refusals, stages sized by their owner's grant, no polls, no multi-sequence widening Codex's exact-head verdict on 8ba9893d8a: source-hygiene job 135693077628 failed ten ratchets. Every site was listed against canary 2ac6315176 with a full-listing hygiene binary in serving-down windows; all ten now hold (judged run rc=0, same binary over both trees). - Typed errors where text was: PreserveError (driver), StoreError (preserve), ChatRefusal (sampler), InProcessRefusal as one LlamaServerError::InProcess variant (its causes no longer read as llama-server spawn failures). The render path converts to the adapter trait's String once. - Stages never size themselves (Codex: option b). Stage::DEPTH is gone; spawn_stage takes a typed Capacity from its owner. Emit and Record take the engine's admitted window in items. A latest-value stage holds its one pending value (Capacity::latest). - No poll: the driver's 5 ms EMIT_RETRY recv_timeout is gone. With no turn left it awaits the stages' space (Outbox::drain), then blocks on its queue. Record's 10 s WINDOW is gone: a window is one turn. - block.rs no longer widens a "safe" architecture to n_seq_max=4: one mind decodes at a time. - persona <-> residency cycle removed: Carries moves to persona, which residency depends on. - lane_args.rs untouched again: prefill_ubatch moves to its one caller, the in-process engine. - Caller sends report a hung-up caller through probes instead of `let _ =`; absent row fields are Option, not 0; one whole_ms owner; reuse::choose takes two Histories, not five loose values. Replay (Codex's ask): a_stalled_stage_holds_its_producer_and_drain_resumes_it_on_space_in_order. Serving-down windows on the M5, 16:33-16:44Z: continuum-flow 23/23, persona-engine 21/21, persona_scheduler 10/10, llamacpp_adapter 16/16 (1 ignored), in_process 1/1; continuum-core checks. The core restarted on 1f2000cd66 after each window. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * A stalled stage never blocks a stop: the driver wakes on its queue or the stage's space, and defers stepping while it holds Codex's exact-head finding on f530b00670: with no turn left, the driver blocked in Outbox::drain before reading its queue, so a new turn or the stop's Suspend could not wake it while Emit was stalled; and the outbox backlog was unbounded outside the stage's grant. - The request queue is a tokio unbounded channel (sync send, awaitable recv). When a stage holds what the driver produced, or no turn is left, the driver waits in one select! over a submission and the stage's space: a turn or a Suspend wakes it at once, whatever the sink is doing. - While a stage holds a backlog the driver steps no turn (a deferred producer), so the backlog stays within the stage's grant plus one step. - Outbox::drain is cancel-safe: an item leaves the backlog only when the stage has taken it. Replays (Codex's asks): a_submission_wakes_a_producer_held_by_a_stalled_sink_and_the_drain_loses_nothing (a suspend sent after the drain began wakes it; the held items arrive later, in order, once), and a_stalled_sink_keeps_completion_next_turn_and_cancellation_whole_and_in_order. Serving-down window on the M5, 17:11-17:15Z: continuum-flow 25/25, persona-engine 21/21, persona_scheduler 10/10, llamacpp_adapter 16/16 (1 ignored), in_process 1/1; continuum-core checks; hygiene judged against canary 2ac6315176: rc=0. The core restarted on f530b00670. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Keep a recurrent checkpoint at the native prefix shared across a view turnover * Pin the native checkpoint implementation exercised on M5 * Record the tested native fork pin and its Windows CI toolchain fix * Track the fork Windows CPU toolchain correction * Pass tail tool schemas through the in-process chat renderer * Query providers concurrently outside the registry guard * Learn a deeper recurrent checkpoint after a short rewind * Estimate waiting prefill once per eligible turn * Schedule overdue resident turns at landed frame boundaries * Represent resident readiness and service timing explicitly * Retain the earliest valid learned checkpoint across deeper captures * Keep native checkpoint custody in resident history * Express history transfer and checkpoint basis ownership * Compare token history once when binding a resident * Correlate empty native turns with their requested tool catalog * Group native generation output in the empty-turn probe * Pin the deployed Qwen argument-order parser * Retain one-off native state only while its turn owns it * Resolve retiring native state before recording suspend inventory * Report every resident held when suspend cannot preserve the node * Give the requesting task ownership of its submitted inference turn * Remove blocking generation wrapper from the native backend * Enqueue flow work on submission and trace native worker parking * Skip candidate ranking when only one turn can run * Wake one shared stage when a resident phenotype changes * Close cancelled stage intake and rearm residency on its next wake * Preserve the gene residency scheduling contract for existing callers * Surface native checkpoint capture and rewind outcomes * Attribute checkpoint allocation and capture failures to the resident * Borrow each prefill slice until submission and history update * A turn's path from entry to the engine reports every transition it reaches, keyed by its request id The M5, 2026-11-21: Aris entered generate_text at 00:48:32 and was dropped 1,499 s later with no record of whether the engine ever held her turn; the driver logged nothing at admission, so the stall could not be placed (and was first misattributed to the grants). Now each transition is recorded once, keyed by the submitted request's id (`RequestId`, the adapter request_id, the one id crossing from her deliberation into the engine): - inference.generate.enter: gains `r…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps @typescript-eslint/parser from 8.29.1 to 8.46.2.
Release notes
Sourced from
@typescript-eslint/parser's releases.... (truncated)
Changelog
Sourced from
@typescript-eslint/parser's changelog.... (truncated)
Commits
55ca033chore(release): publish 8.46.23f5fbf6chore(release): publish 8.46.1aec785echore(release): publish 8.46.0255e9e2chore(release): publish 8.45.0c198052chore(release): publish 8.44.177056f7chore(release): publish 8.44.0ef9173cchore(release): publish 8.43.0d135909chore(release): publish 8.42.031a7336chore(release): publish 8.41.060c3b26chore(release): publish 8.40.0Maintainer changes
This version was pushed to npm by [GitHub Actions](https://www.npmjs.com/~GitHub Actions), a new releaser for
@typescript-eslint/parsersince your current version.Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)