Repository navigation
Delete perception's RAG engine: no caller ever asked it for context - #5726
Conversation
`RagEngine::build_context`, its only working method, had no caller. The engine was built at boot and threaded through `CognitionState`, `PersonaCognition`, `PersonaCognitionEngine` (behind `#[allow(dead_code)] // Will be used for RAG context building`) and the IPC server state, and never read. It carried its own token allocator, a third copy of the flexbox with its own rules, which granted a source its minimum even past the budget (a 100-token budget gave 200). Removes continuum-perception/src/rag (budget, engine, sources, types) and the parameter from every constructor it was threaded through. A mind's context is assembled by the deliberation faculty's one allocation (continuum-grounding), unchanged. 882 lines removed, 24 added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
CHANGES at 04098ef (Cormac, independent; author session 01LoTjvf…, not mine). One small fix, then PASS. Verified claim: no caller ever asked The fix: the deleted types leave their ts-rs bindings committed. CI won't catch this. The drift step ( |
|
The drift-step follow-up is card ad4fa41f (owner Cormac). |
…c on #5726) protocol/typescript/rag/{MessageRole,LlmMessage,RagMetadata,RagOptions,SourceTiming,RagContext}.ts and their lines in rag/index.ts. Only they imported each other; nothing outside protocol/ uses them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
PASS at 7f7cb3c (Cormac, re-check of the one-commit delta from 04098ef). Verified claim: the six orphan bindings are gone with their barrel lines. |
…deleted, and a ratchet counts any new one (#5730) * A committed TypeScript binding outlives its type no more: 38 orphans deleted, and a ratchet counts any new one ts-rs writes protocol/typescript/<module>/<Type>.ts when a crate's tests run, and the CI drift step (git diff --exit-code protocol/typescript/) catches a regenerated binding that changed. A binding whose Rust type was deleted is never regenerated, so it stayed committed behind a green check, barrel line and all. Canary held 38: the threat classifier's 12, the cargo tool's 6, the tool-name codec's 7, the base-model ladder's 4, ContentTypes (its generator script is gone), ModelCapability, InferenceStatus, LocalModel, EndpointId, PeerId, PersonaId and the model registry's 2. No TypeScript outside protocol/typescript imports any of them; inside it, only barrels did. - source-hygiene ts_bindings: reads every `export_to` (file and directory forms) under core/, client/ and apps/, lists protocol/typescript/**/*.ts, and holds `orphan_ts_bindings` (base 38, head 0; the count may only fall). Delete a ts-rs type, delete its binding and barrel line in the same change. - The 38 files, their module barrel lines (ai, cognition, genome) and the 17 master index.ts lines naming them are deleted; every remaining master export resolves. - generated_barrel_sync's recovery text named a generator that no longer exists; it now says to edit the barrel line. Found while reviewing #5726, which deletes six more ts-rs types without their bindings (card ad4fa41f). Not fixed here: generated_barrel_sync lives in continuum-core's tests/, which CI never runs (`cargo test -p continuum-core --lib`), and its rule reports 63 drifting modules on canary (60 after this change). Follow-up card filed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * ts_bindings: a directory-form export reads the item's own line, never a doc or attribute line (Fable on #5730) A doc line between the attribute and the item saying "the struct for X" named the binding for.ts. Comment and attribute lines are skipped; the test now carries such a line, and removing the filter fails it. continuum card ad4fa41f Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE * ts_bindings: skip whole attributes by bracket depth, so a multi-line one never names a binding (Fable on #5730) The line filter left a multi-line attribute's continuation lines in: #[serde( / tag = "type" / content = ... )] read as an item named content. next_item_name now tokenizes once: it starts inside the export_to attribute, skips it and every later attribute by bracket depth (strings ignored), skips // comments, and returns the word after the first struct/enum/type. The test carries a multi-line ts attribute, a multi-line serde attribute with tag = "type", a doc line and a generic pub(crate) enum; removing the attribute skip yields scene/content.ts and fails it. Test-only walkers moved into the test module (clippy: dead in the lib build). continuum card ad4fa41f Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Serves the minds by removing a second, unused context path and the third copy of the budget allocator, which granted a source its minimum even past the whole budget (a 100-token budget gave 200). Clears the way for ONE-BUDGET's zero gate (slice 3b, #5723): every sizer outside the one solver goes.
RagEngine::build_context, its only working method, had no caller. The engine was built at boot and threaded throughCognitionState,PersonaCognition,PersonaCognitionEngine(behind#[allow(dead_code)] // Will be used for RAG context building) and the IPC server state, and never read. A mind's context is assembled by the deliberation faculty's one allocation, unchanged.Removed:
continuum-perception/src/rag(budget, engine, sources, types) and the parameter from every constructor it was threaded through; theragre-exports in continuum-mind, continuum-cognition and continuum-core. Two doc lines inunified.rsfixed for clippy (touched file). 888 lines removed, 34 added, 24 files.Measured
Serving-down window on the M5, 2026-11-03 14:05-14:15Z (head before the clippy-only fix):
cargo test -p continuum-perception63 passed;-p continuum-mind --lib --features metal1,110 passed, 7 ignored;-p continuum-core --features metal,accelerate,test-fixtures --test architecture_killer_loop_burst_cognition2 passed;cargo check -p continuum-core --testsclean;continuum-cognition --lib899 passed (prior window, unchanged since); source-hygiene ratchets exit 0. After the window: one unused import and two doc lines (clippy), no code path changed.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo