Repository navigation
Modules ask their context for storage: six DataModule downcasts become one accessor (card 39f08cda) - #5448
Conversation
…e one accessor (card 39f08cda)
Step 4 of the continuum-dreaming cut (card 2a69e6ba); plan phase 5 (a repeated shape moves down to
one owner). ports, genome, pressure_broker_module, gene_examiner, training_trigger and recipe each
found the registry's `data` module and downcast it to DataModule just to resolve an adapter, so none
of them could leave the core.
- kernel runtime::StorageProvider: named adapters resolved on demand (`adapter("main")`).
- ServiceModule::as_storage() -> Option<Arc<dyn StorageProvider>>, default None; DataModule returns
its DataState, whose impl is the same get_adapter (same resolution, same cache: one backing).
- ModuleContext::storage(who) binds to it with no I/O and refuses, naming the caller, when there is
no data module or it offers no storage. The two modules that resolve later (the broker's "@node"
disk ownership, the trigger's retried ensure_storage) keep their bind-before-I/O timing.
- LateBound<T> and its Debug impl accept ?Sized, so the trigger holds LateBound<dyn StorageProvider>.
No fallback, no new database, no concrete type named upward. +44 / -53 in production code.
Test storage_binds_the_owners_provider_or_refuses_by_name: no data module and a silent one refuse by
name; an unresolved adapter stays an error; every bind is the owner's one provider. Ran locally:
cargo test -p continuum-kernel --lib runtime:: 313 passed at -j 2 (102 s, IntelMac).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
|
Source and selected CI PASS at 74e29c4. StorageProvider delegates directly to the existing DataState::get_adapter; the six consumers retain their handles and async adapter-resolution points. ModuleContext binds the capability synchronously without introducing readiness I/O, including pressure_broker and training_trigger retry behavior. Missing data/capability remains an error. LateBound supports unsized providers without changing initialization semantics. Kernel fixtures cover missing capability, shared provider identity, and propagated adapter errors. They do not independently establish adapter-cache identity across all six consumers; the unchanged delegation supplies that source evidence. All selected checks now green (run 40274102084); native Windows lifecycle jobs were skipped. This clears this seam for owner integration, not deployment or live learning recovery. |
…rving trait (card dc3e9f6f) (#5449) Step 3 of the continuum-dreaming cut (card 2a69e6ba). GenomeTeach and GenomeModule held LateBound<ServingDaemonModule> to call one operation, run_teacher_batch, so neither could leave the core. - continuum-academy (beside synthesize_remediation and EvalTask) defines TeacherServing and owns TeacherBatchRequest. - The serving daemon implements it through ServingTeacher(Arc<ServingDaemonModule>), since the batch takes the daemon by Arc; boot installs that. - GenomeTeach and GenomeModule hold LateBound<dyn TeacherServing> (LateBound accepts ?Sized since #5448). An uninstalled owner still refuses an exclusive_teacher run. Behaviour unchanged. +20 / -15 plus the trait file. CI compiles it (the academy builds the engine, whose vendored llama.cpp this worktree does not carry). Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
…commands (card 2a69e6ba)
Plan phase 2 (Joel: "crates are still gigantic"; a domain's service and its commands are one
crate). Dreaming (MODULE-ARCHITECTURE section 9.2) moves out of continuum-core into a new crate
above continuum-mind:
- modules: training_trigger (+ durable/), genome, dataset (+ dataset/), gene_examiner,
genome_fitness_sentinel
- commands: training_trigger, genome (+ teach, job_*), genome_recall, genome_share, dataset
Pure move: 57 renames (56 byte-identical; genome_share.rs differs by one doc link that named core's
forge). continuum-core re-exports every moved module at its old path
(modules::{...}, commands::{...}), so no caller changes. The crate re-exports continuum_mind::* so
the moved code's crate:: paths resolve, and commands::hf re-exports the academy's (genome_share's
search). Core forwards metal/cuda/vulkan/stress-tests/test-fixtures to it.
The core ties were cut first, each its own PR: #5445 (owner trust via the executor), #5446
(serving_pool_kind to the engine), #5448 (ModuleContext::storage), #5449 (TeacherServing), #5451
(recall replay trust), #5452 (hf to the academy), #5453 (citizen dir to the persona crate), #5454
(genome/push stays with core's forge). Remaining crate:: references to core-only modules: none.
Tests: 144 #[test]/#[tokio::test] in the moved files at canary d8ee2b3, 144 after. No core code
uses a moved #[cfg(test)] helper, and no file include_str!s across the seam.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…commands (card 2a69e6ba) (#5456) * continuum-dreaming: the genome domain leaves continuum-core with its commands (card 2a69e6ba) Plan phase 2 (Joel: "crates are still gigantic"; a domain's service and its commands are one crate). Dreaming (MODULE-ARCHITECTURE section 9.2) moves out of continuum-core into a new crate above continuum-mind: - modules: training_trigger (+ durable/), genome, dataset (+ dataset/), gene_examiner, genome_fitness_sentinel - commands: training_trigger, genome (+ teach, job_*), genome_recall, genome_share, dataset Pure move: 57 renames (56 byte-identical; genome_share.rs differs by one doc link that named core's forge). continuum-core re-exports every moved module at its old path (modules::{...}, commands::{...}), so no caller changes. The crate re-exports continuum_mind::* so the moved code's crate:: paths resolve, and commands::hf re-exports the academy's (genome_share's search). Core forwards metal/cuda/vulkan/stress-tests/test-fixtures to it. The core ties were cut first, each its own PR: #5445 (owner trust via the executor), #5446 (serving_pool_kind to the engine), #5448 (ModuleContext::storage), #5449 (TeacherServing), #5451 (recall replay trust), #5452 (hf to the academy), #5453 (citizen dir to the persona crate), #5454 (genome/push stays with core's forge). Remaining crate:: references to core-only modules: none. Tests: 144 #[test]/#[tokio::test] in the moved files at canary d8ee2b3, 144 after. No core code uses a moved #[cfg(test)] helper, and no file include_str!s across the seam. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * continuum-dreaming builds with core's build script and its 144 tests run in CI (CI and Codex on #5456) - The moved teach bridge stamps env!("CONTINUUM_BUILD_GIT_SHA"); the crate now uses build = "../continuum-core/build.rs", core's script being that identity's one owner, as cognition does. - The CI selector lists continuum-dreaming in TESTED_CRATES (test-fixtures) and the generic crate-test step's allowlist, so its moved tests run instead of being selected into nothing. The selector tests expect it wherever a change selects the mind it builds on. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * Core calls five continuum-dreaming items across the new crate seam: they are pub (CI on #5456) lesson_tasks (benchmark_import), GridPeerAdapter and on_grid and GenomeModule::with_teacher_serving (ai_genome_modules boot), GenomeModule::trains_base_here (grid_capacity). They were pub(crate) while both sides lived in core; no signature names a private type. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * GenomeModule::lease_executor is pub: core's boot hands it to GridPeerAdapter::on_grid (CI on #5456) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * continuum-dreaming stays audited: it joins MODULE_CRATES and the warning ratchet's crate list (CI and Codex on #5456) loose_id_guard::no_declaration_outlives_its_defect failed because modules/dataset/dataset_manifest.rs (room_id, a declared loose id) left the tree core's guards walk. MODULE_CRATES is the one list those guards and every source-hygiene ratchet read ('a new cut is one line here'); the crate keeps core's module paths, so the declaration lines up again rather than being erased. The rustc warning ratchet counts continuum-dreaming too, so the moved files' warnings stay counted. Receipt (local, IntelMac, -j 2): cargo test -p source-hygiene 55/55; ratchets vs origin/canary 36200cb: every count identical (unjustified_unwraps 1977 -> 1977, upward_imports 33 -> 33, lines_over 269 -> 269, ...). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * ARTIFACT_CHUNK_FRAME_BUDGET lives in lease.rs's tests, the only reader (warning ratchet on #5456) In core's lib-test build the test counted as its use; as a non-test dependency of core the crate-level const was dead_code, lifting the warning count to 14 against the baseline 13. It is the test's bound on a full chunk's encoded size, so it moves into the tests module; MAX_ARTIFACT_CHUNK's doc still states the frame and envelope budget. 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]>
Why (card 39f08cda, step 4 of continuum-dreaming 2a69e6ba; plan phases 2 and 5)
Joel: "crates are still gigantic." Six core modules each found the registry's
datamodule and downcast it to the concreteDataModulejust to resolve an adapter:ports.rs:46,genome.rs:146,pressure_broker_module.rs:137,gene_examiner.rs:38,training_trigger.rs:890andrecipe.rs:50. Naming that concrete type ties each of them to core. A shape repeated across modules moves down to one owner (plan phase 5), and Codex assigned this to me, with constraints.Change
continuum_kernel::runtime::StorageProvider: named adapters resolved on demand,adapter(handle).ServiceModule::as_storage()defaults toNone.DataModulereturns itsDataState, whose impl is the sameget_adapter: same resolution, same per-backend cache, so every caller shares one backing.ModuleContext::storage(who)binds with no I/O. It refuses, naming the caller, when there's nodatamodule or it offers no storage, as each caller's own message did."main"at init, as before."@node"disk ownership (a transient failure is retried by its tick).ensure_storage.LateBound<T>(and itsDebug) accept?Sized, so the trigger holdsLateBound<dyn StorageProvider>.There's no fallback, no new database, and no concrete type named upward. +44 / −53 in production code; no non-test
downcast_ref::<…DataModule>remains.Tested
storage_binds_the_owners_provider_or_refuses_by_name:datamodule refuses ("ports requires the data module");Arc::ptr_eq).-j 2:cargo test -p continuum-kernel --lib runtime::, 313 passed (102 s, IntelMac). CI compiles core.🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE