Skip to content

The kernel depends on nothing above it: 77 blocking references to 0 (stacked on #5273) - #5276

Closed
joelteply wants to merge 144 commits into
canaryfrom
fable/peel-kernel-runtime
Closed

joelteply wants to merge 144 commits into
canaryfrom
fable/peel-kernel-runtime

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What

The kernel is ring 0 plus routing (dispatch) and sdk_codegen (the command contract), 68,048 lines. Its production code now references nothing above it. That is the precondition for cutting it out as continuum-kernel.

How: the microkernel shape (the kernel owns the contract, owners extend it at boot)

  • Dispatch hooks (runtime/dispatch_hook.rs). Hands admission and per-card work accounting were named in the dispatcher. They are now hooks that code::hands and persona::cognition_pulse implement and boot installs.
    • The hook list is process-wide, so none of the dozen places that build an executor can miss Hands admission.
    • It uses parking_lot, so there is no lock poisoning to recover from.
  • Extension slots (runtime/extensions.rs):
    • a command-name resolver, which cognition's tool dialect fills;
    • settle-before-stop participants: admitted turns settle and report their own probe.
  • MeshPresence: the module census reads "can host personas" through a two-method trait that airc::AircDiscovery implements.
  • Already-existing extension points, implementations moved to their owners:
    • CommandInterceptor: the airc interceptor moves to inference/airc_remote, the grid interceptor to modules/grid.
    • ClogSink: tracing takes the sink as a parameter at boot.
  • Files in the wrong ring, moved:
    • the command ingress adapter → ipc/command_ingress;
    • grid access decision and trust policy → modules/grid;
    • SubstrateGovernor → persona;
    • manifest-backed commands → modules/ext_commands/manifest;
    • the VDD projection → vdd.
  • Values moved down: HandsContext → identity; the STREAM_KIND_PREFILL wire constant → the airc command protocol.
  • Machine facts (cheaper agent, commit 885ebe3):
    • drives → system_resources/drives; confinement → system_resources;
    • throughput lease and class types → resources; paths::continuum_root;
    • fd relief and the org-room voice are registered at boot;
    • capacity moves to the engine ring.

No re-export aliases were left; every caller was migrated.

Measured (local, M5)

  • The blocking-reference measure (production code; script in the session): 77 lines across 21 module pairs → 0.
  • cargo check -p continuum-core --tests --bins: clean.
  • cargo test -p continuum-core --lib: 8541 passed, 0 failed.
  • Ratchets against fable/integration, all hold or fall: upward_imports 464 → 395 (rings updated: routing and sdk_codegen are now kernel, capacity is now engine); hand_built_homes 87 → 86.

Left before the cut itself

  • Test-only upward references inside kernel files: 41 lines across 24 pairs. 8 of them are test_env, which becomes a dev-only crate. The rest are integration-style tests that move up to the layer they exercise.
  • modules_in_cycles stays at 36 until those move, because the scan reads whole files.

Next

  1. Move the 41 test lines.
  2. Create core/continuum-kernel with the 15 modules.
  3. Point continuum-core at it.
  4. Measure check time per crate, before and after.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

joelteply and others added 30 commits October 18, 2026 13:54
…duction

The unwrap scanner split only on the outer #[cfg(test)], so files whose first
code line is #![cfg(test)] (orm/derive_test.rs, contracts/chain_tests.rs) were
counted as production unwraps. Match the inner attribute too.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
orm/: 71 unwrap/expect before, 0 after (28 production, 43 in derive_test.rs which
is #![cfg(test)] and now correctly excluded). contracts/: its 21 were all in
chain_tests.rs (#![cfg(test)]), cleared by the same scanner fix.
- 28 poisoned std lock unwrap/expect -> unwrap_or_else(PoisonError::into_inner)
  with same-line reason (entity registry, migration state, sqlite connections)
- 0 became ?/typed error, 0 let-else, 0 structural: lock poisoning here has a
  correct meaning (the data is the last state) and needs no new error path

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…duction

The unwrap scanner split only on the outer #[cfg(test)], so files whose first
code line is #![cfg(test)] (orm/derive_test.rs, contracts/chain_tests.rs) were
counted as production unwraps. Match the inner attribute too.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…duction

The unwrap scanner split only on the outer #[cfg(test)], so files whose first
code line is #![cfg(test)] (orm/derive_test.rs, contracts/chain_tests.rs) were
counted as production unwraps. Match the inner attribute too.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…duction

The unwrap scanner split only on the outer #[cfg(test)], so files whose first
code line is #![cfg(test)] (orm/derive_test.rs, contracts/chain_tests.rs) were
counted as production unwraps. Match the inner attribute too.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
live/: 57 unwrap/expect before, 0 unjustified after (baseline 2257 -> 2076, includes the shared scanner fix commit for file-level #![cfg(test)]).
- 43 poisoned std Mutex/RwLock unwraps -> PoisonError::into_inner with same-line reason (bridge client, slot pool, avatar selection, bevy api, wgpu bridge)
- 14 structural / typed: STT/TTS/avatar registries now return the OnceCell value from init_registry (no get-after-init expect); Silero from_shape_fn (no shape error possible); avatar selection `if let Some(picked) = min_by_key` (no is_empty+unwrap); render-loop and Bevy thread spawn failures are logged, release the slot / mark not-ready and return None; bridge envelope let-else Err; GLB frame_len from a 4-byte array; call_server test-pattern source returns Option when the call lock is busy; capture.rs returns .next(); Metal missing class returns the existing null-texture path; wgpu missing pipeline logs and skips the dispatch
Tests: cargo test -p continuum-core --lib live:: = 398 passed, 9 ignored; source-hygiene unwrap_justification = pass, count 2076.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
modules/: 55 unwrap/expect before, 0 unjustified after (baseline 2257 -> 2078, includes the shared scanner fix commit for file-level #![cfg(test)]).
- 32 were in two files that only compile under cargo test (plasticity/validation.rs behind #[cfg(test)] mod; airc_runtime_e2e_tests.rs whose mod is commented out): now marked #![cfg(test)], counted as test code
- 2 poisoned lock unwraps -> PoisonError::into_inner with reason
- 5 justified in place (3 constant regex literals, resolve_continuum_root + SentinelModule::new need HOME or the process has no persistent state; resolve_continuum_root has 20+ callers in persona/ cognition/ ipc/, so its signature is left for a coordinated change)
- 16 structural/typed: embedding SIMD uses slice::as_chunks::<8>() (no try_into); generator name/ live.rs/ grid handlers let-else or if-let; AIProviderModule logger falls back to the component logger (std OnceLock::get_or_init) instead of panicking before initialize; DMR/ds4 probe addresses built as SocketAddr literals; nav serialize failure logged; plasticity compactor builds one Vec of tensors (no HashMap re-lookup) and serialize_tensors propagates TensorView errors with ?; sentinel checkpoint dir returns Result (all callers already Result); vdd module artifact_root is Option and the module exposes no commands (logged) when there is no home
Tests: cargo test -p continuum-core --lib modules:: = 1107 passed, 1 ignored; source-hygiene unwrap_justification = pass, count 2078.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
code/, commands/, concurrency/, context/, experience/, forge/, genome/, http/, ipc/, logging/, media/, memory/, model_registry/, paging/, perception/, resources/, routing/, runtime/, sdk_codegen/, system_resources/, vdd/ (every directory with fewer than 10, grouped into one PR): 59 unwrap/expect before, 0 unjustified after (baseline 2257 -> 2078, includes the shared scanner fix commit).
- 24 poisoned lock unwraps -> PoisonError::into_inner with reason
- 11 justified in place (embedded-recipe and constant-regex literals, codegen-time schema checks, a never-closed private Semaphore, citizen_home_path whose Agent-needs-provider contract has 23 callers incl. persona/ owned by another branch)
- 24 structural/typed: logging::logger() is now a GlobalLogger handle that falls back to the direct log sink (no panic before init_logger); SharedCompute::get_or_compute returns Option (a type clash was a process panic; MediaFrame maps it to a typed Err); OpenAIFineTuningAdapter::new and ArtifactWriter/TurnReplay continuum_default return Result (callers in ipc/ and the vdd bin handle it); http/messages_handler builds errors via one api_error() and no longer unwraps response build/serialize; shell_session kills the child and records a Failed state if pipes are missing; models/pull, lora_convert, command ident, help, placement, model_registry singleton, consolidation timestamp, presence/nav serialize, static_html title, module_logger (no HOME => no log file), resource broker (lease collision => Superseded refusal, available_parallelism => 1 CPU) all use let-else / ? / structural forms; sysctl key is a C-string literal
Tests: cargo test -p continuum-core --lib (code, commands, concurrency, context, experience, forge, genome, http, ipc, logging, media, memory, model_registry, paging, perception, resources, routing, runtime, sdk_codegen, system_resources, vdd) = 3341 passed, 7 ignored; source-hygiene unwrap_justification = pass, count 2078. Added test: SharedCompute type clash is None, not a panic.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…duction

The unwrap scanner split only on the outer #[cfg(test)], so files whose first
code line is #![cfg(test)] (orm/derive_test.rs, contracts/chain_tests.rs) were
counted as production unwraps. Match the inner attribute too.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ech/continuum into fable/no-unwraps-outside-the-mind

# Conflicts:
#	core/source-hygiene/src/unwrap_justification.rs
…anTech/continuum into fable/no-unwraps-outside-the-mind

# Conflicts:
#	core/source-hygiene/src/unwrap_justification.rs
…ech/continuum into fable/no-unwraps-outside-the-mind

# Conflicts:
#	core/source-hygiene/src/unwrap_justification.rs
… calls it)

The batch's GlobalLogger replaced the panicking logger() with an always-usable handle but carried
debug/info/error only; tests/logger_integration.rs calls warn and stopped compiling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…it needs

The shell admits its cargo root through the disk ownership registry. These tests only
passed in the full suite because an earlier test happened to install the test registry;
run filtered (cargo test -- hands_isolation) three failed with 'Cargo writer has no
installed disk ownership registry'. The shared call() helper now installs it (idempotent).

Measured on the M5 2026-10-19: before 3 failed / 6; after 6 passed / 6, filtered run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…it size the window let it grow to

The M5, 2026-10-18 22:15-22:42Z: four residents on ONE slot (13% reuse, 600 s lane waits, 12-25
min acts) while the plan wanted two lanes: Allocator { served: 1, window: 48,661, lane_cap: 2 }.
The need was the median post-fit size of held turns; the flexbox grows every prompt into the
window it is given, so on a 102k lane the need read ~48.6k and a second lane at ~46k was refused.
The need tracked the window, and the window the need.

window_allocator::turn_need sums the turn's budget claims' FLOORS (framing + tools, required
input, grounding floor, her last move and its outcome, the reply floor): what she cannot do
without. The allocator still grows each lane toward the wish; it now serves two lanes when memory
holds two windows above that floor (Joel: two residents per lane, never smaller windows to seat
more). The faculty calls it once and nets -1 line.

Tests: window_allocator, llm_deliberation_faculty and working_set suites: 158 passed, 0 failed
(M5, background QoS).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…5177)

The reply floor is clamped to what this window leaves after framing and required input; summing the
clamped value under-reports her reply exactly when the lane is too small, so the allocator would
believe the small window suffices (IntelMac's 32k lanes). The need now adds the pre-clamp floor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…c5b0b6)

SqliteEpochWatermark opened its own rusqlite connection with its own DDL,
pragmas and raw SELECT/UPSERT/DELETE. It is replaced by OrmEpochWatermark
behind the unchanged EpochWatermarkStore trait: one GrantEpochWatermark
entity row per grantee (primary key = the grantee's PeerId), check-and-advance
and eviction under one in-process lock (the ORM has no compare-and-swap),
eviction as one atomic batch delete, and epochs above 2^53 refused (fail
closed) because a Number column is a double on Postgres.

- SqliteAdapter::open(path): the one way a store that owns its own file gets
  an adapter; admission_state (production) and seven test setups migrated off
  their hand-built AdapterConfig blocks.
- OrmStore::delete_all(ids): atomic multi-row delete through commit().
- act_observe's staged-credit test reads her longterm.db through
  OrmStore<StagedCredit>/<StagedCreditGeneration> instead of raw SELECTs.
- The watermark's concurrency test runs by default (64 interleaved high/low
  epochs, then a reopen) instead of only under stress-tests.

rg 'rusqlite::|sqlx::' core/continuum-core/src outside orm/: nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ck is load-bearing

No anti-replay reset on deploy (coordinator review of #5205). The one-time
import lives in orm/legacy_grant_watermark.rs (SQL stays inside the ORM):
on OrmEpochWatermark::open, if the legacy grant_epoch_watermark table exists
in the same file, every (grantee, epoch, updated_at_ms) row is upserted into
grant_epoch_watermarks keeping the HIGHER epoch (and later updated_at_ms),
then the legacy table is dropped, all in ONE transaction. A row that cannot
be carried exactly (grantee not a UUID, epoch not an integer, negative, or
above 2^53) aborts and rolls back the import and the open is REFUSED with
WatermarkError::LegacyImport(LegacyWatermarkImportError::CorruptRow); the
store never starts empty over real state. Probe "grant.watermark.migrated"
records the row count. WatermarkError is now a typed enum.

Tests (legacy fixture uses the deleted SqliteEpochWatermark's exact DDL):
- legacy_watermark_is_carried_forward_and_its_table_dropped: carried epochs
  survive, a replay below them is Superseded, the higher of ORM vs legacy
  wins, the legacy table is gone, a second open imports nothing.
- a_corrupt_legacy_watermark_refuses_the_open: non-UUID grantee, negative
  epoch, text epoch each refuse the open and leave the legacy table intact.

Concurrency test strengthened and mutation-proven: a barrier releases all
128 presentations at once over two grantees, one seeded (find-then-UPDATE:
a missing lock shows as a lost update) and one fresh (find-then-INSERT: a
missing lock shows as a duplicate-key failure). With the lock released
before the read (`self.store.lock().await.clone()`), the test failed 30/30
runs on the M5 (29 "lost update: the max epoch 64 is not the durable
watermark", 1 "concurrent decisions failed: UNIQUE constraint failed").
With the lock restored: 0/30 failures.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…celled caller can drop

Codex's review of #5205 at 1e0a8c7: the async mutex guard lived in the
caller's future while SqliteAdapter ran the write on spawn_blocking, so a
cancelled presentation released the lock with its write still pending; a
newer presentation could then read the stale watermark and the orphaned
lower write could land after it. Same for eviction's select-then-delete.

The fix is an ORM-owned atomic primitive on StorageAdapter, so the compare
happens inside the write:
- upsert_monotonic(record, field): INSERT ... ON CONFLICT(id) DO UPDATE ...
  WHERE stored.field <= new.field, one statement, returns whether written.
- delete_matching(query): one DELETE whose filter is judged when it runs.
Implemented for SQLite (orm/sqlite/conditional.rs) and Postgres
(orm/postgres/conditional.rs), exposed as OrmStore::save_monotonic /
OrmStore::delete_matching. OrmEpochWatermark drops its Mutex entirely, which
also closes the over(adapter) gap (two stores over one adapter shared no
lock; now there is none to share).

Hygiene and owners:
- The row's insert shape (BaseEntity columns + data fields) is built once
  per adapter (conditional::insert_columns) and do_create/create_on use it;
  SqliteAdapter::open + writer() moved to orm/sqlite/file.rs. sqlite.rs
  1741 -> 1729, postgres.rs 2435 -> 2421.
- OrmStore::delete_all removed (superseded); OrmStore::find_eq added and the
  act_observe staged-credit test compressed (2509 -> 2497).
- Postgres ensure_schema built an index name from the schema-qualified table
  (`idx_ns.table_col`, a syntax error in any non-public namespace); it now
  uses the bare table name.

Tests:
- Regressions through a new cfg(test) GatedAdapter (orm/gated_adapter.rs:
  writes run detached like spawn_blocking; the next one can be held):
  a_cancelled_presentation_cannot_land_a_lower_epoch_later and
  a_cancelled_eviction_cannot_erase_a_grantee_advanced_after_it. Both FAILED
  on the previous code (lower epoch 7 landed over accepted 10; the eviction
  erased a grantee advanced after it selected) and pass now.
- pg_upsert_monotonic_never_lowers_and_delete_matching_judges_current_rows
  (ignored; CI runs orm::postgres --ignored): passed with all 11 existing
  Postgres tests against a local scratch database.
- Mutation: with the WHERE dropped from the SQLite upsert, the cancellation
  regression and the concurrency test each failed 30/30 runs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…d unwraps 2,137 -> 2,135

#5205 grew orm/sqlite.rs and act_observe/mod.rs past canary (+22 lines past
1000). The row insert shape, SqliteAdapter::open and the conditional writes
now live in orm/sqlite/{file,conditional}.rs and orm/postgres/conditional.rs,
and the act_observe test reads through OrmStore::find_eq; net -54 against
canary. The GatedAdapter test fixture is a `#![cfg(test)]` file so orm/mod.rs
keeps one test mod; its expects and the conditional writer's join fallback
carry same-line justifications. Both baselines lowered to the measured values.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…n, co-authored)

Consolidates PERSONA-CONTEXT-PAGING, KV-CACHE-ECONOMY, KV-CACHE-AS-SHARED-BASE-LAYER
and CONTEXT-IS-A-CAPABILITY-AXIS into two faults and one owner each: an epoch-
versioned materialization of an append-only history (Codex's correction 1), and one
EngineConfig derived from what the engine reports. Design only; nothing built.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply and others added 24 commits October 22, 2026 05:38
…ependency cycle

#5203 made every site call ai::token_estimate, which put rag (via rag/sources/identity.rs
-> ai) into the core's dependency cycle (modules_in_cycles 36 -> 37 on the integration).
The estimate is a pure 13-line function every layer needs: it moves to the floor crate,
all 18 callers migrate, the ai copy is deleted. modules_in_cycles back to 36.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
HARNESS_DIRS included benchmarks/swe/verdicts, so the first boot renamed every
verdict and .ungradeable.json env refusal into the archive. The grader still
reads that dir: card_holder::standing_refusal_for_card keeps an instance this
box cannot grade off the board, and benchmark_import skips resolved ones. After
the archive, every unrunnable instance became claimable again. The dir moves
when outcomes move into rooms, not here; the test now pins that it stays live.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
ratchet.rs pointed developers at tools/scripts/source-hygiene-ratchets.sh, which
is not in the tree. Both places now name the binary CI runs:
cargo run -p source-hygiene --bin ratchets -- origin/canary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…nary, said in the log (Cormac on #5267)

On push the base was github.event.before, which is all zeros for a new branch
and unreachable after a force push, so the ratchet run errored with nothing to
explain it. An absent or unreachable base now uses origin/canary (the checkout
is fetch-depth 0, so the ref is present) and emits a ::notice:: naming why.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
perception.rs gave an act with retained bytes and no handle its ledger line as
its pointer, so a turnover collapsed it to a line nothing could reopen, a clip
goal 7 forbids. Such an act's pointer is now its whole result: the view can keep
it or not, never cut it to an unreachable stub. Regression:
an_unsaved_result_never_collapses_to_a_line_nothing_reopens.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
… left out (Cormac on #5255)

A turnover can collapse older conversation turns out of her view (pointer None;
kept_in_full keeps a newest-end run). The room's history still holds them, but
the [context] fact only said 'this request may retain only part of that
history', with no path back. It now names chat/history, so every turn she was
told about stays reachable. The view's suffix design is unchanged.

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

line_heads read only crate::<ident> one line at a time, so a crate::{...}
group (empty ident, skipped; and invisible across lines) and a super:: chain
that climbs to the crate root added no edge. Undercounting only lowers the
number: a new cycle written that way passed, and a peel could lower the count
by rewriting an import. Now the whole file's code is scanned (comment lines
still skipped); a group yields each top-level path's first identifier; a
super:: chain resolved against the file's module depth yields the identifier
after it when it reaches the root. Both trees are measured by these rules, so
the ratchet compares like with like. Test:
every_spelling_of_a_root_path_is_an_edge. Not compiled here (serving node).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…te stopped the lib test job before its tests ran

The ratchet fails on a fall the branch doesn't record ('warnings fell to 40 below
the baseline 44', run 39775185949 job 119812354437). Recording 40 locks the win
and lets CI actually run the lib tests at this head.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…ts wire constant stays in the kernel

CommandRequestHandler (the one ingress ws, positron and airc all call) reached into ai
streaming and cognition admission; an ingress adapter is surface, not the dispatch
kernel. routing/command_handler -> ipc/command_ingress with its tests; STREAM_KIND_PREFILL
is wire protocol and moves into routing::airc_command_protocol, so the engine reads it
from the kernel. Callers migrated (ipc, persona, inference, five integration tests).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ting to modules/grid

Both read grid trust levels, the served model and serving footprints: grid policy, not
dispatch. routing/access_decision -> modules/grid/access_decision, routing/grid_trust_policy
-> modules/grid/trust_policy (re-exported from modules::grid as their one public home);
18 callers and one integration test migrated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ontext is an identity value

- install_probe_tracing takes the ClogSink (main passes the logger module's sink), so the
  kernel's tracing install names only the contract it already had.
- HandsContext/ContextKind (a Copy id + kind that CallerIdentity carries) move from code::hands
  to identity::hands_context; admission, leases and process custody stay with the hands.
  20 files migrated, no re-export.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… kernel keeps the interceptor contract

CommandInterceptor and its boot-time installation (with_interceptor) already were the
extension point; only the implementations sat in runtime. AircInterceptor ->
inference/airc_remote/interceptor (remote inference), GridInterceptor ->
modules/grid/interceptor. Callers and the engine-OS layering test's runtime-submodule
list updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…lease, throughput lease vocabulary move down; fd relief and org-room voice register at boot; capacity re-ringed to engine

system_resources -> capacity/modules/airc/code/inference, resources -> inference and paging -> inference all reach zero in cut_measure; continuum_root gains its one owner in paths.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…at boot

The dispatcher named code::hands (admission for the command's life) and
persona::cognition_pulse (per-card work accounting) directly. runtime/dispatch_hook is the
kernel contract (enter may refuse before the gate; a scope sees allowed/succeeded and wraps
the command's future); HandsAdmission and CardWorkPulse implement it where they live, and
start_server::install_dispatch_hooks installs both before any executor exists. A process-wide
list, not a per-executor builder: about a dozen places build executors, and hands admission is
a safety boundary none may miss. The hands_isolation fixture installs through the same
function. parking_lot for the list: no poisoning to recover from.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…t (0 blocking lines)

- extensions.rs: a command-name resolver slot (cognition's tool dialect fills it) and
  settle-before-stop participants (admitted turns settle and report their own probe);
  start_server::install_kernel_extensions installs them with the dispatch hooks.
- MeshPresence: the module census reads 'can host personas' and a state name through a
  two-method trait airc::AircDiscovery implements; the kernel no longer names airc.
- SubstrateGovernor (brain regions x personas) moves to persona/; BrainRegion stays kernel.
- The VDD projection of a harness bench is StandardVddRecord::from_bench in vdd.
- sdk_codegen/ext.rs keeps the live catalogue (install + union); manifest loading and the
  process an authored command spawns move to modules/ext_commands/manifest.rs.
- persona_instance_manager's DELETE-ME delegate is gone (ext now calls paths::continuum_root).

Measured (production code, kernel = ring 0 + routing + sdk_codegen, 68,048 lines): blocking
references 77 -> 0. Test-only references upward remain (41 lines, 24 pairs; test_env 8):
they move with the cut.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Base automatically changed from fable/integration to canary October 22, 2026 15:20
…rd tests move to test_env

- paths/test_home.rs owns HomeGuard + with_test_home (the one home lock); 28 callers migrated, test_env keeps only the crate-source readers.
- test_env/{kernel_integration,loose_id_guard,module_wiring_guard}.rs hold the tests that exercise a kernel module with a module above it (moved unchanged): gpu base guard, holder ids, dispatch orphans, executor + ping/grid policy/airc interceptor, socket-route interceptor, probe tracing with the logger sink, verdict projectors, the loose-id guard, the module-wiring audit.
- Split in place: harness VDD projection, persona_tool_error rendering (two new tests, same assertions).
- Local stand-ins: StubSpec descriptor (registry), RecordingDecliner (executor), MeshPresence fixture (census tests).

Lib tests 8541 -> 8543 passed (the two splits), 0 failed. upward_imports 464 -> 368 vs base; modules_in_cycles 36 unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Included in the kernel-crate PR, which carries these peels, the test moves and the crate cut.

@joelteply joelteply closed this Oct 22, 2026
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