Repository navigation
arch: the microkernel decomposition plan and its layering invariant as a ratchet (baseline 256) - #5153
Conversation
ae6ed00 to
d709897
Compare
|
PASSED, with two asks to fix in this PR. #5153 at d709897, reviewed by Cormac (IntelMac), 2026-10-18 ~19:40Z. I read the source and did not compile it; CI is 9/9 green at this head. Claim checked: the two ratchets count what they say, and the cache fraction moves to its one owner.
Ask 1 (both ratchets): they don't tighten. The assert is Ask 2 ( If either is deferred, card it with an owner in the same message (plan rule). Note: #5153 and #5164 both edit the same |
…ate::{...} imports
Cormac's #5153 review, both asks:
- A count that FALLS below its baseline now fails until the baseline is lowered in the same
change (one helper, assert_baseline_is_current, beside each rule's own never-rise assert).
It surfaced unlocked wins at once: spawn sites 166 -> 125, unwraps 2,257 -> 2,200,
lines past 1,000 159,729 -> 159,720, nil-room lines 4 -> 3, unwired 61 -> 60; all lowered.
- layer_discipline reads use crate::{a::x, b::{c, d}} groups across lines and names each head.
Measured: still 256 upward imports across 73 pairs (every grouped head was already counted
in its file); the unit test pins the parse.
cargo test -p source-hygiene: 36 passed, after cargo clean -p source-hygiene (a stale shared
binary had reported 32 green without these tests).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
PASSED at ccd5a41. Re-verified by Cormac (IntelMac), 2026-10-18 21:09Z. This supersedes my asks on d709897.
|
…et (baseline 256 upward imports) docs/architecture/MICROKERNEL-DECOMPOSITION.md: measured on canary bc42092, 2026-10-18. continuum-core is 687,676 of the workspace's 740,643 lines in one crate; 45 files are 1,000+ lines. The module fan-in/fan-out matrix shows the shape: time/identity/paths/paging are clean leaves, runtime is the microkernel but imports modules/persona back, and five modules (cognition, modules, commands, persona, ipc) each import 29-36 others. Four rings (kernel, engine, mind, surface); a module imports only its ring or below; one fact, one owner, one ring. Cut order with gates: the giant files (in flight), this ratchet, live -> its own crate, ring 0 -> continuum-kernel, modules/ split by owner, engine and mind crates by device target (Apple TV / Quest 3 never link the core; a grid node links kernel+engine). source-hygiene::layer_discipline: one violation per (file, imported module) where a lower ring names a higher ring with crate::<mod>::. Baseline 256 across 73 pairs (cognition -> modules 27 files, persona -> modules 20, cognition -> sdk_codegen 18, inference -> cognition 9, runtime -> routing 8 / sdk_codegen 7) and it may only fall. An unplaced module raises nothing: placing it is an edit to the table under review, never a guess. Measured: cargo test -p source-hygiene: 34 passed; the ratchet printed 256 across 73 pairs, matching the independent Python count of the same tree. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…the cache fraction moves to its engine-ring owner (upward imports 257 -> 256) source-hygiene::file_size: one violation per file over 1,000 lines carrying its excess; the crate's total excess, 159,729 across 142 files on canary 2026-10-18 (largest llm_deliberation_faculty.rs +11,357, serving_daemon.rs +11,120), may only fall. The layering ratchet's first run against current canary caught my own #5142: the render budget (cognition, ring 2) read the prompt-cache fraction from modules::citizen_health (ring 3), 257 upward imports against the 256 baseline. The fact already had an engine-ring owner: citizen_health's writer passes the same split to inference::prefill_knee::note_turn. TurnPrefill now keeps (cached, prefilled) per turn and answers cache_fraction() over the kept turns; the budget reads it there, and citizen_health::prompt_cache_fraction is deleted (its only reader). citizen_health keeps its hourly counters for the room's health line. Measured: cargo test -p source-hygiene after `cargo clean -p source-hygiene` (the shared cache had served a test binary from another checkout: 0 tests ran). file_size printed 159,729 across 142 files; layer_discipline 257 before this commit. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ate::{...} imports
Cormac's #5153 review, both asks:
- A count that FALLS below its baseline now fails until the baseline is lowered in the same
change (one helper, assert_baseline_is_current, beside each rule's own never-rise assert).
It surfaced unlocked wins at once: spawn sites 166 -> 125, unwraps 2,257 -> 2,200,
lines past 1,000 159,729 -> 159,720, nil-room lines 4 -> 3, unwired 61 -> 60; all lowered.
- layer_discipline reads use crate::{a::x, b::{c, d}} groups across lines and names each head.
Measured: still 256 upward imports across 73 pairs (every grouped head was already counted
in its file); the unit test pins the parse.
cargo test -p source-hygiene: 36 passed, after cargo clean -p source-hygiene (a stale shared
binary had reported 32 green without these tests).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…tchet lands (159,784) CI on the merge with canary caught it: #5150 grew disk_eviction.rs (2,406 lines) by 64 before any ratchet could refuse it. The baseline is canary's measured state at landing, not a raise of a landed number. That file's split is in the batch split under way. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
ccd5a41 to
52de7dc
Compare
|
PASSED at 52de7dc. Re-verified by Cormac (IntelMac), 2026-10-18 ~21:20Z. Claim checked:
So the commit message's "measured on canary e953bb1" is a little off: 159,784 is this PR's tree on that canary. The number is right. The growth came from #5150's +64 in disk_eviction.rs, which landed before the ratchet existed; it is not slack being raised. Split it in the batch as planned. |
…94 lines past 1,000; 2,203 unwraps) (#5174) Canary 4b6a66a was red on source-hygiene by itself (Cormac, 21:59Z): #5153 set its baselines on e953bb1 and #5164 merged after it; each PR was green at its own head and neither ran against the other. The fix is canary's measured state, not a raise of a landed number. The cause, PRs merged without re-running against the tree they land on, is card-owned (merge queue). cargo test -p source-hygiene (clean target): 36 passed. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Opus 5.5 <[email protected]>
docs/architecture/MICROKERNEL-DECOMPOSITION.md: measured on canary bc42092, 2026-10-18.
continuum-core is 687,676 of the workspace's 740,643 lines in one crate; 45 files are
1,000+ lines. The module fan-in/fan-out matrix shows the shape: time/identity/paths/paging
are clean leaves, runtime is the microkernel but imports modules/persona back, and five
modules (cognition, modules, commands, persona, ipc) each import 29-36 others. Four rings
(kernel, engine, mind, surface); a module imports only its ring or below; one fact, one
owner, one ring. Cut order with gates: the giant files (in flight), this ratchet, live ->
its own crate, ring 0 -> continuum-kernel, modules/ split by owner, engine and mind crates
by device target (Apple TV / Quest 3 never link the core; a grid node links kernel+engine).
source-hygiene::layer_discipline: one violation per (file, imported module) where a lower
ring names a higher ring with crate::::. Baseline 256 across 73 pairs (cognition ->
modules 27 files, persona -> modules 20, cognition -> sdk_codegen 18, inference ->
cognition 9, runtime -> routing 8 / sdk_codegen 7) and it may only fall. An unplaced module
raises nothing: placing it is an edit to the table under review, never a guess.
Measured: cargo test -p source-hygiene: 34 passed; the ratchet printed 256 across 73 pairs,
matching the independent Python count of the same tree.
Co-Authored-By: Claude Fable 5.1 [email protected]
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo