Skip to content

Genome peel: genome names nothing in cognition or persona (9 files -> 0), ready for its crate - #5328

Merged
joelteply merged 2 commits into
canaryfrom
fable/genome-peel
Oct 23, 2026
Merged

joelteply merged 2 commits into
canaryfrom
fable/genome-peel

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

This step comes before cutting the continuum-genome crate (order-of-work line 1, the Dreaming/learning module; Cormac's area). Genome no longer names anything above it in production or test code.

What moved

  • Embedding: moved into the engine as ai::embedding, about 2,000 lines. It is a serving fact.
  • Provenance: moved into the engine as ai::provenance.
  • single_purpose_lane: moved into the engine as inference::single_purpose_lane.
  • GenomeRestore: moved up to cognition/workspace.
  • teach: split. Genome keeps synthesis over an adapter it is handed, using a narrow TeachTask. Lane-finding and eval-task conversion moved up to cognition/eval/teacher_synthesis.rs.
  • gym_grader: moved down into genome.
  • curriculum: moved up to cognition.
  • Content hash: content_hash_sha256 was inlined, and the ids it produces are unchanged.
  • Hygiene: head_cuts now also scans genome/, since the teacher's prompt is built there. The 16-byte digest prefix that forms a candidate id is marked as not being a head cut.

Measured

M5, 2026-10-23, serving down.

  • cargo check -p continuum-core --features metal,accelerate --tests --bins: 0 errors.
  • Tests:
    • engine: 1,202 passed. The embedding code and its tests moved in.
    • mind: 3,003 passed.
    • core teach/academy/genome subset: 97 passed.
    • source-hygiene: 47 passed.
  • No test was lost. One was added: a_mint_embeds_its_corpus_in_one_batch.
  • Ratchets against canary:
    • modules_in_cycles: 31 → 29
    • underived_bounds: 157 → 153
    • unjustified_unwraps: 2,035 → 2,033
    • head_cuts: unchanged

For Cormac
cognition::curriculum (RemediationSynthesizer, LivedExpansionSynthesizer) and synthesize_lived_expansion have no production caller. Keep them or delete them; your call.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply and others added 2 commits October 23, 2026 15:01
…s -> 0)

Prepares continuum-genome (order-of-work line 1, the Dreaming/learning module): genome
production and test code now names only itself and the engine/kernel, so a later cut can
place it below cognition and persona. Each reference went to its honest owner:

Facts moved down to the engine (ring 1), every caller migrated, no aliases:
- ai::embedding (was cognition::embedding): the EmbeddingProvider trait, cosine, the
  lexical/neural embedders, the cache and vector_math. It reads only ai, inference,
  model_registry and resources. The `wide` dependency moves with it; the engine gains
  rayon. CountingEmbedder becomes the one counting fixture (test-fixtures gated); the
  cache's batch test no longer mints a signature, and genome::signature gains its own
  "a mint embeds its corpus in one batch" test.
- ai::provenance (was cognition::provenance): GenerationReceipt/Outcome, the receipt of
  an ai/generate call; reads only ai::types.
- inference::single_purpose_lane (was cognition::single_purpose_lane): memory headroom,
  window and placement of a lane beside serving; items widen from pub(crate) to pub.

Owners inside the mind:
- genome::gym_grader (was cognition::gym_grader): grading lives on the learning side.
- genome::teach takes an adapter and a narrow TeachTask {id, prompt, test, lang}; lane
  acquisition and the eval-task projection move up to cognition::eval::teacher_synthesis
  (synthesize_remediation, synthesize_lived_expansion, teach_tasks), beside the eval lane
  owner. teachable_stimuli keeps the "no lane for nothing to answer" rule in one place.
- cognition::curriculum (was genome::curriculum): the salience -> curriculum seam reads
  cognition's experience vocabulary, so it lives with it.
- cognition::workspace::GenomeRestore (was genome::gene_trial): the guard pages the
  cycle's own genome; persona's two callers migrated.
- genome::candidate_source_store::stable_local_id hashes with sha2 directly instead of
  persona's hex content hash (same 16 bytes, ids unchanged).
- A job_board doc link to cognition becomes plain text.

Not compiled (the M5 is serving); Fable checks and tests in a serving-down window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…prefix id is not a head cut

Moving gym_grader under genome/ took its stderr cut out of the scan; genome builds prompts too,
so the rule now covers it and the count is honest (base and head both 185). The 16-byte digest
prefix that forms a candidate's id is marked head-cut-ok.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 2b038bc into canary Oct 23, 2026
4 checks passed
@joelteply
joelteply deleted the fable/genome-peel branch October 23, 2026 20:18
joelteply added a commit that referenced this pull request Oct 24, 2026
…n ~1 s) (#5340)

Plan phase 2, crates by the placement map (MODULE-ARCHITECTURE.md section 9.2,
the Dreaming/learning module). The genome peel (#5328) left genome naming
nothing above it; this is the cut.

Pure moves: continuum-mind/src/genome -> continuum-genome/src/genome (69 git
renames: 65 .rs, plus the CUDA trainer's three Python files and its
requirements, which include_str! reads from beside its adapters). The new
crate re-exports continuum_engine::* (genome reaches only engine and kernel
modules), so every crate:: path inside it resolves unchanged; the mind
re-exports `pub use continuum_genome::genome`, so its callers and core's
re-export keep their paths. No visibility widened, nothing newly gated: every
item the mind names was already pub.

Wiring:
- continuum-kernel is a direct dependency: the ORM derive resolves it by
  manifest name (RecallDecision).
- Features forward as in the mind: metal/cuda/vulkan to engine and kernel,
  stress-tests (the local manager's gated test) to the kernel, test-fixtures
  to base/kernel/engine plus the job board's optional tempfile. The mind's
  features forward to the genome. Dev-deps enable the lower layers'
  test-fixtures, so a plain `cargo test -p continuum-genome` builds.
- The mind drops deps only genome used (candle-core, candle-nn, axum, and its
  optional tempfile for the job board's test storage) and two it no longer
  used at all (rayon, safetensors).
- Workspace member; source-hygiene MODULE_CRATES; the warnings ratchet's
  counted targets; test_env CUT_CRATES (continuum-perception added too: #5331
  left it out, so core's source guards did not walk perception's files).
- CI: `cargo test -p continuum-genome --lib` beside the perception line; the
  CUDA trainer's Python unittest repointed to the new path.

Tests (M5, metal,test-fixtures): mind lib on canary 2,952 (410 under
genome::); now genome 410 (409 + 1 ignored) + mind 2,542 (2,533 + 9 ignored)
= 2,952. core test_env 120 -> 120. Ratchets vs origin/canary: every count
unchanged. Zero warnings under continuum-genome/src (lib, --tests,
test-fixtures, stress-tests) and continuum-mind/src.

Measured: incremental `cargo check -p continuum-genome --features metal`
after touching its lib.rs: 1.05-1.17 s (3 runs); a leaf genome file 1.03 s;
the mind on top of a genome change 5.5 s.


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