Skip to content

kernel D2 K4: the store-backed stream registry leaves plane_host/journal.rs for audit/stream_registry.rs - #982

Merged
MattJackson merged 2 commits into
predevfrom
lane-kdel-k4-journal-home
Oct 15, 2026
Merged

MattJackson merged 2 commits into
predevfrom
lane-kdel-k4-journal-home

Conversation

@MattJackson

Copy link
Copy Markdown
Collaborator

Kernel-delete lane, D2 under ruling R-A: neutral host code moves to a kernel home named by its function, and its law0/c1 count there must be 0.

What moves

The durable stream registry moves out of the HOT plane-host journal family (plane_host/journal.rs) into audit/stream_registry.rs. That covers the record and input types (renamed StreamRecord / StreamInput), the kind_id registry, the handle and the resume-break report.

A stream registers with its decode:

  • Decode::Native for core's own streams.
  • Decode::Seam for a stream registered across the host seam. Its JournalReframeFn is opaque to the registry.

What changes for callers

The admin audit log (audit/auditlog.rs) and the usage residual log (residual_log.rs) now register, append, seed and restore through the registry directly. They use no HostCtx, no dispatch scope and no FFI shim. plane_host/journal.rs keeps only the vtable slots, which read the ABI buffers and drive the same registry. It is deleted with the HOT vtable (#787, #503 and row 155 C).

What is deleted

These existed only for the in-core FFI round trip:

  • reframe_audit_ffi, the admin audit log's extern "C-unwind". Its qa/one-memory-abi.toml row is struck.
  • reframe_bridge, NativeReframe / reframe_slot, seed_scoped_via_seam and compact_via_seam.
  • journal_append_scoped_full / _hostless and both pack_bodies.

journal_register_capped is now test-only.

Behaviour

Bytes are unchanged:

  • The native decode re-scopes the record with the store parent, under the stream's framing, exactly as the bridge did.
  • A decode fault still reads journal reframe failed: Fault.
  • The sink is still app.governance's store.
  • The caps are unchanged: audit uncapped, residual MAX_TRACKED_PRINCIPALS.

Proof: audit/tests/stream_registry_tests.rs covers a hostless append, then restart, seed and continue at seq 3; break, fault and refusal cases; and re-scope plus fault text. The existing auditlog and residual suites now run over the native path.

Ledgers

  • law0 busbar-kernel × plane goes from 1122 to 1111. The registry functions no longer spell the streaming alias (5 hits). The deleted twins' docs and the capped-register doc no longer name a plane's call log (6 hits).
  • The new home reads 0.
  • No ceiling is raised.

This PR touches residual_log.rs, which is money evidence. It is opened as a draft, so the coordinator sequences it.

…nal.rs for audit/stream_registry.rs

R-A (neutral host code stays in the kernel under a home named by its function, law0/c1 0 there):
the durable stream registry (record, input, registry, handle, resume-break report) moves out of the
HOT plane-host journal family into audit/stream_registry.rs. A stream registers with its decode:
Decode::Native for core's own streams, Decode::Seam for a stream registered across the host seam
(its JournalReframeFn, opaque to the registry). The admin audit log and the usage residual log now
register, append, seed and restore through the registry directly, with no HostCtx, dispatch scope
or FFI shim, so plane_host/journal.rs keeps only the vtable slots and dies with the HOT vtable.

Deleted with the in-core FFI round trip: reframe_audit_ffi (auditlog's extern "C-unwind"; its
one-memory-abi row is struck), reframe_bridge, NativeReframe/reframe_slot, seed_scoped_via_seam,
compact_via_seam, journal_append_scoped_full(_hostless) and both pack_bodies. journal_register_capped
is test-only. Byte behaviour is unchanged: the native decode re-scopes with the store parent under
the stream framing exactly as the bridge did, and a decode fault reads "journal reframe failed:
Fault" as before (audit/tests/stream_registry_tests.rs).

law0 busbar-kernel x plane 1122 -> 1111: the registry functions no longer spell the streaming
alias (5) and the deleted twins' docs and the capped-register doc no longer name a plane's call
log (6).
…t an unwind (RED)

The stream registry calls its sink without a catch_unwind of its own. Every production RecordStore
is the loader's LoadedStore (the only non-test impl), whose calls cross the plugin dispatcher into
the store's door; the door trampoline runs the slot body under the SDK's mandatory catch_unwind
(busbar-contract/src/abi/sdk/door.rs:411) and answers a panic as Outcome::Fault (:449-455), which
LoadedStore::plain reads back as a RecordStoreError (plugin-loader/src/store_v3.rs:1507, :478).

The RED opens the kernel's store double THROUGH its door on the test store axis with a panic planted
in its append_plane_record slot (a test-only settings knob), registers the admin audit stream over
it, and proves the append returns an error and the record stays queued in the recovery queue,
exactly as emit_admin_hostless queues a failed write. If the boundary let the panic through, the
test would unwind.
@MattJackson
MattJackson merged commit 5cf5b28 into predev Oct 15, 2026
1 check was pending
@MattJackson
MattJackson deleted the lane-kdel-k4-journal-home branch October 15, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant