Repository navigation
Every remaining Rust file over 1,000 lines split into child modules (pure moves) - #5228
Conversation
…t column zero production_half stopped at the first #[cfg(test)] anywhere, so an indented test-only helper inside an impl ended "production" for the rest of the file. In cognition/llm_deliberation_faculty.rs that hid ~9,000 production lines from every ratchet except derived_bounds, which already cut at column zero for this reason (it carried its own copy of the split). Found 2026-10-20 when deleting one such helper surfaced 4 hidden unwraps. One split for every rule, at column zero; derived_bounds' private copy is deleted. Baselines re-measured to what was always there (not new debt): unwraps 2,119 -> 2,274, serialization 234 -> 245, spawn sites 123 -> 128, hand-built homes 72 -> 79. source-hygiene 39/39. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
A cut that keeps the start of text drops what happened last (the newest message, result, outcome), so she acts as if time never moved and loops (Joel, 2026-10-20); and one source shrinking itself by its own number breaks the budget for everything else. The rule counts, on prompt paths (cognition, persona, rag, modules, airc, positron): head keepers (chars().take, head_to_tokens, truncate_chars, lines().next()), literal take/truncate/[..N], and literal .min/.clamp ceilings beside a size word (plain arithmetic such as backoff exponents is not flagged). A cut that never reaches a prompt says `head-cut-ok: <why>`. Measured 179 on this branch; the count may only fall. source-hygiene 41/41. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…cannot move it A per-file count read +7 on #5224, which only moves test modules into sibling files: the same `use crate::modules::x` counted once per file it now sits in. A line is the coupling site; a pure move leaves it unchanged. The baseline is re-measured under the new unit in the next commit, from this tree's CI run. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…e per-line unit CI on canary a854548 + this branch: boundary serialization 246, spawn sites 127, unjustified unwraps 2,279 (the split now sees production code that an indented #[cfg(test)] helper hid), upward imports 674 lines across 73 pairs (the unit changed from files to lines). No code changed between the two counts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…st of the file The cut stopped at the first column-zero #[cfg(test)], which is the end of production only when the test mod is the file's last item. It is not in many files: ipc/mod.rs has ~3,400 production lines (start_server) after its test mod; commands/benchmark.rs has production between three test mods; persona_tools.rs and positron_source.rs gate a helper fn near the top. Found on #5225, where llamacpp_adapter.rs declared 'mod tests;' at line 93 of 934 and the split read as 10 unwraps removed when none were. The gated item's extent is read as one character stream (string escapes and continuations, raw strings, char literals vs lifetimes, comments), because test fixtures carry braces in multi-line strings. Audited on canary: of 1,249 gates, 1,248 close where rustfmt closes them; the one other is a #[cfg(test)] inside the generator's raw-string template, where the new cut keeps more real code. Regression test: only_the_gated_item_is_test_code_never_the_rest_of_the_file. Baselines re-measured on canary a854548 + this change (no code changed): unwraps 2,279 -> 2,377, homes 79 -> 103, spawns 127 -> 132, head cuts 179 -> 188, serialization 246 -> 251, underived bounds 159 -> 164, unwired 60 -> 61. Each is code that was always production and was never scanned. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
New rule (Joel, 2026-10-20): no one edits a file over 1,000 lines. 76 of the 145 Rust files over 1,000 lines were over only because their inline #[cfg(test)] mod tests sat inside them. This moves that module, byte for byte (no re-indent, so string literals are untouched), to `<stem>/tests.rs`; the parent keeps `#[cfg(test)] mod tests;`. A child module keeps `use super::*` access, so nothing else changes. Moved: 69 files (66 continuum-core, 3 continuum-cli-lifecycle). Skipped: 11 being split on other branches, crate roots (main/lib/mod/bin), and 1 file with items after its test mod. One include_str! path is one level deeper (prebuilt_artifact tests). Verified: #[test]/#[tokio::test] attributes 8,320 before and after; continuum-core lib tests compile; continuum-cli-lifecycle 79 pass with the same 1 failure canary has (card 250ce9c8). Still over 1,000 after this and left to the split work: modules/forge.rs (1,003), and the tests files of cognition/recall_faculty (1,245) and commands/training_trigger/submit (1,332). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Without the inner attribute the hygiene scanner read the 69 moved tests.rs files as production (the file_engine split showed unwraps rising 150). The repo's existing convention for a test module in its own file. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…, owned by its module Two source-reading guards failed on #5224 because a test module moved into a sibling tests.rs read as production: experience/tests.rs became a second caller of record_lived_turn, service_module/tests.rs a registration of PersonaServiceModule. Each guard carried its own copy of the walk and the comment strip, so each would have needed its own fix. source_tree (cfg(test)) is the one reader: crate_sources(), and per file is_test_file(), production() and owner() (x/tests.rs belongs to x.rs). Migrated: the module-wiring audit (keys references by owner), the lived-turn caller count (production only), the loose-id scan, the GPU base check and the context-constant scan. Five private walks deleted. The swe env-root guard keeps its copy until the sweep splits swe_bench.rs (5,946 lines; no edits over 1,000). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…sures lib.rs declaring two cfg(test) modules counted as a second test mod (19 -> 20), so the source reader nests under test_env, the crate's test environment. CI on this branch: lines past the readable size 154,999 -> 136,485, unwired public machinery 60 -> 58. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… test Retracts the previous commit's reason for 60 -> 58. That drop was a miscount, not a win: the rule reads a type as wired when its name appears outside its own file, test code included, so moving a test module into a sibling tests.rs made two types constructed only in their own tests read as externally used, the exact AgentContext (#27) shape this rule exists to catch. SourceFile::owning_module() names the module a file's code belongs to (x for x.rs, x/mod.rs, and a #![cfg(test)] x/tests.rs or x/tests/part_N.rs); the rule's own-mentions now include the moved tests of the same module. Baseline back to 60; regression test a_type_constructed_only_in_its_moved_tests_is_still_reported. 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]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…4 -> 934) Pure move. construction.rs: inherent builders + ensure_loaded (+Default); payload.rs: sampling/media decode; tests.rs: tests mod. Tests 12 passed/1 ignored before and after. Two tracing::warn! gain an explicit target so log targets are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Pure move. sanitize.rs: think-block/leaked-markup stripping; tests.rs: tests mod. Tests 19 passed before and after. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Pure move. progress.rs: watch cell/ledger/bus milestones; status.rs: genome/teach-status; tests.rs. Public paths kept via re-exports. Tests 15 passed before and after. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Pure move. tools.rs: tool-call parsing and tool implementations. Tests 5 passed before and after. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Pure move of the tests mod. Tests 44 passed before and after. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Pure move of the tests mod. Tests 12 passed before and after. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Pure move of the tests mod. Tests 23 passed before and after. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Pure move of the tests mod. Tests 15 passed before and after. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…d on this head) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…moves) Lines past 1000: 153,027 -> 58,046 (files over 1000: ~140 -> 18). Test attributes 8,320 = base. Workspace tests vs base: 9,573/43 vs 9,568/48; the 8 sweep-only failures were source-reading tests (fixed: loose-id declarations moved with their fields, the guard sees widened fields, three include paths). Ratchets: at or below canary's true counts once the column-zero scanner fix lands; upward-imports (per-file count) and derived-bounds (+3) still to reconcile. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
The sixth private source walk, deferred in #5224 while swe_bench.rs was 5,946 lines; the sweep split it, so the guard now uses the shared reader. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…is head The split widens a moved constant to pub(in crate::path), which neither derived_bounds' prefix list nor the context-constant guard recognized, so NARRATION_BUDGET left the scan the day it moved. Both now strip any visibility. Measured on this head: lines past the readable size 133,731 -> 57,268; excess test mods 19 -> 15 (multi-mod suites became nested themes in one test file); unwired 61 -> 57, which is NOT a win: four types read as wired only because their constructor moved to a sibling chunk (named at the baseline, card 7660e70f). Unjustified unwraps, upward imports, spawns, homes, serialization, head cuts and underived bounds are unchanged: the sweep moves code, it changes none. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
275a6bd to
024c9c7
Compare
… zero new warnings The splitter gave every child a 'pub use child::*' in its parent. Where the child's items are crate- or module-scoped that re-export was too wide (56 'glob import doesn't reexport' warnings) or reached nothing (51 unused). Each glob now carries the visibility its items have (pub(crate), the module's own pub(in ...), or private), and the ones nothing resolves through are removed, compiler-checked after each pass. run_harness/Harness are crate-scoped (their only caller is grade.rs) instead of widening a chain of private types. Built on the M5 in a build window (serving down), cargo test --lib --no-run with --features metal,accelerate: 0 warnings that the base (#5225 head) does not have; 63 total vs the base's 72 (9 old unused imports went with them). The CI baseline is set to 66 on the inference that CI's Linux build carries the same 3 cfg-only warnings it did at the base (75 vs 72); CI prints the exact number. cargo test -p continuum-core --lib (metal, M5): 9,002 passed, 2 failed: - the lived-turn guard named settle.rs; the driver now sits in settle/, so the guard accepts the settle module (fixed here, passes). - config_env read_all_on_a_missing_file: a stale temp file from an earlier run on this machine (card 4c820b46); passes on fresh CI runners. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ives Removed as unused on the macOS build; the Windows build needs it for parse_tasklist_image_name (CI: Windows core compilation, E0425). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… change) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…viour change) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Scoped source PASS at f20d06a for the deduplicated trigger InboxMessage constructor. Compared both old constructors in a854548 service_loop.rs against backlog_resync.rs:25 and its call sites (backlog_resync.rs:215, turn_context.rs:53): all fields preserved, including fresh UUID per construction, transport-selected turn_room, sender identity/name, rendered media content, admission-time timestamp, priority and optional fields. Loop-filler still admits before returning Continue; admitted retries still bypass re-admission and preserve their wake engram. This is not a full sweep approval or endorsement of pre-existing fallback policy. No tests/builds run locally; host-spawn review is separate and pending. |
|
Scoped independent SOURCE PASS for persona-host spawn at f20d06a against a854548. persona_hosting.rs:258-271 creates the oneshot and subscribes synchronously before spawn. persona_host_reconciler.rs:21-32 awaits the same wired Arc before pull/provider/spawn work. start_server.rs:196-218 initializes/verifies runtime and installs module executors before command_executor.rs sends readiness. Early boot error drops sender and the waiting task returns. Independent comparison matched 1329 executable tokens after inlining the extracted pull helper, aside from equivalent escaped-newline string indentation. No introduced lifecycle/custody/error-path defect found in this seam. Detached reconciler/pull handles and warning-only initialization failures predate the split; this does not establish supervision improvements. Default tracing/probe targets move from ipc to child modules while classes/messages remain. No local build or live validation; this is not full-sweep approval. Together with comment6304690331, both requested hand-edited seams now have scoped source verdicts. |
|
Scoped source review at f20d06a, base a854548: lifecycle test extraction passes source equivalence for launchd, prebuilt_artifact and supervisor_install. The three production parents are byte-equivalent after replacing the final inline test module with its external declaration. launchd and supervisor_install test bodies are unchanged (11 and 10 test attributes). prebuilt_artifact preserves its nine tests with exactly one necessary change: the core-binaries.yml include moves from ../../../ to ../../../../ for the extra directory. Parent cfg(test), child cfg(test), and logical module names remain intact. No subprocess --exact/current_exe/module_path selectors were found in these three extracted bodies. This supports modular cleanup while preserving installer behavior; it is not a runtime speed measurement. Receipt: 5228-cli-test-equivalence-20261021-0109.json plus inspected include path delta. No builds/tests executed here. Maintenance subtree and the rest of this PR are excluded from this verdict; inherited scanner concerns remain separate. |
PR5228 serving-plan extraction — independent source reviewHead: f20d06a VerdictScoped SOURCE PASS. No confirmed semantic regression found in this slice. This does not approve the remaining PR5228 sweep or certify CI/live behavior. Evidence
Read relevant AGENTS.md/CLAUDE.md, existing concurrency guidance, and pinned SERVING-OBSERVATION-AND-DEMAND.md / ADMISSION-IS-UNOBSERVABLE.md. The extraction advances modularity while preserving the existing planner/scheduler seam. No performance, residency, or learning claim is made. |
PR5228 adapter-only source reviewHead: f20d06a Scoped verdictNo introduced adapter-selection/model/native-binding logic defect found. NOT an approval of the whole sweep. One observable diagnostics change prevents claiming a completely behavior-identical move unless explicitly accepted or preserved:
Source equivalence evidenceConcatenated inference_device.rs + adapter_selection_error.rs + tests.rs, retaining source order. Line comparison after trimming indentation/blank lines and normalizing ONLY pub(super) additions, use super::* and inner cfg(test) gives exact equality to the original body except root imports/docs retained in adapter.rs, the removed test-module wrapper, and five obsolete ArcAdapterShim commentary lines. All 70 function declarations preserved; four #[test] and two #[tokio::test] attributes preserved. This checks actual source, not merely test counts. No formatting-normalization of strings or changed branches was needed. Six explicit visibility widenings remain confined to the adapter parent: capability-builder inner field; registry adapters and priority_order fields; registration_key, get_shared, select_shared helpers. Public types/trait/functions are reexported through the original ai::adapter path via private child modules. AdapterSelectionError retains its single NoEligibleProductionAdapter variant, fields, derives, Display text and Error impl. Selection remains byte-for-byte equivalent after extraction: no-specifier refusal; named-provider lookup honoring supplied model supports_model; unavailable named provider refuses rather than selecting another; registry-driven cloud branch; device-filtered priority scan; select_arc clones the selected Arc without relooking up the provider identifier. Duplicate-provider/model-selection and retained-lease fixture remains intact. No persona identity/binding rewrite was added. Existing limitations are not fixed or endorsed: InferenceDevice::Auto accepts every device in the selector despite its GPU-only documentation; named providers bypass device filtering; local is a routing category rather than an immutable model identity; cloud routing precedes generic local selection. These predate this head. Equivalent selection is not proof that every upstream caller supplies a native model binding. Tests remain at ai::adapter::tests via #[cfg(test)] mod tests; extracted tests.rs has #![cfg(test)] and the original six test names. Source discovery appears preserved; no compiler/test run performed. No deployed-performance or learning claim. Responsibility naming observation (non-blocking for this bounded review): adapter_selection_error.rs owns most AdapterRegistry behavior, while the error enum lives in inference_device.rs. Names do not describe the extracted ownership cleanly; source move is verified but a coherent naming cleanup would improve reviewability. |
Applies the source-approved replacement from #5227 comment 6304136412 (Astra independent review) against bcbab21, unchanged: - a #[cfg(test)] item that starts on the attribute's own line is blanked, with source line numbers preserved; - item termination stays correct for static initializers and method continuations; - one nested block-comment scanner is shared (duplicate removed); - pub(in ...) and other restricted const visibilities are recognized by derived_bounds. Measured on this tree: cargo test -p source-hygiene, 42 passed. Every ratchet sits exactly at its existing baseline, so no baseline was edited. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…lit-eight-near-limit-files
…lit-every-oversized-file # Conflicts: # core/source-hygiene/src/derived_bounds.rs
|
Codex review at exact head ebcba4e: REQUEST CHANGES for one concrete guard regression. [P2] Reuse the corrected production projection in the new shared test reader. core/continuum-core/src/test_env/source_tree.rs:58 uses take_while(|l| !l.starts_with("#[cfg(test)]")), dropping all source after the first test-gated item. The migrated lived-turn caller guard in cognition/experience/tests.rs:698 now uses this projection. Previously that guard scanned all non-comment source outside experience.rs, so an additional production record_lived_turn call after a test helper was detected; now it is invisible. For example, a separate source file containing a cfg(test)-gated helper followed by The fix is small and shared: core already has source-hygiene as a dev-dependency. Reuse its reviewed production_half projection instead of maintaining a second truncation rule, preserving moved-test exclusion/comment handling. Add a fixture with a gated helper or module followed by production and exercise the caller guard against a second caller there. #5227 is now cleared at 6ac1a84. All eight #5228 checks are verified green, but do not exercise this counterexample. Existing scoped source passes (trigger constructor, host readiness, serving_plan, adapter and lifecycle test extractions) remain valid: the delta from reviewed f20d06a to this head contains only the scanner integration. Full mechanical sweep coverage is still being checked; this finding is independently reproduced by source review. No local compilation, merge or deployment. |
…versized-file # Conflicts: # core/source-hygiene/src/head_cuts.rs # core/source-hygiene/src/production_reachability.rs # core/source-hygiene/src/unwrap_justification.rs
…a cut at the first cfg(test) Codex on #5228 (REQUEST CHANGES, comment 6307538140): the shared test reader ended production at the first column-zero #[cfg(test)], so production below a mid-file test mod or gated helper was invisible to the lived-turn exactly-one- caller guard, which the old private scan did see. That is the same hole production_half already closed for the ratchets (#5227). - production() delegates to source_hygiene::production_half (existing dev-dependency); only the gated items are removed. - code_only delegates to source_hygiene::split_code_and_comment, the one string-aware comment rule, instead of a second cruder copy. - Regression test: a function below a mid-file test mod stays production, and the gated item does not. Uncompiled locally (serving node); CI runs the guard tests. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Reviewed exact head 7bcdb2b, specifically the source_tree correction. The reported P2 is resolved in source: production() delegates to source_hygiene::production_half rather than truncating at the first cfg(test); the regression explicitly retains a production caller after a mid-file test module and excludes the gated caller. code_only also reuses split_code_and_comment, preserving string literals. This clears my specific source-projection finding. CI is still required; this is not a blanket approval of the entire sweep or a deployment receipt. |
…s #![cfg(test)] Independent whole-PR review of 7bcdb2b (REQUEST CHANGES, P2): the splitter carried code faithfully but dropped about 506 lines of free-standing `//` comments between items, plus trailing comments on const lines. Examples are the MAX_LANES history in serving_plan.rs, the evidence-ledger rules in benchmark.rs and the parser format examples. - 186 blocks (596 lines) restored by script. Each is placed before the line that followed it in canary, matched on the next three lines with visibility normalised; indentation follows the new nesting. - Three trailing const comments restored: `// 2 GiB`, `// 1 hour`, `// 0=Normal`. - Seven blocks placed by hand: section banners, the ipc handler pointer, the vector-params note, test-module banners and the model-family parser banner. - Not restored, on purpose: comments on test code that the shared source_tree reader replaced (experience.rs code_only, device_probe.rs). The persona-loop provenance and wake-engram notes were already carried, as rewrites, in turn_cycle.rs and turn_context.rs. - The diff adds comment lines only, apart from the three trailing comments on existing lines; no code changes. - launch_gate/windows/tests.rs now starts with #![cfg(test)] (review finding 3). source-hygiene 43/43, no count moved. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ing comments keep one space Review of ad6dc73: the last block the split dropped (canary benchmark.rs:3930-3940). The three restored trailing comments now use one space before //, as canary had. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Independent whole-PR review (the reviewer did not author the sweep): PASS at b4db6ed. Claims verified:
Earlier: REQUEST CHANGES at 7bcdb2b (dropped comments), then one remaining block at ad6dc73; both are resolved. |
…ast run left behind (#5242) Card 4c820b46. tmp_config numbered paths with a per-process counter that restarts at 0, so continuum-config-env-test-0/config.env from an earlier run was read back: read_all_on_a_missing_file_is_empty_not_a_panic failed locally (M5, 2026-10-21, cargo test on #5228 7bcdb2b: 9004 passed, this 1 failed) while CI's clean runners passed. tempfile::Builder gives an empty, unique dir. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Opus 5.5 <[email protected]>
Rebuilt as canary plus this PR's own commits (cherry-picked with -x). The old branch carried #5227/#5228's pre-squash history. Each changed count is traced to its cause in the comment beside it. cargo test -p source-hygiene passes 43/43 on a fresh per-worktree build. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Rebuilt as canary plus this PR's own commits (cherry-picked with -x). The old branch carried #5227/#5228's pre-squash history. Each changed count is traced to its cause in the comment beside it. cargo test -p source-hygiene passes 43/43 on a fresh per-worktree build. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Rebuilt as canary plus this PR's own commits (cherry-picked with -x). The old branch carried #5227/#5228's pre-squash history. Each changed count is traced to its cause in the comment beside it. cargo test -p source-hygiene passes 43/43 on a fresh per-worktree build. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Rebuilt as canary plus this PR's own commits (cherry-picked with -x). The old branch carried #5227/#5228's pre-squash history. Each changed count is traced to its cause in the comment beside it. cargo test -p source-hygiene passes 43/43 on a fresh per-worktree build. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Every Rust file over 1,000 lines that no other PR owns, split into child modules: pure moves, scripted (the splitter that also produced #5225's shape), so the new rule ("no one edits a file over 1,000 lines", gate in #5221) can bind.
Stacked: #5227 → #5224 → #5225 → this. Review the last two commits; everything below them is those PRs.
What moved
wc -l): canary a854548 has 144 holding 303,020 lines; this head has 17 holding 74,396 (listed below). This PR and the two it stacks on (69 oversized files: each test module moves to a sibling tests.rs #5224, Eight files over 1,000 lines split by owner (pure moves) #5225) take it from 144 to 17; six of the 17 are already split on owner branches (below).use super::*; the parentpub use child::*. Visibility widened only where a moved item is now in a sibling (private→pub(super), an existingpub(super)→pub(in crate::<parent>)). Relative paths:super::→super::super::, include paths gain one../per level. Test modules over 950 lines go totests/mod.rs+part_N.rs, each#![cfg(test)].ipc/mod.rsandmodules/grid/handlers.rswere re-split from canary's current text on the restack (canary changed them after the first split).Fixed in the same change (sweep-only failures)
identity/mod.rsloose-id detector strips anypub(...), and 12LooseIddeclarations name the file each field now lives in.test_env::source_tree(the shared reader from 69 oversized files: each test module moves to a sibling tests.rs #5224).Not in this PR (each split on its own branch, PRs to follow)
llm_deliberation_faculty.rs(being rebuilt on canary, replaces #5226),file_engine.rs,working_memory.rs,openai_adapter.rs,dream_consolidation.rs,resource_admission.rs.Still over 1,000 with no split yet, each a single giant item to decompose by hand:
ipc/start_server.rs(3,388),bin/continuum.rs(9,811),serving_daemon.rsandllama_server.rs(Codex's lane),act_observe/mod.rs,launch_gate.rs,serve_persona_loop_inner.rs,voice_module.rs,models.rs,templates.rs,benchmark_dispatch.rs.Verification
CI only: no compile on the M5 while it serves.
cargo test -p continuum-core --liband the source-hygiene ratchets on this exact head. The first sweep build (before the restack) compiled; its test failures matched base except 8, which are the fixes above. Not yet re-run on this head.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Independent whole-PR review (2026-10-21)
The reviewer did not author the sweep. 7bcdb2b got REQUEST CHANGES: the splitter dropped about 506 comment lines. After the fixes in ad6dc73 and b4db6ed, the 37 dropped lines still absent are accounted for:
test_env/source_treereplaced (experience.rs,device_probe.rs), and} // end mod stressmarkers.service_loop.rs. Thewake_engramnote was rewritten atserve_persona_loop_inner.rs:274.turn_admissionhits are scanner false positives; that text is inturn_admission/tests.rs.The fix commits add comment lines only, plus
#![cfg(test)]onlaunch_gate/windows/tests.rs.Verified by the reviewer:
await_wakeselect arms.recipe/validate.rsandno_cpu_fallback_contract.rsstill read the code they guard.Accepted P3s, disclosed:
clog_*sites. The label comes frommodule_path!()'s last segment, so moved code logs under the child module's name. Chunked modules show up ascall_manager_2anddata_state_2. Log files andEnvFiltertargets are unchanged because both match by prefix.production_reachability61 → 57 is lost detection, not progress. BenchRound, EmbeddingCache, NeuralEmbeddingProvider and CommandRegistration are still only constructed inside their former file. The split made that look like outside use. Card 7660e70f owns it.