Skip to content

Delete 10,592 lines of dead code from the mind, genome and memory (no caller outside their own tests) - #5361

Merged
joelteply merged 1 commit into
canaryfrom
fable/dead-code-mind
Oct 24, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fable/dead-code-mind

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Joel, 2026-10-24: "These sizes are insane. Same goes for code itself being downright insane."

CLAUDE.md: "dead code is deleted in the same change (no caller outside its own tests = gone)". Each item was checked against non-test callers, inventory and command registration, ts-rs exports and wire types.

Deleted: 27 whole files and parts of 4 more, across cognition, persona, context, genome and memory. 10,592 lines removed, 32 added. The full list is in the commit.

Kept, with the reason for each:

  • the genome paging stack, which is ts-rs exported and documented;
  • test-only production functions;
  • registry-wired modules.

Measured

M5, 2026-10-24, serving down.

  • Check: cargo check -p continuum-core --features metal,accelerate --tests --bins, 0 errors.

  • Ratchets (none rose):

    • unwired_machinery 52 → 43
    • unjustified_unwraps 2018 → 1998
    • modules_in_cycles 29 → 28
    • unjustified_serialization 235 → 229
    • upward_imports 38 → 37
  • Tests: every drop is exactly the deleted dead code's own tests.

    Crate Before After
    mind 2,357 2,256
    genome 410 380
    memory 67 51
    experience 92 92

    All pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…side its own tests)

Whole modules removed (production callers: none anywhere under core/ or apps/):
mind: cognition/{threat_detector,workspace_dashboard,memory_consolidation_region,tool_relevance,
host_capability_probe,audit,resolution,round_readiness,act_replay,will}, persona/{projection,
base_model_policy,rag_replay,portability}, context/agent + Context trait + StubContext.
genome: expert_ingest, recall_select, commons_ranking, residency (GenomeResidencyModule),
recall_source_must_include, eviction, recall_source_working_set.
memory: consolidation_pipeline, raw_adapter, consolidation_adapter, consolidator,
consolidation_threshold.
Also: curriculum.rs keeps only LivedExpansionSynthesizer (a test in act_observe uses it); the
remediation synthesizer, CurriculumSynthesizer trait and expansion_examples are gone;
persona/recorder.rs drops the unused turn-frame fixture loader.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit a3e496d into canary Oct 24, 2026
5 checks passed
@joelteply
joelteply deleted the fable/dead-code-mind branch October 24, 2026 05:43
joelteply added a commit that referenced this pull request Oct 24, 2026
… (mind split step 6)

