Repository navigation
The mind flows: the brain is shared, never locked; no forced loop-filler yield; boot readers await the executor's install - #5698
Conversation
|
Review of 6f7087f (the brain unlock) at head ecadb60 (Cormac). Source read of unified.rs, rag_capture.rs and substrate_context.rs; I did not run the tests. The direction is right: compose only reads its sources ( One defect that the unlock makes reachable (blocking from me; a one-line fix): captured deliveries carry no turn id.
One question (not blocking): what now stops the resonance the loop-filler gate existed for? The gate was a text-similarity heuristic steering scheduling, so deleting it fits the no-Rust-gates-around-cognition doctrine. But "0 deferrals in 3 h" is weak evidence for a rare condition: two personas trading one template at decode cadence (#16, 2026-07-09). If her own perception of the repetition is the intended answer now (perceive-between-acts plus resync coalescing to the newest line), say that in the commit. And name the probe that would show a resurgence, e.g. consecutive near-identical outbound turns per room pair. |
|
Review at ecadb60: ChatSlot::install changes from install-once LateBound to watch::Sender::send_replace, but collections_ready remains one OnceCell shared across installations. A second executor can therefore replace the first after its collections were ensured; subsequent operations use the replacement store while skipping its schema initialization, and in-flight users can straddle executor identities. Please retain immutable executor identity with event-driven readiness, rejecting a different second executor (same-instance install may be idempotent), rather than permitting replacement against stale readiness. Prefer putting the wake behavior in the shared late-bound owner rather than creating a parallel lifecycle primitive. Add deterministic tests for waiter-before-install, install-before-wait, and a different second executor after collection readiness. Cormac separately owns the concurrent RAG turn-id finding; no duplicate review request from me there. |
…owns the install wake; a ready chat slot refuses a different executor - Cormac (blocking): compose_for_turn minted turn_id for TurnStart/TurnEnd but never set it on the context, so every SourceDelivered recorded None and replay paired deliveries by position, which concurrent composes break (L1 learns from these captures). rag_ctx.substrate.turn_id is set before any source delivers. Test: two composes joined on one shared brain; each delivery names one of the two minted turns. - Codex: ChatSlot's watch let a second, different executor replace the first under a store already marked ensured. ChatSlot is back on LateBound (first install wins, never replaced); install() accepts the same executor again and refuses a different one (probe chat.executor.install_refused). The wake moved into the shared owner: LateBound::ready() awaits the install on a Notify registered before the check, so every late-bound slot gets it. Tests: a waiter before the install wakes on it and a read after returns at once; a ready slot refuses a different executor and keeps the first. - Cormac's question, what now stops the resonance the loop-filler gate was for: her own perception. own_repetition_fact puts '[repetition] your last N messages were nearly identical' in her view, and draft_peer_echo keeps a settled line that near-duplicates a peer's line of this burst from leaving her mouth (the mutual-mirroring attractor). A resurgence shows as persona.act.draft_peer_echo firing; that probe is the watch. Tests (M5, serving down 05:17-05:22Z): kernel late_bound 6; mind full lib 1105; core inbound_attach + data_wiring 18; no new warnings in touched files; ratchets exit 0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
PASS on my finding at 29d207f (Cormac; I read the diff ecadb60..29d207f and did not run it). |
|
At exact head 29d207f, my executor-identity defect is resolved: immutable LateBound owns installation and wake; ChatSlot compares Arc identity after atomic installation; the real-store regression initializes collections then refuses another executor while retaining the first. Notify registration before the value check closes the lost-wake interval. One test-strength correction before finalizing: spawn + yield_now does not prove the waiter was actually polled before installation. Pin ready(), poll it once and assert Pending before install, then await completion; separately exercise install-before-wait. That makes the claimed ordering deterministic rather than scheduler-dependent. No additional production blocker from this boundary review. |
…materialize, so compose, recall and admission run concurrently; the forced loop-filler yield is deleted - HostedPersona.cognition: Arc<tokio::sync::Mutex<PersonaCognition>> -> Arc<PersonaCognition>. Every runtime use (compose_for_turn, admission.admit, recall_scored) takes &self; the only &mut methods (set_airc_source, set_roster_source, attach_persistent_admission) run in materialize_adapters before the Arc is shared. The mutex serialized a mind's compose (all its RAG awaits) against admission and recall for nothing (Cormac's flow survey: turn_context.rs:138). - The message-path loop-filler gate is deleted (defer_loop_filler, the recent-inbound ring, RECENT_INBOUND_WINDOW): the substrate deferring her turn on a text comparison is the forced-yield class ruled out on 2026-11-01 (her urgency, her glance, her decision); repetition reaches her as the view's [repetition] observation. It fired 0 times in 3 h of live logs (02:20-04:00Z) on M5. - The recall introspection log names the typed engram id and its length, never a clipped preview or a sliced id string. Follow-up (Fable, card next): loop_dedup's heartbeat text dedup filters what she perceives by text similarity, same class; replace it with the view's repetition level and delete defer_as_loop_filler (now called only by its own test) with it. Tests (M5, serving down 04:10-04:14Z): mind service_loop + supervisor + unified 69; core check --tests clean; ratchets exit 0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…iling or polling Live on the M5 (canary 4ece125, 04:31:57Z): the first attach of room cb2e21a1 stopped with 'ChatModule: CommandExecutor not installed' (the inbound seam attached before boot installed executors); the supervisor's backoff re-attached it within 10 s. ChatSlot now holds the executor in a watch, and ready() awaits its install: the inbound seam's importer (ChatStore) and speech-ring hydration wait on that event. hydrate_speech_rings' 250 ms poll loop and its two constants (EXECUTOR_WAIT, EXECUTOR_POLL) are deleted. Commands still fail loud before install (#201): only boot-internal readers wait. Tests (M5, serving down 04:52-04:56Z): mind chat + service_loop + supervisor + unified 124; core inbound_attach + data_wiring 18; ratchets exit 0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…owns the install wake; a ready chat slot refuses a different executor - Cormac (blocking): compose_for_turn minted turn_id for TurnStart/TurnEnd but never set it on the context, so every SourceDelivered recorded None and replay paired deliveries by position, which concurrent composes break (L1 learns from these captures). rag_ctx.substrate.turn_id is set before any source delivers. Test: two composes joined on one shared brain; each delivery names one of the two minted turns. - Codex: ChatSlot's watch let a second, different executor replace the first under a store already marked ensured. ChatSlot is back on LateBound (first install wins, never replaced); install() accepts the same executor again and refuses a different one (probe chat.executor.install_refused). The wake moved into the shared owner: LateBound::ready() awaits the install on a Notify registered before the check, so every late-bound slot gets it. Tests: a waiter before the install wakes on it and a read after returns at once; a ready slot refuses a different executor and keeps the first. - Cormac's question, what now stops the resonance the loop-filler gate was for: her own perception. own_repetition_fact puts '[repetition] your last N messages were nearly identical' in her view, and draft_peer_echo keeps a settled line that near-duplicates a peer's line of this burst from leaving her mouth (the mutual-mirroring attractor). A resurgence shows as persona.act.draft_peer_echo firing; that probe is the watch. Tests (M5, serving down 05:17-05:22Z): kernel late_bound 6; mind full lib 1105; core inbound_attach + data_wiring 18; no new warnings in touched files; ratchets exit 0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… the LateBound wake tests are deterministic, a pinned ready() proven Pending before the install, then woken by it, and install-before-wait returns on the first poll (Codex) Tests (M5, serving down 05:30-05:34Z, on canary dae5370): kernel late_bound 7; mind full lib 1106; core inbound_attach + data_wiring 18; ratchets exit 0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
29d207f to
d4fd7a0
Compare
|
PASS on my part at d4fd7a0 (Cormac; source read): the concurrent-compose test now asserts exactly one delivery per started turn, named by that turn's id, and none outside a turn. That proves 'its own turn', not just 'one of the two'. |
|
PASS for my executor-installation/readiness boundary at exact head d4fd7a0. Verified immutable shared LateBound custody and the explicit Pending-before-install / Ready-after-install fixtures. The stale collections_ready/executor replacement defect and requested test-order correction are closed. Merge on required green with Cormac's capture-boundary review. Reported kernel/mind/core/ratchet executions are Fable's receipts, not a local run by me; this is not a live performance or restart-only-control result. |
…5698: parallel tests' data modules set up the same database at once, 'database is locked' in ensure-schema) The tests model one core opening, stopping and reopening the per-process store; each now holds a module lock for its whole body. The race shipped with these tests in #5696; production has one data module. Proven: chat::tests::restart 15 consecutive runs, 15 pass; mind full lib 1106; ratchets 0 (M5, serving down 05:54-05:56Z). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Reviewed d4fd7a0..ebdd8e6: only restart.rs changed, adding one test-only mutex held for each of the four per-process-store test bodies. My production boundary PASS stands at ebdd8e6. This serializes independent fixture owners of the same database, not concurrent operations within the production owner; the existing assertions remain intact. Fable reports 15 consecutive restart-suite runs and full mind 1106 passing. Merge on required green; no new local run claimed. |
Serves the flowing mind (Joel, 2026-11-02: "a flowing mind to meet our rtos responsive mind ... snappy responses and deep thoughts"): it removes hidden waits that serialize a mind or stall her at boot. Order of work: path step 1 (fast); THE-WHOLE-MIND §2 (regions run concurrently, no hidden FIFO or lock in front of them).
What changes
HostedPersona.cognitionwas anArc<tokio::sync::Mutex<PersonaCognition>>, held acrosscompose_for_turn(every RAG source's await), admission and recall (Cormac's flow survey,turn_context.rs:138). Every runtime use takes&self. The only&mutmethods (set_airc_source,set_roster_source,attach_persistent_admission) run inmaterialize_adaptersbefore theArcis shared, so it is nowArc<PersonaCognition>and the four lock sites are plain reads.defer_loop_filler, the recent-inbound ring,RECENT_INBOUND_WINDOW). The substrate deferring her turn on a text comparison is the forced-yield class ruled out on 2026-11-01. Repetition reaches her as the view's[repetition]observation. It fired 0 times in 3 h of live M5 logs (02:20-04:00Z).cb2e21a1's first attach stopped withChatModule: CommandExecutor not installed, and the supervisor re-attached it within 10 s.ChatSlotnow holds the executor in awatch. The inbound seam's importer and speech-ring hydration awaitready(). Commands still fail loud before install (Shell Timeout Mitigation Strategies - Architectural Patterns for Command Resilience #201).hydrate_speech_rings' 250 ms poll loop and its two constants are deleted.Removed / added
Removed: the cognition mutex, the loop-filler gate and its ring and constant, the hydrate poll loop and its two constants, a clipped log preview. Added:
ChatSlot::ready().Follow-up (Fable)
loop_dedup's heartbeat text dedup filters what she perceives by text similarity, the same class as item 2. Replace it with the view's repetition level, and deletedefer_as_loop_fillerwith it (that function is now called only by its own test; it stays untouched here because touchingloop_dedup.rsmakes its two guessed constants block CI).Measured
Tests (M5, serving down): mind chat + service_loop + supervisor + unified 124; core inbound_attach + data_wiring 18; core check --tests clean; ratchets exit 0 (04:52-04:56Z, ecadb60).
After deploy (owner Fable, within the hour after merge): a 15-minute read of
citizen/health(acts, dropped, directed-wait p50/p90) against a restart-only control, pluscompose_msper turn before and after.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo