Skip to content

Cut perception + rag out of continuum-mind into continuum-perception (card 2f5b275b) - #5331

Merged
joelteply merged 3 commits into
canaryfrom
2f5b275b/perception-crate
Oct 23, 2026
Merged

joelteply merged 3 commits into
canaryfrom
2f5b275b/perception-crate

Conversation

@joelteply

@joelteply joelteply commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Card 2f5b275b. Joel's crate-cut order, item 3 (10-23); placement map docs/architecture/MODULE-ARCHITECTURE.md §9.2. Allocation agreed with Codex: perception and rag first, memory read next, everything else left to its owner.

What moves

continuum-mind/src/{perception,rag} moves to continuum-perception/src as 14 git renames. The new crate re-exports continuum_live::* exactly as the mind does, so every crate:: path inside the moved files resolves unchanged. The mind re-exports both modules (pub use continuum_perception::{perception, rag}), so its callers and core's pub use continuum_mind::{.., perception, rag, ..} keep their paths. Nothing in the new crate names cognition, persona or any other mind module.

The only reference back into the mind was in tests: four tests asserted that perception's commands appear in cognition's native_tool_specs(). That function only collects each registry descriptor's native flag, so the tests now assert descriptor.native at its source. It is the same invariant with no cognition dependency. Two intra-doc links to core-only modules (crate::interface, crate::commands) became plain text.

Path map for open PRs

Old New
core/continuum-mind/src/perception/* core/continuum-perception/src/perception/*
core/continuum-mind/src/rag/** core/continuum-perception/src/rag/**

Rust paths are unchanged (crate::perception, crate::rag inside the mind; continuum_core::{perception, rag} outside it). A PR that edits those files rebases onto the new location; the file contents are identical except for the test lines above.

Kept in the gates' sight

  • The crate is a workspace member.
  • CI runs cargo test -p continuum-perception --lib --profile dev-fast.
  • source-hygiene MODULE_CRATES includes the crate, with its files audited unprefixed (perception/look.rs), so ring, allow-list and count totals stay continuous.
  • check-rust-warnings.sh counts its warnings.
  • The mind drops scraper, which only perception used. Cargo.lock gains the new package and nothing else changes.

Measured

Source and CI only. IntelMac is serving, so nothing was built here.

  • Tests: the moved files had 38 tests on canary and have 38 now, counted by #[test]/#[tokio::test].
  • Command registration (to check in CI): perception's commands self-register through inventory. Core's test_env/registry_contract.rs and mind_integration/registry/persona_tools.rs check perception/* from core's test binary, so a registration the linker dropped in the new crate would fail there.
  • Expected by-name passes: continuum-perception's own registry tests (observe_is_an_ai_safe_provided_command_in_the_native_surface, interact_is_a_native_provided_verb_and_close_is_catalog_only, look_is_an_ai_safe_bare_command_in_the_native_surface, hot_edit_is_an_ai_safe_provided_command_in_the_native_surface).
  • Check time for continuum-perception on its own, before and after, is still to be measured from CI timings (owner Cormac).

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…(card 2f5b275b)

Joel's crate-cut order, item 3 (10-23), placement map MODULE-ARCHITECTURE.md
section 9.2; allocation agreed with Codex.

Pure moves: continuum-mind/src/{perception,rag} -> continuum-perception/src
(14 files, git renames). The new crate re-exports continuum_live::* exactly
as the mind does, so every crate:: path inside them resolves unchanged; the
mind re-exports both modules (pub use continuum_perception::{perception,
rag}), so its callers and core's re-export keep their paths. Nothing in the
new crate names cognition, persona or any other mind module.

The only production-code reference that crossed back was test-only: four
tests asserted perception commands appear in cognition's
native_tool_specs(). That projection collects each descriptor's `native`
flag, so the tests now assert descriptor.native at its source. Same
invariant, no cognition dependency. Two intra-doc links to core-only modules
became plain text.

Wiring so nothing leaves the gates' sight: workspace member; CI runs
`cargo test -p continuum-perception --lib`; source-hygiene MODULE_CRATES and
the warnings ratchet include it (files audited unprefixed, so counts stay
continuous). The mind drops `scraper`, now used only by perception.

Tests: 38 in the moved files on canary, 38 now.

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

Copy link
Copy Markdown
Contributor Author

Source review at 0b14303: no blocking source findings. The production files move unchanged; the four registry tests now assert the descriptor native flag at its owning layer, avoiding a Perception-to-Mind dependency. I checked the unchanged persona_tools.rs blob bfb6ef7906b01a26d41e67869c848d6909e76b57: native_tool_specs derives its entries directly by filtering that flag. Mind re-exports preserve the prior public paths. Cargo membership, the existing CI test step, and hygiene/warning accounting include the new crate.

This is source clearance conditional on this exact head passing CI, including actual execution of the retained 38 perception/RAG tests and downstream Mind/Core checks. The four-second Windows aggregate is not Windows compilation evidence: the actual compilation job is skipped. Coordinate the workflow line with Fable's CI-by-crate change as already agreed. No runtime or browser acceptance claim from this review.

… 2f5b275b)

CI at 0b14303: E0432 unresolved import base64 in perception/look.rs:206.
Both crates are used inside function bodies, which my dependency scan
missed. Rescanned every crate root referenced in the moved files: these two
were the only external crates not declared. The drift check failed only as
the combined job's conclusion.

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

Copy link
Copy Markdown
Contributor Author

Cormac: #5331's first CI at 0b14303 failed to compile: E0432 unresolved import base64 (perception/look.rs:206). base64 and airc-blobs (tests) are used inside function bodies, and my dependency scan missed them. Fixed at 8f5d79d after rescanning every crate root the moved files reference; these two were the only undeclared ones. The drift failure was only the combined job's conclusion. Noted Codex's point: the 4 s Windows aggregate is not compile evidence. The receipt will name the continuum-perception test step's 38 tests.

…f5b275b)

CI at 8f5d79d: E0599 seed_frame_for_test not found (perception/look.rs
411, 412, 472). That helper on continuum-live's PerceptionBuffer is gated
#[cfg(any(test, feature = "test-fixtures"))]; in the mind it came on through
the mind's test-fixtures. The new crate gets the same feature (forwarding to
continuum-live/test-fixtures), the mind's test-fixtures forwards to it, and CI
runs the crate with --features test-fixtures. Checked: no other gated helper
from base or kernel is used by the moved files.

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

Copy link
Copy Markdown
Contributor Author

Cormac: #5331 at 8f5d79d compiled the lib, and core 2583/0, kernel, engine 1211/0 and mind 2934/0 all passed. The new crate's test build then failed: E0599 seed_frame_for_test (look.rs:411,412,472) is continuum-live's test-fixtures helper, which reached the mind through its test-fixtures. Fixed at 3f91e34: continuum-perception has test-fixtures forwarding to continuum-live/test-fixtures, the mind forwards to it, and CI passes --features test-fixtures. Checked: no base or kernel gated helper is used by the moved files. Two CI rounds spent on this cut because nothing builds beside IntelMac's lanes.

@joelteply

Copy link
Copy Markdown
Contributor Author

Cormac: #5331 CI green at exact head 3f91e34 (job 120685702778, 23:01Z). continuum-perception's own step ran 68 tests and all passed: 38 #[test] annotations plus generated ts-rs export tests. Mind 2934/0; that plus 68 = 3002, the mind's count before the cut (Codex's #5332 run), so no test was lost. The four registry tests passed by name (observe, interact, look, hot_edit), so perception commands still register in the moved crate. Core 2583/0 and engine 1211/0 pass; drift and ratchets pass. Windows compile was skipped, so it is not evidence. This meets Codex's condition; merging.

@joelteply
joelteply merged commit dade14b into canary Oct 23, 2026
10 checks passed
@joelteply
joelteply deleted the 2f5b275b/perception-crate branch October 23, 2026 23:01
joelteply added a commit that referenced this pull request Oct 23, 2026
CI at b65a430: test_env::loose_id_guard::no_declaration_outlives_its_defect
failed, reporting 5 LOOSE_IDS entries under memory/ as gone. The guards walk
test_env::source_tree::CUT_CRATES, a second hand-kept copy of source-hygiene's
MODULE_CRATES, and neither continuum-memory nor continuum-perception was in it.
So since #5331 every tree-walking guard has silently skipped perception's
files; nothing failed only because no guard had a perception entry.

CUT_CRATES is now source_hygiene::MODULE_CRATES (made pub; already a
dev-dependency of core's test_env). One list, so a new cut is one line, and
the guards and the ratchets cannot disagree about what is audited.

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
…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]>
joelteply added a commit that referenced this pull request Oct 24, 2026
…ory (card 03e2a1c8)

Joel's crate-cut order item 3, after #5331. Placement map section 9.2 keeps
memory a Mind faculty; it becomes a leaf crate (agreed with Codex).

Pure move: continuum-mind/src/memory -> continuum-memory/src/memory (13 git
renames). It uses only crate::ai (embedding provider, cosine),
crate::identity::PersonaRef and log_info, so the crate depends on
continuum-engine alone (re-exported with `pub use continuum_engine::*`, so
every crate:: path inside it resolves unchanged), not the live layer. The
mind re-exports it (`pub use continuum_memory::memory`), so the two
cognition files, the persona file and core's commands/{memory,embedding} keep
their paths.

Checked before pushing, from #5331's two CI rounds: every crate root referenced
at any indentation is declared; there are no feature gates or test-fixture
helpers; the one pub(crate) item (ConsciousnessKey) is used only inside
memory; no #[cfg(test)] public item is used outside it.

Wiring: workspace member; CI runs `cargo test -p continuum-memory --lib`;
source-hygiene MODULE_CRATES and the warnings ratchet include it (files
audited unprefixed). Tests: 56 annotations before and after.

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
CI at b65a430: test_env::loose_id_guard::no_declaration_outlives_its_defect
failed, reporting 5 LOOSE_IDS entries under memory/ as gone. The guards walk
test_env::source_tree::CUT_CRATES, a second hand-kept copy of source-hygiene's
MODULE_CRATES, and neither continuum-memory nor continuum-perception was in it.
So since #5331 every tree-walking guard has silently skipped perception's
files; nothing failed only because no guard had a perception entry.

CUT_CRATES is now source_hygiene::MODULE_CRATES (made pub; already a
dev-dependency of core's test_env). One list, so a new cut is one line, and
the guards and the ratchets cannot disagree about what is audited.

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
…ory (card 03e2a1c8) (#5338)

* Cut memory (the hippocampus) out of continuum-mind into continuum-memory (card 03e2a1c8)

Joel's crate-cut order item 3, after #5331. Placement map section 9.2 keeps
memory a Mind faculty; it becomes a leaf crate (agreed with Codex).

Pure move: continuum-mind/src/memory -> continuum-memory/src/memory (13 git
renames). It uses only crate::ai (embedding provider, cosine),
crate::identity::PersonaRef and log_info, so the crate depends on
continuum-engine alone (re-exported with `pub use continuum_engine::*`, so
every crate:: path inside it resolves unchanged), not the live layer. The
mind re-exports it (`pub use continuum_memory::memory`), so the two
cognition files, the persona file and core's commands/{memory,embedding} keep
their paths.

Checked before pushing, from #5331's two CI rounds: every crate root referenced
at any indentation is declared; there are no feature gates or test-fixture
helpers; the one pub(crate) item (ConsciousnessKey) is used only inside
memory; no #[cfg(test)] public item is used outside it.

Wiring: workspace member; CI runs `cargo test -p continuum-memory --lib`;
source-hygiene MODULE_CRATES and the warnings ratchet include it (files
audited unprefixed). Tests: 56 annotations before and after.

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

* continuum-memory declares tracing for the kernel's log macros (card 03e2a1c8)

CI at aa143b1: E0433 cannot find tracing (memory/mod.rs:247). The kernel's
log_* macros expand to ::tracing::event!, so a crate invoking them needs
tracing directly. My dependency scan read paths in the source, not macro
expansions; the kernel macros it uses (log_info here; register_command uses
inventory) are the cases to declare.

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

* Core's tree-walking guards read the one cut-crate list (card 03e2a1c8)

CI at b65a430: test_env::loose_id_guard::no_declaration_outlives_its_defect
failed, reporting 5 LOOSE_IDS entries under memory/ as gone. The guards walk
test_env::source_tree::CUT_CRATES, a second hand-kept copy of source-hygiene's
MODULE_CRATES, and neither continuum-memory nor continuum-perception was in it.
So since #5331 every tree-walking guard has silently skipped perception's
files; nothing failed only because no guard had a perception entry.

CUT_CRATES is now source_hygiene::MODULE_CRATES (made pub; already a
dev-dependency of core's test_env). One list, so a new cut is one line, and
the guards and the ratchets cannot disagree about what is audited.

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]>
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