Plan phase 2 (crates by the placement map). The verbs cognition calls that persona owns are
inverted: cognition names the contract in cognition/extensions.rs (the shape of
continuum-kernel's runtime::extensions: a static RwLock<Option<..>> per slot and install_*
beside it) and persona fills it at boot (persona::cognition_extensions::install, called from
core's install_kernel_extensions, the one list boot and tests share). An empty slot is loud:
every call through one emits `cognition.extension.missing` naming the slot, then does the
no-op its doc states. Slots:

- room voice (act receipts, apply.rs), through the runtime registry + publish_text_in_room;
- card carry request (apply.rs);
- CreditSink: produce_speech_discipline (verdict), settle_instance_credit and
  settle_card_credit (swe_instance);
- cognition pulse touch (request.rs); mark_perceived (settle_to_outcome.rs);
- remote binding (rehome.rs; the error crosses as text, it is only displayed);
- the fleet quiesce lease (cognition_eval.rs: FleetLease holds persona's QuiesceLease);
- the room whose board holds a card (activity_room_for, via work_board::horizon);
- the pinned workspace-map source (default_workspace_capacity's eval repoint).

Moved UP into persona (persona::card_hands, 429 lines): the card-binding half of
acting_hands: root_at_held_card, bind_held_card, bind_card, close_ended_claims,
end_card_turn, HeldCardTurn, CardHands and the told-where-she-stands notice. Cognition keeps
where her hands stand (ActingHands, ACTING_ROOTS, focus, claim_gone_verdict,
claim_has_ended) and gains claimed_places_of, so the ACTING_ROOTS static is read through one
accessor and never leaves its owner. impl PersonaChannelReader for
PersonaAircRuntimeRegistry moves to the registry's file.

Moved DOWN instead of inverted, because they are pure leaves (git renames, statics moved
with their module): room_substrates (its OnceLock registry), card_holder (+ held_of_owned,
settled_card from airc_runtime and latest_submission from work_board::submissions),
work_board::facts -> cognition::card_facts, grounding_invalidation (its WORKSPACE_MAP_DIRTY
registry) and cached_source. A pure fn behind a slot would only add a hop.

Two cognition tests that drive persona's verbs now install the slots first (step 7 moves
them with persona). Callers migrated: 54 files, 10 in continuum-core.

Measured on canary a3e496d (rebased after #5361): cognition_names_persona 109 -> 46;
every other ratchet unchanged. Tests: mind 2252, experience 92, memory 51, genome 380,
kernel 1252, core test_env 117 + the same 2 failures canary a3e496d has (fixed in the next
commit). Check: 0 errors, warnings 103 (= base).

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 Oct 24, 2026
Canary a3e496d fails two core test_env guards on its own: loose_id_guard still declares
persona/projection.rs (deleted by #5361), and module_wiring_guard still lists FaultRecorder
as unwired though it is now referenced outside its file. Both guards name the fix
(delete the row); core test_env: 117 + 2 failed -> 119 passed.

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 Oct 24, 2026
Hidden behind the build-only test break, which ended the core job before its tests
ran. PR #5360's job 120795733877 then reported 2595 passed, 2 failed:
- module_wiring_guard listed FaultRecorder as an unwired fixture; #5361 (a3e496d)
  deleted it, so the guard's own list is now its only reference.
- loose_id_guard listed persona/projection.rs persona_id as a loose String; that
  file no longer exists.
Both entries are deleted.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply added a commit that referenced this pull request Oct 24, 2026
… (mind split step 6)

Plan phase 2 (crates by the placement map). The verbs cognition calls that persona owns are
inverted: cognition names the contract in cognition/extensions.rs (the shape of
continuum-kernel's runtime::extensions: a static RwLock<Option<..>> per slot and install_*
beside it) and persona fills it at boot (persona::cognition_extensions::install, called from
core's install_kernel_extensions, the one list boot and tests share). An empty slot is loud:
every call through one emits `cognition.extension.missing` naming the slot, then does the
no-op its doc states. Slots:

- room voice (act receipts, apply.rs), through the runtime registry + publish_text_in_room;
- card carry request (apply.rs);
- CreditSink: produce_speech_discipline (verdict), settle_instance_credit and
  settle_card_credit (swe_instance);
- cognition pulse touch (request.rs); mark_perceived (settle_to_outcome.rs);
- remote binding (rehome.rs; the error crosses as text, it is only displayed);
- the fleet quiesce lease (cognition_eval.rs: FleetLease holds persona's QuiesceLease);
- the room whose board holds a card (activity_room_for, via work_board::horizon);
- the pinned workspace-map source (default_workspace_capacity's eval repoint).

Moved UP into persona (persona::card_hands, 429 lines): the card-binding half of
acting_hands: root_at_held_card, bind_held_card, bind_card, close_ended_claims,
end_card_turn, HeldCardTurn, CardHands and the told-where-she-stands notice. Cognition keeps
where her hands stand (ActingHands, ACTING_ROOTS, focus, claim_gone_verdict,
claim_has_ended) and gains claimed_places_of, so the ACTING_ROOTS static is read through one
accessor and never leaves its owner. impl PersonaChannelReader for
PersonaAircRuntimeRegistry moves to the registry's file.

Moved DOWN instead of inverted, because they are pure leaves (git renames, statics moved
with their module): room_substrates (its OnceLock registry), card_holder (+ held_of_owned,
settled_card from airc_runtime and latest_submission from work_board::submissions),
work_board::facts -> cognition::card_facts, grounding_invalidation (its WORKSPACE_MAP_DIRTY
registry) and cached_source. A pure fn behind a slot would only add a hop.

Two cognition tests that drive persona's verbs now install the slots first (step 7 moves
them with persona). Callers migrated: 54 files, 10 in continuum-core.

Measured on canary a3e496d (rebased after #5361): cognition_names_persona 109 -> 46;
every other ratchet unchanged. Tests: mind 2252, experience 92, memory 51, genome 380,
kernel 1252, core test_env 117 + the same 2 failures canary a3e496d has (fixed in the next
commit). Check: 0 errors, warnings 103 (= base).

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 Oct 24, 2026
Canary a3e496d fails two core test_env guards on its own: loose_id_guard still declares
persona/projection.rs (deleted by #5361), and module_wiring_guard still lists FaultRecorder
as unwired though it is now referenced outside its file. Both guards name the fix
(delete the row); core test_env: 117 + 2 failed -> 119 passed.

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 Oct 24, 2026
… (mind split step 6)

Plan phase 2 (crates by the placement map). The verbs cognition calls that persona owns are
inverted: cognition names the contract in cognition/extensions.rs (the shape of
continuum-kernel's runtime::extensions: a static RwLock<Option<..>> per slot and install_*
beside it) and persona fills it at boot (persona::cognition_extensions::install, called from
core's install_kernel_extensions, the one list boot and tests share). An empty slot is loud:
every call through one emits `cognition.extension.missing` naming the slot, then does the
no-op its doc states. Slots:

- room voice (act receipts, apply.rs), through the runtime registry + publish_text_in_room;
- card carry request (apply.rs);
- CreditSink: produce_speech_discipline (verdict), settle_instance_credit and
  settle_card_credit (swe_instance);
- cognition pulse touch (request.rs); mark_perceived (settle_to_outcome.rs);
- remote binding (rehome.rs; the error crosses as text, it is only displayed);
- the fleet quiesce lease (cognition_eval.rs: FleetLease holds persona's QuiesceLease);
- the room whose board holds a card (activity_room_for, via work_board::horizon);
- the pinned workspace-map source (default_workspace_capacity's eval repoint).

Moved UP into persona (persona::card_hands, 429 lines): the card-binding half of
acting_hands: root_at_held_card, bind_held_card, bind_card, close_ended_claims,
end_card_turn, HeldCardTurn, CardHands and the told-where-she-stands notice. Cognition keeps
where her hands stand (ActingHands, ACTING_ROOTS, focus, claim_gone_verdict,
claim_has_ended) and gains claimed_places_of, so the ACTING_ROOTS static is read through one
accessor and never leaves its owner. impl PersonaChannelReader for
PersonaAircRuntimeRegistry moves to the registry's file.

Moved DOWN instead of inverted, because they are pure leaves (git renames, statics moved
with their module): room_substrates (its OnceLock registry), card_holder (+ held_of_owned,
settled_card from airc_runtime and latest_submission from work_board::submissions),
work_board::facts -> cognition::card_facts, grounding_invalidation (its WORKSPACE_MAP_DIRTY
registry) and cached_source. A pure fn behind a slot would only add a hop.

Two cognition tests that drive persona's verbs now install the slots first (step 7 moves
them with persona). Callers migrated: 54 files, 10 in continuum-core.

Measured on canary a3e496d (rebased after #5361): cognition_names_persona 109 -> 46;
every other ratchet unchanged. Tests: mind 2252, experience 92, memory 51, genome 380,
kernel 1252, core test_env 117 + the same 2 failures canary a3e496d has (fixed in the next
commit). Check: 0 errors, warnings 103 (= base).

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 Oct 24, 2026
Canary a3e496d fails two core test_env guards on its own: loose_id_guard still declares
persona/projection.rs (deleted by #5361), and module_wiring_guard still lists FaultRecorder
as unwired though it is now referenced outside its file. Both guards name the fix
(delete the row); core test_env: 117 + 2 failed -> 119 passed.

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 Oct 24, 2026
… is red since #5358 (card 26395022) (#5360)

* The build-only test greps the start script's current messages; canary is red since #5358 (card 26395022)

#5358 (3b36530) renamed two lines in start-server.sh: 'warm build complete' is now
'build-only pass complete' (:1047), and 'engine build failed in the warm pass' is now
'... in the build-only pass' (:1017). start-server-build-only.test.sh still grepped
the old text, so every 'lib tests continuum-core' job has failed in its first step
since then (canary jobs 120789754578 at 3b36530, 120790262399 at 47ff490).

The test's four greps now name the current lines. Verified on IntelMac (the test
fakes cargo and every tool, so nothing builds): before the change it exits 1;
after, it exits 0 with all 12 PASS lines. The step's other scripts
(start-server-airc-recovery, install-llama-server-slots, test_ci_lib_test_artifact)
also exit 0 on canary.

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

* The rollback's identity check builds on Linux too: dark_build calls it on every platform (card 26395022)

#5358's dark reboot (dark_build::PreviousCore::restore) calls restored_build_identity
on every platform, but deploy_verify gated it to Windows and macOS. On Linux the
`continuum` bin then fails to compile (E0425 at dark_build.rs:59), so the CLI
installed-release handoff job fails (PR #5360's job 120792131008). The gate goes.
binary_build_sha, running_core_build_sha and sha_matches are already ungated.

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

* Two honesty-guard entries named code that is gone (card 26395022)

Hidden behind the build-only test break, which ended the core job before its tests
ran. PR #5360's job 120795733877 then reported 2595 passed, 2 failed:
- module_wiring_guard listed FaultRecorder as an unwired fixture; #5361 (a3e496d)
  deleted it, so the guard's own list is now its only reference.
- loose_id_guard listed persona/projection.rs persona_id as a loose String; that
  file no longer exists.
Both entries are deleted.

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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
joelteply added a commit that referenced this pull request Oct 24, 2026
… (mind split step 6)

Plan phase 2 (crates by the placement map). The verbs cognition calls that persona owns are
inverted: cognition names the contract in cognition/extensions.rs (the shape of
continuum-kernel's runtime::extensions: a static RwLock<Option<..>> per slot and install_*
beside it) and persona fills it at boot (persona::cognition_extensions::install, called from
core's install_kernel_extensions, the one list boot and tests share). An empty slot is loud:
every call through one emits `cognition.extension.missing` naming the slot, then does the
no-op its doc states. Slots:

- room voice (act receipts, apply.rs), through the runtime registry + publish_text_in_room;
- card carry request (apply.rs);
- CreditSink: produce_speech_discipline (verdict), settle_instance_credit and
  settle_card_credit (swe_instance);
- cognition pulse touch (request.rs); mark_perceived (settle_to_outcome.rs);
- remote binding (rehome.rs; the error crosses as text, it is only displayed);
- the fleet quiesce lease (cognition_eval.rs: FleetLease holds persona's QuiesceLease);
- the room whose board holds a card (activity_room_for, via work_board::horizon);
- the pinned workspace-map source (default_workspace_capacity's eval repoint).

Moved UP into persona (persona::card_hands, 429 lines): the card-binding half of
acting_hands: root_at_held_card, bind_held_card, bind_card, close_ended_claims,
end_card_turn, HeldCardTurn, CardHands and the told-where-she-stands notice. Cognition keeps
where her hands stand (ActingHands, ACTING_ROOTS, focus, claim_gone_verdict,
claim_has_ended) and gains claimed_places_of, so the ACTING_ROOTS static is read through one
accessor and never leaves its owner. impl PersonaChannelReader for
PersonaAircRuntimeRegistry moves to the registry's file.

Moved DOWN instead of inverted, because they are pure leaves (git renames, statics moved
with their module): room_substrates (its OnceLock registry), card_holder (+ held_of_owned,
settled_card from airc_runtime and latest_submission from work_board::submissions),
work_board::facts -> cognition::card_facts, grounding_invalidation (its WORKSPACE_MAP_DIRTY
registry) and cached_source. A pure fn behind a slot would only add a hop.

Two cognition tests that drive persona's verbs now install the slots first (step 7 moves
them with persona). Callers migrated: 54 files, 10 in continuum-core.

Measured on canary a3e496d (rebased after #5361): cognition_names_persona 109 -> 46;
every other ratchet unchanged. Tests: mind 2252, experience 92, memory 51, genome 380,
kernel 1252, core test_env 117 + the same 2 failures canary a3e496d has (fixed in the next
commit). Check: 0 errors, warnings 103 (= base).

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 Oct 24, 2026
…ona (109 -> 0) (#5364)

* Peel C: the conversation contract moves down into cognition::conversation (mind split step 5)

Plan phase 2 (crates by the placement map). What a mind perceives arriving in a room and
how she answers into one is cognition's contract; persona supplies the airc transport behind
it. Moved down, so the act/observe drive, the settle, the experience stream and the evals
name no persona module for it:

- cognition::conversation (mod.rs): IncomingMessage (+ render_content/render_room_update,
  now pub), the PersonaConversation trait, the perception Wake (from perception_region),
  INBOX_CAPACITY and CATCH_UP_PAGE (from airc_persona_conversation).
- The closed leaf group render_content needs (git renames, unchanged bodies):
  room_event, channel_items (+ tests), channel_types, types, salience, persona_identity.
- seen_ids: SeenIds + is_stale (from wake_backlog) with their three tests.
- transcript_reader: AircTranscriptReader, read_cursor_consumer_id, the perception page
  filters and the airc_lib::Airc impl (from airc_source).
- workspace_turns: build_workspace_turns, TriggerTurn, the roster/echo/ring helpers,
  work_board_anchor (from work_burst) and the test-only roster projection (from
  service_loop/beat_outcome).
- scripted_conversation: the ScriptedConversation fixture (test-fixtures gated) moves down
  with the trait.

stream_citizen leaves the cognition trait. It returned persona's `dyn AircCitizen`, and
cognition's only caller (the held-card bind) moves up to persona in Peel D, so the narrowest
contract for cognition is none: persona's `service_loop::CitizenConversation:
PersonaConversation` carries the accessor, persona's loop holds `dyn CitizenConversation`,
and a call into cognition upcasts. The scripted fixture carries an opaque attachment;
persona's `ScriptedCitizen::with_citizen` seeds the citizen and persona's
CitizenConversation impl reads it back.

Callers migrated (persona::X -> cognition::conversation::X, persona's super::X, and the
persona root re-exports of the moved types, now gone): 116 files, 24 in continuum-core.
Core's root re-export of the inbox types points at their new owner. loose_id_guard's
channel_items rows follow the file.

source-hygiene: new ratchet cognition_names_persona (production lines in cognition/ naming
crate::persona; moved tests excluded). Base a51bc55: 109; this commit: 82.

Tests: mind 2369, experience 92, memory 67, genome 410, kernel 1252, core test_env 119
(sum 4309, same as base). cargo check -p continuum-core --features metal,accelerate --tests
--bins: 0 errors, warnings unchanged (mind 0). Every other ratchet unchanged.

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

* Peel D: cognition calls persona's verbs through cognition::extensions (mind split step 6)

Plan phase 2 (crates by the placement map). The verbs cognition calls that persona owns are
inverted: cognition names the contract in cognition/extensions.rs (the shape of
continuum-kernel's runtime::extensions: a static RwLock<Option<..>> per slot and install_*
beside it) and persona fills it at boot (persona::cognition_extensions::install, called from
core's install_kernel_extensions, the one list boot and tests share). An empty slot is loud:
every call through one emits `cognition.extension.missing` naming the slot, then does the
no-op its doc states. Slots:

- room voice (act receipts, apply.rs), through the runtime registry + publish_text_in_room;
- card carry request (apply.rs);
- CreditSink: produce_speech_discipline (verdict), settle_instance_credit and
  settle_card_credit (swe_instance);
- cognition pulse touch (request.rs); mark_perceived (settle_to_outcome.rs);
- remote binding (rehome.rs; the error crosses as text, it is only displayed);
- the fleet quiesce lease (cognition_eval.rs: FleetLease holds persona's QuiesceLease);
- the room whose board holds a card (activity_room_for, via work_board::horizon);
- the pinned workspace-map source (default_workspace_capacity's eval repoint).

Moved UP into persona (persona::card_hands, 429 lines): the card-binding half of
acting_hands: root_at_held_card, bind_held_card, bind_card, close_ended_claims,
end_card_turn, HeldCardTurn, CardHands and the told-where-she-stands notice. Cognition keeps
where her hands stand (ActingHands, ACTING_ROOTS, focus, claim_gone_verdict,
claim_has_ended) and gains claimed_places_of, so the ACTING_ROOTS static is read through one
accessor and never leaves its owner. impl PersonaChannelReader for
PersonaAircRuntimeRegistry moves to the registry's file.

Moved DOWN instead of inverted, because they are pure leaves (git renames, statics moved
with their module): room_substrates (its OnceLock registry), card_holder (+ held_of_owned,
settled_card from airc_runtime and latest_submission from work_board::submissions),
work_board::facts -> cognition::card_facts, grounding_invalidation (its WORKSPACE_MAP_DIRTY
registry) and cached_source. A pure fn behind a slot would only add a hop.

Two cognition tests that drive persona's verbs now install the slots first (step 7 moves
them with persona). Callers migrated: 54 files, 10 in continuum-core.

Measured on canary a3e496d (rebased after #5361): cognition_names_persona 109 -> 46;
every other ratchet unchanged. Tests: mind 2252, experience 92, memory 51, genome 380,
kernel 1252, core test_env 117 + the same 2 failures canary a3e496d has (fixed in the next
commit). Check: 0 errors, warnings 103 (= base).

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

* Mind split: the memory leaves move down, the last producer couplings invert (cognition names persona 46 -> 0)

Plan phase 2 (crates by the placement map). After Peels C and D the remaining production
lines in cognition naming persona were the engram family, the mind room and four
training-producer couplings. This clears them, so cognition can be cut into its own crate.

Moved DOWN (git renames, statics moved with their module): the closed leaf group
admission, admission_persistence, admission_state, attention, engram, engram_graph, home,
inbox_admission, mind_room, recall_metadata, trace, decay_tick. Persona's root re-exports
of their items are gone; callers name the new owner (77 files rewritten, 3 regrouped).
mind_room's two functions that open her sealed mind store through her airc runtime
(seal_continuation, sealed_continuation) stay up, in the new persona::mind_store; the pure
record id stays with the room.

Inverted:
- TurnCredit (cognition::act_observe): the settle hands a card-linked turn's acts to its
  credit owner through this trait; persona's TurnCreditCapture implements it. The live
  callers pass `as &mut dyn TurnCredit`.
- ReviewBoundaryLedger (cognition::dream_consolidation): the dream drives the resident's
  durable review-boundary ledger through it (+ BoundaryPage, moved down); persona's
  ReviewBoundaryStore implements it, and the production reflection source reaches the
  resident's ledger through a new slot, extensions::resident_review_boundaries (empty slot:
  probed, Ok(None), the nonpersistent answer).
- SPEECH_DISCIPLINE_TRAIT, RECEIVED_LESSON_SOURCE, SPEECH_DISCIPLINE_SOURCE and
  UNLINKED_SOURCES move down to cognition::training_sources (gym and held_out read them;
  the producer writes them).

home.rs's two intra-doc links into persona become prose (one named the deleted
portability module). loose_id_guard's engram rows follow the file.

Measured on canary a3e496d: cognition_names_persona 109 -> 0 (this commit 46 -> 0);
modules_in_cycles 28 -> 26; every other ratchet unchanged. Tests: mind 2252, experience 92,
memory 51, genome 380, kernel 1252, core test_env 119 (sum 4146 = base + the 2 guard rows
repaired in the previous commit). Check: 0 errors, warnings 103 (= base).

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

* continuum-cognition: a mind's thinking is its own crate, below persona (mind split steps 7 + 8)

Plan phase 2, crates by the placement map (MODULE-ARCHITECTURE.md section 9.2). Production
cognition names no persona module (cognition_names_persona = 0), so this is the cut, the way
continuum-experience was cut (#5342).

Pure moves: continuum-mind/src/cognition -> continuum-cognition/src/cognition (git renames).
Same depth, so the gym's include_str! paths and ts-rs export_to resolve unchanged. The crate
re-exports what its paths name (continuum_live::*, code, genome, memory, experience, recipe,
perception, rag), so every crate:: path inside it resolves; the mind re-exports
`pub use continuum_cognition::cognition`, so persona's and core's paths are unchanged.
build = "../continuum-core/build.rs" (handoff, captures and continuity stamp
CONTINUUM_BUILD_GIT_SHA). Features forward to the engine (metal/cuda/vulkan), stress-tests,
test-fixtures; the mind's forward to it.

Visibility crossing the new seam: 24 items persona names widened from pub(crate)/pub(super)
to pub (each one a compile error at the cut, nothing speculative), and 6 test-only helpers
persona's and core's tests use move from #[cfg(test)] to
#[cfg(any(test, feature = "test-fixtures"))] (WorkspaceCycle::run, the roster projection,
AdmissionState::push_for_test, BoundedRoomLedger::get).

Step 7, the cognition tests that drove persona, moved to where both crates are visible
(each asserts what it asserted before):
- bound_card_activity_is_shared_by_perception_and_execution -> core test_env
  mind_integration/bound_card_activity.rs; rehome_requires_a_readable_local_assignment ->
  mind_integration/remote_lane.rs. RecordingExecutor and ActThenSpeak join
  act_observe::test_support (test-fixtures) so they can.
- starved_priority_input_survives_until_dispatch_without_replaying_actions ->
  persona::wake_backlog (PendingInput custody is persona's);
  she_is_told_when_her_hands_move_and_only_then -> persona::card_hands.
- handoff's renewal test kept its cognition half; the failed-bind half is
  persona's a_failed_bind_keeps_the_bound_card_in_the_handoff (service_loop tests).

Wiring: workspace member; source-hygiene MODULE_CRATES (core's test_env guards read it);
the warnings ratchet's counted targets; core's test-fixtures dev-dep; CI: TESTED_CRATES,
the lib-test step's crate list, and the selector test (18/18).

Tests: cognition 1449, mind 802 (2251 = 2252 - 2 moved to core + 1 split out), experience
92, memory 51, genome 380, kernel 1252, core test_env 121 (+2 moved): 4147 = 4146 + 1.
Check: 0 errors, warnings 103 (= base). Ratchets: cognition_names_persona 109 -> 0,
modules_in_cycles 28 -> 26, the rest unchanged. Incremental (touch, M5, serving down):
cognition edit -> check cognition 2.5 s, -> check mind 4.3 s; persona edit -> check mind
1.9 s; cognition edit -> check core 79 s.

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

* ai_help: SUGGESTION_WINDOW declares itself a count, not a context size

Canary 77d61c7 (#5362) fails core's context-budget source guard on its own: the new
`SUGGESTION_WINDOW: usize = 6` matches the guard's name filter, but it counts command names
a lookup shows, not tokens of a window. The guard's documented marker
(`context-budget-exempt:`) says so; core test_env 120 + 1 failed -> 121 passed.

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant