Give the world library a sealed public boundary

Completes the move begun in the previous commit, which does not build on its
own. `ghostlight` is now a library crate with an explicit public surface;
`ghostlight-dungeon` is a consumer that reaches the kernel through it and
cannot reach past it.

Deleted first: `mod world;`, the nine unused re-exports, the `#[cfg(test)]`
re-export block, `fixture_controller_opportunities`, the five inference
`fixture_*` items, Dungeon's own `VerifiedPrincipalEvidence`, and Dungeon's
direct `ghostlight-persona-projection` dependency.

The seal. `WorldKernel`, `WorldState`, `reduce`, `apply_effect`,
`CommandEnvelope`, `AuthenticatedCaller`, the journal writer, every ID
`issue()`, and `ScopeDigest::fixture` carry no `pub` of any kind and no
feature gate; the crate declares no `[features]`, so no build configuration
can lift them. Ten `compile_fail` doc-tests stand outside the crate and pin
each one to its error code.

The principal seam. The library owns `VerifiedPrincipalEvidence` with a public
`new`; `mailbox` still bounds it by `valid_until` at ingress. A Dungeon test
counts the minters in production source and fails at anything but one.

The port contract (Q1-7). `PreparedInference::prepare` (renamed from the free
`prepare_invocation`), `InferenceOutput::new`, and
`InferenceFault::{retryable, recovery_required, integrity_violation}` are now
the port's public constructors, so a consumer-implemented `InferencePort` can
answer without test-only wrappers. `TracingInferencePort` is an ungated
decorator.

The tick-ordering test (Q1-8) derives its cover from a real active world
through `derive_cover` and asserts two cells; its ordering and shared-tick
assertions are unchanged.

Behaviour is unchanged. The library's 420 unit tests are the base `world::`
set with the prefix stripped — the names diff empty. Dungeon keeps all 49 of
its names and gains two Soul tests the boundary requires. No schema string,
digest preimage, or store layout is touched.

Windows verification only; the Linux release is Idunn's build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-16 02:06:07 +02:00
commit f859d2c4e3
27 changed files with 1074 additions and 947 deletions

View file

@ -18,9 +18,9 @@ binding, and elaborator sessions in Draft. Other consumers use the same
capabilities with their own policy; Delvehold, for one, starts from a
`Uniform` detail rule.
Source does not yet match this boundary: the world kernel lives in
`crates/ghostlight-dungeon/src/world/` beside Dungeon's runtime. Extracting it
into a library crate is the first pass of plan step 15.
The world kernel lives in the `ghostlight` library crate
(`crates/ghostlight/`); `ghostlight-dungeon` consumes it across a public
boundary and cannot reach its internals.
## Objective

View file

@ -937,8 +937,8 @@ invariants did not ask for.
## Build budget
No new crate, binary, dependency, or service. Types and reduction inside
`crates/ghostlight-dungeon/src/world/`, one new `patch` module, one new
`affordance` module, focused `ghostlight-dungeon` tests. No workspace-wide or
`crates/ghostlight/src/`, one new `patch` module, one new `affordance` module,
focused `ghostlight` tests. No workspace-wide or
release build is admitted for this stage.
## Verification contract

View file

@ -43,7 +43,8 @@ unchanged.
## Scope
The public reference follows the current source in `crates/ghostlight-dungeon`.
The public reference follows the current source in `crates/ghostlight` (the
library) and `crates/ghostlight-dungeon` (the daemon that consumes it).
Research plans and older fixture pipelines remain in the repository but are not
presented as live runtime stages. Physical model names are deployment choices;
the architecture names the stable logical tiers: Fast, Balanced, and Capable.