Ghostlight/docs/architecture/ghostlight-stock-lenses-cut.md
Meta Vens 576c8ac667 Close L1: postmortem, ledger, target and docs reconciled
The stock lenses pass is closed.
- The ghostlight library ships eight lenses.
- Worlds carry weights as world data, and the owner can replace them.
- Each elaborator session draws its lens replayably and records the lens and
  its instruction text.
- Sessions run concurrently under their own permit ceiling.
- In-flight work is found again by reading the store.
All eight target invariants hold.

The cut map records the second Cut 4 fix batch, Soul's final pass, Cut 5's
verdicts and the ledger's actuals. The actuals are +4,907 / −266 in crates
against about +1,300 estimated, the overrun overwhelmingly tests that caught
real defects.

Recorded as follow-ups: an Uncovered case the tests do not pin (L1.f15), and
whether consumers may supply their own lens sets (L1.f16, the operator's).

The target is rewritten as reconciled. The ontology loop no longer claims
seed requests or Vault evidence for the Active sweep, the handoff says
lens weights, and map.yaml names L2 as next.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 20:08:25 +02:00

126 KiB
Raw Blame History

Ghostlight stock lenses — cut map (plan step 15, L1)

Ends are owned by ghostlight-stock-lenses.md; this document owns the means. Written 2026-09-16 against Ghostlight 817c9f4 on codex/ghostlight-dungeon-mvp; first committed at b846c68, refreshed at d3b2c0e; refreshed again the same day with the operator's rulings on L1-Q4 (twice), L1-Q5, L1-Q6, L1-Q7 and L1-Q9, and with the stranding probe. Those commits changed only this file, so every line number below is against 817c9f4 = d3b2c0e source unless a cut says otherwise. Every question now carries a ruling; Hands start at Cut 1 from d3b2c0e (after this refresh is committed, from that commit). Where a ruling superseded an earlier recommendation, the earlier text is kept under "History" inside the question and nowhere else, so there is one live design.

How status is read

Status is derived from what this document records; nothing here is a maintained header.

  • A question (L1-Qn) is open exactly when it has no Ruling field. Authority is operator, self-under-standing-go, or defaulted.
  • A cut is landed when its Landed field names commits, and closed when every promise (P<cut>.<n>) in its Verdicts table has a verdict (HOLDS | FALSIFIED | UNPROVEN). The root agent fills Landed and the Verdicts; Hands and Soul do not edit this file.
  • A mutation (M<cut>.<n>) names file, line, before and after; the commit it ran against is filled at execution. Mutations run against committed code and are restored with a diff, never git checkout.
  • A finding (L1.f<n>) is something no cut owns; each carries introduced-or-pre-existing, severity, and triage (fix | operator | recorded).
  • The ledger carries an estimate per cut; the Actual column is computed from the diff at landing and is empty until then.

The pass is open until every cut is closed and every question has a ruling.

What the probes established

All probes ran in detached scratch worktrees at 817c9f4 (removed; repo clean) on the Windows workstation with a scratch CARGO_TARGET_DIR (removed). They prove mechanism on Windows only. Logs: session scratchpad base-test-list.log, probe1.log, probe2.log, probe2b.log, probe2-dungeon.log, probeq7-base.log, probeq7-a.log, probe-strand.log; not repo artifacts.

  • Base test census (-- --list, which counts ignored tests): library --lib 420 (419 + 1 ignored, controllers::tests::real_codex_connector_cognition_modes_commit_speech); --doc 10; --test external_admission 8; Dungeon --bin ghostlight-dungeon 51 (50 + 1 ignored, runtime::tests::live_smoke_seeds_then_ticks_a_world_against_the_connector); --test build_provenance 1; ghostlight-persona-projection 13. Library by module: action 34, clock_tests 45, consumer 30, controllers 81, cover 18, custody_tests 17, elaboration 14, journal 24, knowledge_tests 21, mailbox 15, patch 34, sdk_inference 23, soul_knowledge_tests 9, tests 32, vault 6, witness_tests 17. Dungeon by module: app_session 8, eve 5, heimdall 5, idunn_health 4, mesh 4, runtime 25.
  • The 55-versus-51 discrepancy is resolved. The Dungeon crate carries 55 #[test]/#[tokio::test] attributes in src/ (app_session 8, eve 5, heimdall 5, idunn_health 6, mesh 4, runtime 27). Four are #[cfg(target_os = "linux")]: runtime.rs:2448, :2472, idunn_health.rs:1330, :1367. On Windows the bin lists 51; on Linux (Idunn's recipe run) it lists 55. The substrate map's "expected 50 + 1 ignored" was the Windows count. This map pins the Windows baseline and states the Linux one.
  • Probe 1, collision (concrete). Two ElaborationRunners over one real CultCacheControllerWorkStore, one elaboration_mailbox() world (one boundary in PlaceSubtree(commons)), started with tokio::join! on the same jurisdiction through a barrier port that holds both in infer until each has persisted its initial checkpoint. Result: a=Ok(Committed), b=Err(WorkPersistence("controller command <id> attempted an illegal checkpoint transition")), inferences=2, distinct_request_ids=1, custody elaboration_commands: 1. So today two concurrent sessions on one answer share one command id (elaboration.rs:1271-1277), one store row, and one provider request id (controllers.rs:6314-6327 hashes command id, purpose, round, instructions, input — all equal), spend two inferences, and the loser dies at persist (controllers.rs:1701-1705) when its ReadyToSubmit{completed:[o2]} fails valid_elaboration_progression against the winner's ReadyToSubmit{completed:[o1]} (elaboration.rs:245, the _ => false arm). Under sweep (runtime.rs:1837) that error is a tracing::debug! and nothing else. What makes this path unreachable after Cut 4 is stated there.
  • Probe 2, lens on the session under v16 (mechanism). Adding lens: String to ElaboratorSession (elaboration.rs:57-66, deny_unknown_fields), setting it in both select_answer arms, and bumping controller_work.v15 → v16 (controllers.rs:77-78): the whole library suite passes (419 + 1 ignored, plus the probe tests), Dungeon passes 50 + 1 ignored, and sdk_inference::tests::schema_fixtures_match_the_checked_in_sidecar_grammar is untouched. A lensed session persisted as ElaboratorInFlight through the real store, reopened from disk (decode, canonical-bytes check, integrity_is_valid at open, controllers.rs:1591-1608), resumed by a fresh runner through the repair path (Rejected → reopen → Committed) under one command id: rows=1, row_type=controller_work.v16, the lens read back from the row's bytes equals what was written, and the same payload under a controller_work.v15 envelope is refused at open. The four existing refusal tests (controllers.rs:6439, :10605, :11343 for v10/v9) do not pin v15 literally and pass unchanged.
  • Probe Q7, base: an instruction edit refuses the whole store. At 817c9f4, an ElaboratorInFlight row whose stored PreparedInference was prepared under "OLD INSTRUCTIONS FROM A PREVIOUS BUILD" (via tool_request, pushed raw through OwnedRedbMessagePackBackingStore under the current v15 envelope) is refused at open with "controller work row <id> failed its checkpoint binding", because integrity_is_valid rebuilds the request from the code constant (elaboration.rs:153, :1244) and prepared_matches_request compares the whole provider request (controllers.rs:1462-1470). The same row prepared under the current constant opens. So today any edit to ELABORATION_INSTRUCTIONS refuses every store holding an in-flight elaboration row; the pass discipline has always bumped the row version on such edits, which refuses the same rows one check earlier. Row sizes: the in-flight row is 58,366 bytes under the current text and 58,233 under the 133-character-shorter text; the row is dominated by the 39 tool schemas inside the stored invocation, so instruction text is well under 1% of it.
  • Probe Q7, option (a): instructions persisted on the session. With ElaboratorSession { lens: String, instructions: String }, select_answer filling instructions with the constant plus a Lens: Patina … clause, elaboration_request taking instructions: &str, and all three callers (step :445, persist_repair :584, integrity_is_valid :153) passing session.instructions: the library suite passes (419 + 1 ignored plus the probes); through the real store, round one is Rejected and persisted, the store is dropped and reopened (open-time integrity now binds the stored invocation to the stored text, and the stored text differs from the bare constant, so it passed by the new rule), a fresh runner resumes, persist_repair builds the round-two invocation from the stored text, and the session ends Committed under one command id; both wire invocations carry Lens: Patina in instructions (241 bytes), and the two rounds have distinct provider request ids (round is in the id). A row whose stored text and stored request disagree is refused by the same comparison, from source: prepared_matches_request compares request.instructions against the request rebuilt from the stored text. PreparedInference::prepare refuses empty instructions (InferenceFault { RecoveryRequired, "invalid instructions" }), so an empty stored text cannot be persisted.
  • Probe 3, stranding: an unrelated commit and the next sweep. Ran at b846c68 (same source as 817c9f4), real CultCacheControllerWorkStore, one scripted bad-shed round per step so each step ends Rejected and persists an ElaboratorInFlight row with one refusal. The unrelated commit is submit_clock(60), which moves last_commit_digest. Then a fresh runner calls step on the same jurisdiction.
    • Deficit path (a world with targets {person: 3}, root commons at 1000 ‰, no boundary): a=Rejected b=Rejected ancestry_moved=true inferences=2 second_saw_refusal=false custody elaboration_commands: 2. select_answer (elaboration.rs:669) digests the ancestry into the deficit's answer_digest, so the second step derives a different command id, lookup is Missing, a fresh session starts with a fresh prompt that never sees the first refusal, inference is repeated, and the old row stays in the store: stranded, one orphan row per interrupted deficit session per commit.
    • Boundary path (elaboration_mailbox(), the dead-end road): a=Rejected b=Superseded ancestry_moved=true inferences=1 second_saw_refusal=false custody elaboration_commands: 1. The boundary digest excludes ancestry, so the id is the same and the row is found, but ElaboratorSession.ancestry is a field of the session and checkpoint.session() != &session at elaboration.rs:404-405 returns Superseded. No inference is repeated and no orphan accrues, but the stored ancestry never returns, so every later sweep answers Superseded for as long as the boundary survives: the boundary's repair stalls permanently after any commit, including every clock tick. The comment at elaboration.rs:2564-2567 ("a boundary that survives a repair keeps its id, which is what makes the resume idempotent") describes the id and not the equality check that follows it. Finding L1.f10 and question L1-Q9.
  • Source-verified facts the design rests on (read, not probed): agent_prompt is persisted and reused on resume, never rebuilt (elaboration.rs:414-435); ELABORATION_INSTRUCTIONS is a static feeding tool_request → provider_request_id (elaboration.rs:1244, controllers.rs:6018, :6314-6327); the SDK sidecar takes instructions as systemPrompt (sdk_inference.rs:558, sidecar/claude-sdk/src/main.ts:242); patch_tools() and patch_tool_signatures() read only PATCH_TOOLS and take no world input (patch.rs:6114-6146); the only kernel entropy is select_band over BandPreimage (action.rs:121-127, :780-818), and the library has no rand (Dungeon does, crates/ghostlight-dungeon/Cargo.toml:28, for cookies and nonces only); the runtime's sweep holds no controller permit (runtime.rs:1823-1841) and sweeps never overlap (the loop awaits sweep() before the next interval.tick()); the pool is one Semaphore (runtime.rs:80, :355, :1866-1872, env GHOSTLIGHT_CONTROLLER_MAX_CONCURRENT, default 4, documented at docs/architecture/ghostlight-dungeon-mvp.md:478) that a speak turn (:1082) and each cover cell (:1959-1980) take from; scale_intent is written by admit_resolved from ResolvedPatch.scale_intent, which is Some only on the genesis lane (lib.rs:2045-2047, patch.rs:1900-1903), and reduce hands resolve_patch None for every AdmitPatch (lib.rs:1641); CreateWorld is serialized into the genesis commit row (lib.rs:905-908, journal.rs:214), so a new field on it is a commit schema change; require_system_capability (lib.rs:1656-1673) and its twin at apply_effect (:4716-4728) admit a system caller for exactly the listed pairs, so a new owner-only CommandBody is refused to every system caller without a new clause; Dungeon matches CommandBody only by construction (runtime.rs:1504-1537), never exhaustively, and never names Mismatch:: or WorldEffect; the create path is CreatePayload (runtime.rs:158-179, deny_unknown_fields) → CreateWorldIntent (:1441-1478), the Eve descriptor is CREATE_BINDINGS (eve.rs:49-57, used at :307 and :312) with operation_schema at :614, and the tests that name ghostlight.world_create.v3 are runtime.rs:2886, :2967, :4017-4045 (a v2 payload is denied) and the smoke harness's titled_two_cell_world (:3122-3154) used by the road test (:3792).

Questions

L1-Q1 What seeds the lens draw

  • Asked: 2026-09-16.
  • Context: nothing counts sessions. The kernel's one entropy recipe is a digest over a typed preimage plus modulo and a cumulative walk (action.rs:780-818). The command id is the session's fixed identity (elaboration.rs:1271-1277) and, under L1-Q4 as revised, does not contain the lens, so seeding from it is not circular.
  • Options: A: seed from the session identity — LensPreimage { world_id, command_id } digested with the kernel's sha256: recipe, first sixteen hex as u64, modulo the weight total, cumulative walk in Lens order; the draw is a pure function of (world, session identity, weights). B: a new session ordinal counted somewhere; requires a counter owner and a write per session. C: the snapshot revision at session start; not replayable across resume without recording it, which is A with an extra field.
  • Recommendation: A, because it introduces no counter, reuses the one recipe, and makes "the same session identity draws the same lens" true by construction. Replayability, not determinism of model output, is the invariant.
  • Depends on it: Cut 1 (lens::draw), Cut 3 (draw site).
  • Ruling: A. The operator: "I couldn't care less what seeds the lens draw as long as it's replayable - deterministic generation is out of reach regardless." The seed is chosen on engineering grounds as A. The preimage was briefly {world_id, jurisdiction, answer_digest} while L1-Q4 had the lens inside the command id; with the lens out of the id (L1-Q4 revised) {world_id, command_id} is the simplest preimage — two fields, the second already the session's key — and is the one Cut 1 specifies. Replayability is unchanged: the same command id under the same weights draws the same lens, and the row records the lens so a resume never redraws.
  • Authority: self-under-standing-go.
  • Ruled: 2026-09-16.

L1-Q2 Where weights live and how they are admitted

  • Asked: 2026-09-16.
  • Context: WorldState has no deny_unknown_fields (lib.rs:780); the only genesis-written world scalar is scale_intent (lib.rs:845), validated in resolve_patch (patch.rs:4597-4615) and re-checked at replay (journal.rs:722-738); STATE_SCHEMA/COMMIT_SCHEMA are consumer.v4 (lib.rs:172-173), pinned literally at consumer.rs:2237 and by length at :1771, and older stores are refused (journal.rs:473, :1245).
  • Options: A: WorldState.lens_weights: LensWeights beside scale_intent, written by genesis through ResolvedPatch.lens_weights: Option<LensWeights> exactly as scale_intent is, carried on CreateWorld and CreateWorldIntent, validated in resolve_patch and verify_state_shape; both schemas bump to consumer.v5. B: fold the weights into WorldScaleIntent; wrong owner — scale is a count target, lenses are flavor, and L3 replaces the intent's permille half. C: keep weights outside the world (runtime config); then a world's flavor is not world data and replay cannot re-derive a session's draw.
  • Recommendation: A.
  • Depends on it: Cut 2.
  • Ruling: A. The operator: "Lens weights live in the world, they're what determine the flavor of the world after all."
  • Authority: operator.
  • Ruled: 2026-09-16.

L1-Q3 Whether an owner command to change weights belongs in L1

  • Asked: 2026-09-16.
  • Context: no command changes a world scalar after creation except AdvanceTime (lib.rs:651-673); soul_the_scale_intent_is_written_once_by_genesis (lib.rs:14330) pins that shape for scale. Session Zero's policy says the owner changes weights in Draft and Active (ghostlight-session-zero.md:59-61).
  • Options: A: CommandBody::SetLensWeights { weights } in L1, owner-only, any phase, same admission as genesis, one reducer arm and one effect. B: defer to a later pass; weights are write-once in L1.
  • Recommendation: A, given the ruling; its L1 consumers are the library and external-admission tests, and Dungeon's route and button are D2.
  • Depends on it: Cut 2; Cut 3's adoption rule (a resumed session keeps the row's lens whatever the weights now say).
  • Ruling: A. The operator: "Changing weights after creation, sure, I don't see why not." A session that already drew keeps its recorded lens.
  • Authority: operator.
  • Ruled: 2026-09-16.

L1-Q4 How concurrent sessions stay distinct and take controller permits

  • Asked: 2026-09-16.
  • Context: probe 1 above. sweep is a sequential loop over jurisdictions (elaboration.rs:607-632); select_answer (:642-677) picks one answer per jurisdiction per call — the oldest boundary, else the deficit — so two runners on one jurisdiction pick the same answer. The runtime holds no permit for the sweep; today one pool serves speak turns and cover cells (runtime.rs:1080-1082 "There is no second concurrency owner").
  • Options as posed: A: claim distinct demand, identity unchanged, the sweep borrows Dungeon's single pool. B: a slot ordinal in the identity. C: A plus deficit slots. D: both — the lens in the identity and a per-sweep claim set — with the pool split.
  • Ruling: D, revised the same day. The operator: "Both, split the pool. Neither elaboration nor simulation should starve the other. Elaboration pool is a ceiling, not a budget like the Simulation pool." Then, accepting the root agent's correction: the lens is recorded on the session and does not enter the command identity, because the identity is the command's idempotency key and must be a fixed property of the demand entry it answers; keying it on a lens drawn from mutable weights strands rows when weights change. Read as:
    • Distinct demand, recorded lens. session_command_id is unchanged (elaboration.rs:1271-1277: world, jurisdiction, answer digest). The runner hands concurrently running sessions distinct demand entries: demand_entries(snapshot) enumerates every open boundary per jurisdiction plus one deficit per jurisdiction with a nonzero row, derives each id, and dedups by id. That claim set is an in-memory value rebuilt each sweep — scheduling state, never world state, never persisted. Each entry's lens is drawn from its id (L1-Q1) and recorded on its session (Cut 3).
    • Split the pool. Dungeon carries two Semaphores: the existing controller_permits becomes the simulation pool (speak turns at runtime.rs:1082, cover cells at :1975), configured by GHOSTLIGHT_CONTROLLER_MAX_CONCURRENT (default 4, unchanged); a new elaboration_permits is the elaboration pool, configured by GHOSTLIGHT_ELABORATION_MAX_CONCURRENT (default 2, minimum 1, read at open beside the other, :1866-1872 shape). sweep(&self, permits: Arc<Semaphore>) receives the elaboration pool only. Neither lane ever acquires from the other's semaphore, so neither can starve the other in this process.
    • Budget versus ceiling. The simulation pool is capacity simulation always has: no other lane draws from it. The elaboration pool is a ceiling: the most sessions elaboration may run at once, and nothing reserves that capacity for it downstream. The ceiling is enforced by the semaphore's size alone: a session holds one permit for its whole step and is spawned only after acquire_owned returns, so at most N elaboration inferences are in flight. Connector-level quota is shared by both pools through one caller id; when the connector refuses for capacity, elaboration's refusal is a retryable fault that ends the session's step and is retried next sweep, and simulation's is the same retryable fault it is today (runtime.rs:1863-1865). The process guarantees no local starvation; it cannot make the connector prefer simulation, and this map says so (L1.f8).
    • Test. saturating_one_pool_never_delays_the_other (Dungeon, runtime.rs tests): hold every elaboration permit in the test, run run_cover_tick on the two-cell world with a counting port, assert both cells ran and the tick's wall time is bounded (no wait on the held pool); then hold every simulation permit and run a sweep on a world with one boundary, assert one infer call completed. Library side: the_sweep_never_exceeds_its_ceiling (pool 1 → max one in flight) and distinct_entries_run_at_once_under_the_ceiling (pool 2 → max two).
  • Authority: operator.
  • Ruled: 2026-09-16 (first ruling and revision).
  • History (superseded): this map first recommended A — identity unchanged, sweep(permits) taking Dungeon's single pool. The first ruling put the lens into the command identity as well as splitting the pool; the revision took the lens back out of the identity for the rationale above, which also dissolved L1-Q8. The deficit-parallelism limit noted under A (one deficit session per jurisdiction per ancestry) still holds and is stated in Cut 4.

L1-Q5 How the ordered emphasis is expressed without reordering PATCH_TOOLS

  • Asked: 2026-09-16.
  • Context: PATCH_TOOLS is one const (patch.rs:5586-6112) rendered as both the tool schemas and the prompt's Tools: line by two functions with one owner (:6114-6146, comment at :6135: "cannot drift"); counts (7, 30, 39) are pinned (:6837, :6981), order is not; the sidecar fixture carries names and parameters only (sdk_inference.rs:1874-1913).
  • Options: A: each Lens carries a list of existing PATCH_TOOLS names in emphasis order plus "reaches for" prose, rendered as one prompt paragraph; PATCH_TOOLS, patch_tools(), patch_tool_signatures(), tool descriptions and the sidecar fixture do not change; a test pins every listed name to a PATCH_TOOLS entry. B: render the Tools: line in lens order. C: per-lens tool descriptions.
  • Recommendation: A.
  • Depends on it: Cut 1 (the table), Cut 3 (the prompt).
  • Ruling: A. The operator: "A, dear Lord, we don't need even more machinery." A lens expresses its emphasis only as prompt text naming the operations it leads with; no per-lens catalog, no reordered tool line, no new type, rendering path, or fixture change beyond that list.
  • Authority: operator.
  • Ruled: 2026-09-16.

L1-Q6 What Dungeon passes at creation in L1

  • Asked: 2026-09-16.
  • Context: CreatePayload is deny_unknown_fields and "a payload that omits it is refused, which is what world_create.v3 means" (runtime.rs:156-179); the descriptor advertises seven bindings (eve.rs:49-57); the smoke harness creates through CreateWorldIntent directly (runtime.rs:3141).
  • Options: A: Dungeon names uniform weights in its handler; world_create.v3 unchanged. B: the library requires explicit weights at creation and holds no default; CreatePayload gains a required lens_weights and world_create becomes v4; Dungeon's create surface supplies uniform weights as Dungeon policy. C: an optional payload field under the v3 name.
  • Ruling: B. The operator: "B." The library requires explicit lens weights at world creation and has no default weights; Dungeon's create handler supplies uniform weights as Dungeon policy for now; world_create becomes v4; the smoke harness and the Eve create path (bindings and operation_schema) are updated. The library keeps no uniform() constructor; LensWeights derives Default only as the empty map that WorldState::empty needs before genesis writes (it never draws and never persists — verify_state_shape refuses it). The two places that need a way to build uniform weights each own their own: Dungeon's uniform_lens_weights() (Dungeon policy, used by the create surface's default value and the smoke harness) and the library test module's stock_weights() (test fixture).
  • Authority: operator.
  • Ruled: 2026-09-16.
  • History (superseded): this map first recommended A, keeping world_create.v3 and naming LensWeights::uniform() from the library at runtime.rs:1457, on the grounds that a payload field without its slider belongs to D1/D2. Cut 2 is written to B.

L1-Q7 Where the lens text lives: per-lens instructions or the user turn

  • Asked: 2026-09-16; reposed the same day after the operator asked why per-lens instruction strings cannot be versioned when a checkpoint references them. Probed (see "Probe Q7" above).
  • Context: the checkpoint persists agent_prompt and the whole PreparedInference (elaboration.rs:77-84); integrity_is_valid rebuilds the request from the code constant and demands equality (:134-170); an edit to that constant refuses every store holding an in-flight row (probe, base). The sidecar places instructions as the system prompt (main.ts:242). Row size ≈ 58 KB, dominated by tool schemas.
  • Options:
    • (a) Per-lens instructions persisted on the session. ElaboratorSession.instructions: String is filled once from lens.instructions() (the constant's sentence plus the lens clause) when the session is built; elaboration_request takes the text; step, persist_repair and integrity_is_valid read it from the session. Probed: open-time integrity, resume and the repair path all work, and the lens clause reaches the wire on every round. provider_request_id stays stable across resume (it hashes the stored text) and becomes a stable per-lens prefix across sessions of one lens (same text, so the connector's cache prefix is shared per lens rather than per world). What is lost: the stored instructions are no longer proven equal to current code; a row whose text was written by an older build, or forged, validates as long as its stored invocation agrees with its stored text. What is kept: the stored invocation is proven to equal a request rebuilt from the stored text and the stored conversation (request id, conversation id, tools, model, shape). Cost: about 250 bytes per row against ≈ 58 KB (< 0.5 %); no version table; a lens-text edit needs no row-version bump and strands no store.
    • (b) A version id with every historical string retained in code. ElaboratorSession.instructions_version: u32 (or lens_text.vN) and a table LENS_INSTRUCTIONS: &[(u32, [&str; 8])]; integrity rebuilds from the table entry the row names. Keeps "stored text equals code" for every version ever shipped, at the cost of the table growing by eight strings per edit forever, and a review question ("which version is live?") the code must answer twice.
    • (c) A version id, rows naming a retired version refused at open. The same field, one live entry; a row from a retired version fails integrity at open. Behaviourally this is today's rule with a named error, so it buys nothing over the existing row-version bump except the version field.
    • (d) User turn. The lens paragraph rides in build_prompt → agent_prompt, already persisted and never rebuilt; ELABORATION_INSTRUCTIONS stays one static; nothing about integrity changes; the constant keeps refusing stores when edited (the base hazard stays); steering is weaker than the system prompt and the connector's cache prefix stays one for every lens.
  • Recommendation: (a). The probe did not falsify it: every path the question named works, and the guarantee it gives up (stored text equals code) was in practice the store-refusing hazard the operator was asking about, with the pass discipline already making it moot by bumping the row version. The row keeps carrying what the model actually saw, as agent_prompt already does, which is the property a resumed conversation needs. (b) grows code per edit; (c) is the present behaviour with a field; (d) is the fallback if the operator wants the instruction text provably equal to code, at the cost of weaker steering and no per-lens cache prefix. Cut 3 is written for (a).
  • Depends on it: Cut 3.
  • Ruling: (a). Per-lens instructions, with the instruction text persisted in the checkpoint and integrity comparing against the stored text.
  • Authority: operator.
  • Ruled: 2026-09-16.

L1-Q8 How a session is resumed after a weight change moves its draw

  • Asked: 2026-09-16 (from L1-Q4's first ruling meeting L1-Q3's).
  • Context: with the lens in the command id, a weight change could move a session's key and strand its row.
  • Options (history): A: probe the eight candidate ids per entry. B: a store listing method. C: accept the stranding.
  • Ruling: dissolved by L1-Q4's revision. With the lens out of the id, a weight change cannot move a session's key; the row is found by the same id and Cut 3's adoption rule keeps the row's lens. The eight-candidate probing is deleted from the cuts. The general stranding of keys by ancestry, which the probe then found, is L1-Q9.
  • Authority: operator.
  • Ruled: 2026-09-16.

L1-Q9 How an in-flight session is rediscovered after the world moves

  • Asked: 2026-09-16, from the operator's challenge ("Surely an active Elaborator session is recorded? Are you relying on some deterministic code outputting the same id rather than just checking the state?") and probe 3 above.
  • Context: yes: step recomputes the command id from world, jurisdiction and answer digest and looks the store up by that id (elaboration.rs:383-412); there is no listing query on ControllerWorkStore (controllers.rs:1541 region: lookup, persist, custody_probe). Two consequences, both pre-existing (L1.f10): a deficit session's key contains the ancestry (:669), so any commit strands its row and the next sweep repeats the inference against a new row; a boundary session's key survives, but ancestry is a session field and the equality at :404-405 reports Superseded forever. On the road, where the clock commits every tick, no Rejected session of either kind has ever been repaired on a later sweep.
  • Is this required for L1? Yes, for the boundary half: Cut 3's promise P3.2 (a resumed session keeps its recorded lens and text across a weight change, which is a commit) is unprovable at base behaviour, and Cut 4's concurrency multiplies commits between sweeps. Cut 3 therefore carries the equality fix (option C below) as part of its adoption rule. The deficit half — rediscovery when the key itself moved — is not required for L1's concurrency to be correct (each sweep's claim set is consistent within itself, and a stranded deficit row costs a repeated inference and an orphan row, not a wrong commit) and is this question's operator fork.
  • Options:
    • A: resume reads state. Add ControllerWorkStore::elaboration_in_flight(&self) -> Result<Vec<(CommandId, ElaboratorSession)>, ControllerWorkStoreError> (rows in ElaboratorInFlight or ReadyToSubmit; not NoPatch). demand_entries matches each entry to a row by (world, jurisdiction, answer) ignoring ancestry, lens and text, adopts the row's session and its command id, and otherwise builds a fresh session. The command id stays the kernel's idempotency key and stops being the only way to rediscover work. Cost: one trait method; CultCacheControllerWorkStore answers it by scanning its in-memory journal.work map (controllers.rs:1662-1667 shape; O(rows), rows are tens), RecordingWorkStore (:8339) the same over its map, and Dungeon's test stores (runtime.rs:3194 family) return an empty vector; no index, no schema, no new row. A stranded deficit row is then resumed under its old id with its old ancestry: require_answer re-checks the deficit at commit (lib.rs:1706-1712), so the old ancestry is informational, and the repair prompt still names the refusal the model saw.
    • B (history, superseded by the ruling): exclude ancestry from the deficit key. The deficit id becomes (world, jurisdiction, "deficit"). Then a deficit session that Committed leaves a ReadyToSubmit row under the one id every later deficit session on that jurisdiction derives; the next session's initial ElaboratorInFlight fails progression (:1701-1705) and the loop never advances — the exact resubmit-forever the ancestry term was added to prevent (:667-668). At the kernel, a second AdmitPatch under the same id with a different body is CommandIdConflict (lib.rs:1438-1447), and with the same body AlreadyApplied. B needs a different disambiguator, which is a session counter in disguise; not viable alone.
    • C (history as a competitor; live as A's boundary half): equality only. Compare identity fields (world, jurisdiction, answer, answer digest) at :404 and adopt the row's ancestry, lens and text. Fixes the boundary stall; alone, deficit rows stay stranded and orphans accrue one per interrupted deficit session per commit.
  • Recommendation: A, with C inside Cut 3 (it is A's adoption rule applied to the one row lookup already returns) and A's listing inside Cut 4 where demand_entries is written. The probe supports it: the only way to find a moved key is to read the rows. Orphan rows already in a store are a separate hygiene question (a terminal state for abandoned rows, or a scan at open) and are not posed here.
  • Depends on it: Cut 3 (the adoption rule, boundary half); Cut 4 (the listing, deficit half).
  • Ruling: A. The operator: "A, of course". Resume reads state: the in-flight listing rediscovers work by what it answers; the command id stays the kernel's idempotency key and stops being the only way to rediscover work. Cut 3's adoption rule is part of A's design, not a competitor.
  • Authority: operator.
  • Ruled: 2026-09-16.

Cut 0. Captures

  • Repo/branch: Ghostlight codex/ghostlight-dungeon-mvp at 817c9f4. No commit; output lives in the session scratchpad. A detached scratch worktree is acceptable here because nothing comes back; git ls-files --eol crates shows w/crlf under core.autocrlf=true and it does not affect these captures.
  • First:
    • Test census: recorded above (this map ran it; Hands need not rerun). Compare post-cut with -- --list and the same per-module tally.
    • base-session-id.txt: in the scratch worktree, add a temporary test beside a_session_identity_is_derived_from_its_answer (elaboration.rs:2549) that prints session_command_id(&session("sha256:one")).unwrap().to_string() for that test's session (nil_for_test world, Uncovered, deficit answer, ancestry sha256:ancestry). Record the UUID text. Cut 3 pins that the derivation is byte-equal to it after the lens and text join the session: identity is unchanged by L1.
    • base-catalog.txt: print patch_tool_signatures() and sha256(serde_json::to_vec(&patch_tools())) from a temporary test in patch.rs. Record both. Soul compares them after Cut 3 with the same method; the permanent proof is by signature (Q5).
    • base-mismatches.json: in the scratch worktree, print serde_json::to_string(&refusals[0].mismatches) from soul_an_elaboration_session_resumes_and_repairs_from_its_mismatch_set (controllers.rs:9579). Record it. Cut 3's lens-invariance test asserts the same JSON under every lens.
    • Get-ChildItem target -Recurse | Measure-Object Length -Sum: record the repo target size before Cut 1 (L0 recorded 7.5 GiB; not re-measured here).
  • Captured: at ff766e8 (source identical to 817c9f4) by Hands, stored in the session scratchpad under cut0\, not as repo artifacts: session id 56dbcdb2-9337-ac07-f322-37376b58cbcb; catalog digest sha256:285e9fa3…c5e8b; the mismatch JSON; target size 14,484,808,937 bytes; the distinct warning messages from a forced rebuild. Census by -- --list: library 420 (1 ignored), doc 10, external_admission 8, Dungeon 51 on Windows (1 ignored; 55 on Linux), build_provenance 1, persona-projection 13.

Cut 1. The lens module

  • Repo/branch: Ghostlight codex/ghostlight-dungeon-mvp from 817c9f4. One commit; builds alone; nothing reads it yet except its tests. Depends on Cut 0 and rulings L1-Q1, L1-Q5.
  • First: git status clean; working in the main checkout (LF).
  • Deletes first: none. (L1's deletions are in Cut 4; this cut is the smallest surface that Cut 2 and Cut 3 can consume.)
  • Keeps and moves: none.
  • Adds: crates/ghostlight/src/lens.rs (about 130 lines plus tests):
    • pub enum Lens { Patina, Charter, Ledger, Hearth, Tangle, Veil, Ember, Numen } with Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, #[serde(rename_all = "snake_case")]. pub const ALL: [Lens; 8] in declaration order; pub fn name(self) -> &'static str.
    • pub(crate) fn reaches_for(self) -> &'static str: the "Reaches for" column of the target table, verbatim.
    • pub(crate) fn leads_with(self) -> &'static [&'static str]: existing PATCH_TOOLS names in emphasis order, from the "Leads with" column. Initial table (Hands may reorder within a lens; every name must be a PATCH_TOOLS entry, pinned by test): Patina set_persona_material, declare_affordance, declare_resource, declare_place; Charter grant_authority, open_office, install_incumbent, open_forum, declare_subject; Ledger transfer, bind, declare_resource, alter_cost, declare_route; Hearth create_commitment, set_persona_material, declare_subject; Tangle advance_pressure, create_commitment, grant_authority, declare_subject, bind; Veil acquire_knowledge, communicate, declare_channel, set_reach, declare_fact, forget; Ember advance_pressure, create_commitment, close_route, consume; Numen declare_fact, declare_affordance, set_persona_material, witness.
    • pub(crate) fn instructions(self) -> String (Q7 (a)): ELABORATION_INSTRUCTIONS (moved here from elaboration.rs:52, still one sentence) followed by " Lens: {name}. Reach for {reaches_for}. Lead with {leads_with joined by ", "}; every supplied tool remains available." Under Q7 (d) this function renders the same text as a prompt paragraph instead and the constant stays where it is.
    • pub struct LensWeights(BTreeMap<Lens, u32>) with Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize, #[serde(transparent)]; pub fn new(BTreeMap<Lens, u32>) -> Self; pub fn get(&self, Lens) -> u32; pub fn iter(&self); pub(crate) fn draws(&self) -> bool (some weight is nonzero). No uniform(), no default weights (Q6): Default is the empty map, used only by WorldState::empty. Validity is decided at admission (Cut 2), as it is for WorldScaleIntentRef. An unknown lens name cannot be represented; serde refuses it at every deserialization boundary.
    • #[derive(Serialize)] struct LensPreimage { world_id: WorldId, command_id: CommandId } and pub(crate) fn draw(weights: &LensWeights, world_id: WorldId, command_id: CommandId) -> Result<Lens, KernelError>: super::digest(&LensPreimage{..}), strip_prefix("sha256:"), first 16 hex → u64, u128 position modulo the total, cumulative walk over Lens::ALL skipping zero weights; Err(KernelError::Invariant("lens weights never draw")) when the total is zero. Same shape as select_band (action.rs:780-818); the bias bound is the same and is stated in the doc comment.
    • crates/ghostlight/src/lib.rs: mod lens; beside the other modules and pub use lens::{Lens, LensWeights}; in the public boundary list.
    • crates/ghostlight/src/lib.rs tests module: pub(crate) fn stock_weights() -> LensWeights (every lens at 1) beside creation() (:4997), for the literals Cut 2 touches. Library tests only.
  • Per-file changes: lib.rs:77-116 region: the mod and pub use lines above; elaboration.rs:52: the constant moves to lens.rs (Q7 (a)) or stays (Q7 (d)) — Cut 1 leaves it in place and Cut 3 moves it, so this cut does not depend on Q7.
  • Authority map: no ownership change. lens.rs owns the stock table, the per-lens text, and the draw recipe; it reads nothing and writes nothing.
  • Verification (Windows; proves Windows only):
    • builds: cargo check -p ghostlight; cargo check -p ghostlight-dungeon --bin ghostlight-dungeon; no new warnings (measure from a forced rebuild: cargo clean -p ghostlight first, compare distinct messages by cmp against Cut 0's capture).
    • tests (cargo test -p ghostlight --lib lens::): every_lead_names_a_patch_tool pins leads_with() ⊆ PATCH_TOOLS names for all eight, each list nonempty and duplicate-free; the_draw_is_a_function_of_world_and_session pins draw equal on repeated calls and over 200 ids CommandId::derived("l1-probe", &[&i]) records the exact multiset of lenses drawn under stock_weights() as a literal (computed at the cut and pinned; the literal is the replay proof); a_zero_weight_never_draws pins that with {patina:0, charter:3, ledger:1} over the same 200 digests Patina is drawn 0 times and the charter:ledger split equals a pinned literal (near 3:1; the exact counts are the assertion); all_zero_weights_are_an_error pins Err(Invariant) for LensWeights::default() and for {patina:0, …, numen:0} (all eight named, all zero — a real-shaped value, not an empty map); an_unknown_lens_name_does_not_deserialize pins serde_json::from_str::<LensWeights> refusing {"Patina":1}, {"patina ":1}, {"patinaa":1}, and {"patina":1,"tribunal":1}, and accepting {"patina":1}; rmp_serde round-trips stock_weights() byte-equal through to_vec_named/from_slice; each_lens_text_names_its_own_leads pins instructions() contains the lens name and every leads_with name, and all eight texts differ.
    • negative: rg -n '\brand\b' crates/ghostlight/Cargo.toml = 0; cargo tree -p ghostlight -e normal | rg -n '\brand\b' = 0 (checked at base: the library's tree has no rand; Dungeon's does); rg -n 'lens' crates/ghostlight-dungeon/src = 0 after this cut (Dungeon touches lenses only in Cut 2); rg -n 'fn uniform' crates/ghostlight/src = 0; rg -n '\bDungeon\b|Session Zero|slider|player' crates/ghostlight/src/lens.rs = 0 (collision check: the L0 player hit is consumer.rs:966, outside this file, so the bare pattern is safe scoped to lens.rs).
    • mutations: M1.1 lens.rs draw: position < weight → position <= weight (an off-by-one that lets a zero weight draw): a_zero_weight_never_draws must fail. M1.2 lens.rs draw: replace command_id in the preimage with a constant: the_draw_is_a_function_of_world_and_session's pinned multiset must fail. M1.3 lens.rs draws(): any(|w| *w > 0) → !is_empty(): all_zero_weights_are_an_error (the all-eight-zero value) must fail.
  • Promises:
    • P1.1 Lens has exactly eight variants named as the target table and serializes as snake_case strings.
    • P1.2 Every leads_with name is a PATCH_TOOLS entry; patch_tools(), patch_tool_signatures(), tool descriptions and sidecar/claude-sdk/test/schemas.json are not edited in this cut (diff shows no change in patch.rs or the fixture).
    • P1.3 draw is deterministic over (world, command id, weights), never returns a zero-weight lens, and errors on an all-zero set.
    • P1.4 An unknown lens name is refused by deserialization with values shaped like real ones (case, whitespace, near-miss).
    • P1.5 The library's dependency tree gains nothing; no rand; no uniform() or default weights in the library.
  • Landed: 835ea4d.
  • Verdicts: Soul pass 1, all mutations against 835ea4d.
Promise Verdict Evidence Mutations
P1.1 HOLDS Eight variants in the target's order; snake_case pinned; PATINA, Patina, 0 refused M1.4; Soul MS3 (reorder fails the serialize test)
P1.2 HOLDS Lead test green; catalog digest recomputed at 835ea4d equals the Cut 0 capture; patch.rs, schemas.json, Cargo.toml, Cargo.lock diff 0 M1.5
P1.3 HOLDS Draw depends only on {world_id, command_id} and weights; BTreeMap order is stable; u128 total; all-u32::MAX and single-max weights draw; Default and eight zeros refuse M1.1, M1.2, M1.3 (caught by a divide-by-zero panic, see c1.s1.f2); Soul MS1 reversed walk, MS2 digest slice 16..32 both fail; MS4 walking iter() passes because it is the same order
P1.4 HOLDS Case, whitespace, near-miss, tribunal, numeric names refused; negative, float, over-width and non-integer weights refused in JSON and msgpack; rmp_serde round-trip byte-equal. Duplicate keys are last-wins (c1.s1.f1) Soul probes
P1.5 HOLDS rand 0 in manifest and cargo tree -e normal; fn uniform 0; lens 0 in Dungeon source; no Dungeon vocabulary in lens.rs; distinct warnings identical to base; draw and draws unreachable from an external crate (E0603, E0624) MS5, MS6, external-reach probes
  • Soul findings, pass 1:
    • c1.s1.f1 (introduced, low, recorded): LensWeights is serde(transparent) over BTreeMap, so {"patina":1,"patina":5} deserializes to Patina = 5 in JSON and msgpack. Cut 2's admission judges the parsed value and cannot see a doubled key. Same behaviour as every BTreeMap field in the crate.
    • c1.s1.f2 (introduced, low, fix in Cut 3): the all-zero guard (lens.rs:164, over the map's values) and the divisor (lens.rs:201-205, a sum over Lens::ALL) are different computations. They agree today, but changing the guard alone panics at :205. Guard the divisor directly, as select_band does (action.rs:802). Cut 3 wires the draw and owns this.
    • c1.s1.f3 (introduced, info, recorded): the cfg_attr(not(test), expect(dead_code)) markers produce an unfulfilled lint expectation warning, not a compile error, when their items gain a caller; the workspace has no deny(warnings). Cut 3 must remove them, and its Soul pass must catch a leftover by the distinct-warning comparison. This corrects Hands' claim that the compiler would refuse.
    • c1.s1.f4 (info): external code can hold an all-zero LensWeights through new, Default and Deserialize, and cannot reach the draw, since the lens module and draws are private. No crash path exists at Cut 1, consistent with L0's Q1-9.

Cut 2. Lens weights as world data, the owner command, and world_create.v4

  • Repo/branch: Ghostlight codex/ghostlight-dungeon-mvp from Cut 1's commit. One commit: the state field, the command, the effect, the two schema bumps, the Dungeon create path and every construction site move together, because the crate graph does not build with CreateWorld half-changed and a schema bump without its shape change is a lie. Depends on Cut 1 and rulings L1-Q2, L1-Q3, L1-Q6.
  • First: Cut 1 pushed; cargo test -p ghostlight green; the base consumer.rs:1771 length trick requires consumer.v5 to be the same length as consumer.v0 (it is).
  • Deletes first: none in code. soul_the_scale_intent_is_written_once_by_genesis keeps its name and gains no lens assertion; the lens twin is a new test.
  • Keeps and moves: none.
  • Adds (library):
    • lib.rs:845 region: WorldState.lens_weights: LensWeights directly after scale_intent, doc: "Written by genesis and replaced only by SetLensWeights; read by the elaborator's draw and by nothing that admits." It enters state_digest (whole-struct digest, lib.rs:4903) and no ScopePreimage.
    • lib.rs:400-411: CreateWorld.lens_weights: LensWeights. lib.rs:416-432: CreateWorldIntent.lens_weights: LensWeights (pub, required; doc: "Required. The library holds no default weights; a consumer states the world's flavor or is refused."). mailbox.rs:171-191: pass it through.
    • patch.rs:1903 region: ResolvedPatch.lens_weights: Option<LensWeights> with the same "Some on the genesis lane and nowhere else" doc. patch.rs:2941-2946: resolve_patch(state, command_id, patch, scale_intent, lens_weights: Option<&LensWeights>). patch.rs:4597-4615 region: if let Some(weights) = lens_weights { if !weights.draws() { mismatches.push(Mismatch::LensWeightsNeverDraw) } } and carry lens_weights: lens_weights.cloned() into the resolved value at :5271 region. patch.rs:1549-1554 region: Mismatch::LensWeightsNeverDraw (unit variant, serde tag as the others). Call sites: lib.rs:1314-1319 (Some(&input.lens_weights)), :1808-1813 (Some(&command.lens_weights)), :1641 (None), :14368 (None), plus every resolve_patch call in patch.rs tests (the compiler names them).
    • lib.rs:2045-2047 region: if let Some(weights) = &resolved.lens_weights { state.lens_weights = weights.clone(); }.
    • lib.rs:1743-1778 WorldState::empty: lens_weights: LensWeights::default(); genesis overwrites it and verify_state_shape refuses a persisted all-zero set, so no state on disk ever holds the empty value.
    • lib.rs:651-673: CommandBody::SetLensWeights { weights: LensWeights } with doc: owner only, any phase, replaces the whole set; a session that already drew keeps its recorded lens.
    • lib.rs:860-897: WorldEffect::LensWeightsReplaced { weights: LensWeights }.
    • lib.rs:1542-1652 reduce: arm CommandBody::SetLensWeights { weights } => { require_owner(state, &command.caller)?; if !weights.draws() { return Err(KernelError::PatchRejected(vec![Mismatch::LensWeightsNeverDraw])); } Ok(WorldEffect::LensWeightsReplaced { weights: weights.clone() }) }. History: this spec said identical weights are still a commit, likening the owner's act to an empty-motion tick. Superseded by c2.s1.f1: an identical set changes nothing canonical and is refused with NoCanonicalChange, while a tick moves fictional time.
    • lib.rs:4708-4894 apply_effect: arm WorldEffect::LensWeightsReplaced { weights } re-deciding require_owner and draws() (the same re-decide shape as WorldActivated, :4788-4798) then state.lens_weights = weights.clone(). require_system_capability (:1656-1673) and its twin (:4716-4728) need no clause: the new pair is not listed, so a system caller is Unauthorized on both sides.
    • lib.rs:3694-3721 snapshot: lens_weights: state.lens_weights.clone(); lib.rs:1088-1116: WorldSnapshot.lens_weights: LensWeights (pub).
    • journal.rs:722-738 region: after the scale-intent check, if !state.lens_weights.draws() { return Err(JournalError::Corrupt("the lens weights never draw".into())); }.
    • lib.rs:172-173: ghostlight.world_state.consumer.v5, ghostlight.world_commit.consumer.v5. consumer.rs:2237: the literal becomes consumer.v5; :1771 unchanged (same length).
    • CreateWorld literals gain lens_weights: stock_weights() (library tests) at mailbox.rs:180 (production: input.lens_weights), :935, :1356; journal.rs:1064, :1146, :1497; lib.rs:4998; controllers.rs:8417, :9012, :9415, :9705, :10252, :10697, :11609, :13137, :13636. crates/ghostlight/tests/external_admission.rs:46 builds its own LensWeights::new(BTreeMap::from([(Lens::Patina, 1)])) (an external crate has no fixture). The compiler names any site this list missed.
  • Adds (Dungeon, Q6 B):
    • runtime.rs:158-179 CreatePayload.lens_weights: LensWeights (required; doc: "Required, and must draw: a payload that omits it is refused, which is what world_create.v4 means. An unknown lens name is refused by deserialization before any handler runs."). :1457-1474: pass lens_weights: payload.lens_weights.
    • runtime.rs (production, beside configured_cover_budget): pub(crate) fn uniform_lens_weights() -> LensWeights — every stock lens at 1 — with doc: "Dungeon policy for a world created before Session Zero's sliders exist (D2). Not a library default; the library requires the weights to be stated." Used by eve.rs for the create surface's default value and by the smoke harness.
    • eve.rs:49-57: CREATE_BINDINGS: [&str; 8] adds "lens_weights"; :295-301 region: a world.create.lens_weights control.input.textarea bound as local_draft("lens_weights", "json") whose props.value is serde_json::to_string(&uniform_lens_weights()) (the policy default, editable) and whose placeholder shows the same JSON; :312 and :614: ghostlight.world_create.v4.
    • runtime.rs:3122-3154 titled_two_cell_world: lens_weights: uniform_lens_weights(); :2886, :2967: ghostlight.world_create.v4 with "lens_weights":{"patina":1,…} in the payload (all eight); :4017-4045: the stale case names v3 and is denied (the v2 case becomes history and is replaced, not kept beside it); a new case posts a v4 payload with "lens_weights":{"patina":1,"tribunal":1} and asserts denied with no world created, and another posts every lens at zero and asserts denied (the resolver's LensWeightsNeverDraw surfaces as the payload error) with no world created.
  • Tests (library, lib.rs tests module unless said): genesis_writes_the_lens_weights_it_was_given (create with {patina:2, numen:1}, snapshot carries it, replay through WorldKernel::open equal); a_genesis_lens_set_that_never_draws_is_refused (all eight named at zero → PatchRejected containing exactly LensWeightsNeverDraw, no world file written); soul_the_lens_weights_are_replaced_only_by_the_owner_command: the lens twin of lib.rs:14330 — an Active AdmitPatch resolves with lens_weights: None; SetLensWeights from the owner in Draft and again in Active replaces the set and moves the revision; the same body from a non-owner principal is Unauthorized; from CallerId::System(SystemCapability::Elaborator{..}) is Unauthorized; from Clock is Unauthorized; a set with every lens at zero is PatchRejected([LensWeightsNeverDraw]); a set with a single nonzero lens is admitted (a zero weight is admitted, it just never draws); a journal row forged with a non-owner caller and a LensWeightsReplaced effect fails replay (the journal.rs:1130 forgery shape); a_store_written_before_the_lens_schema_is_refused: the consumer.v4 strings for state and commit rows refused at open, beside the existing v1 test (journal.rs:1245), same shape; lens_weights_enter_the_state_digest_and_no_scope_digest: two states differing only in weights have different state_digest, and every subject's scope digest (bound_scope_digest) is equal before and after a SetLensWeights commit; external_admission.rs: set_lens_weights_from_a_non_owner_is_refused_and_commits_nothing through submit_principal with a second VerifiedPrincipalEvidence (revision, state digest, last commit digest, operator log length unchanged, same shape as the file's other rejections), and set_lens_weights_with_an_unknown_lens_does_not_decode pinning serde_json::from_value::<CommandBody>(json!({"type":"set_lens_weights", "weights":{"patina":1,"veil ":1}})) is Err — a serde limit, stated as such, not a kernel admission proof.
  • Per-file changes: as listed under Adds; additionally docs/architecture/ghostlight-world-ontology.md:260 and :307-308 name world_create.v4 and consumer.v5; ghostlight-world-consumer-api.md:182-183 names consumer.v5 [Hands]; notes/local-live-smoke.md:276 is history and stays; notes/fresh-workspace-handoff.md:241 and state/map.yaml:378,385 [steward].
  • Authority map:
    • Owner: the reducer owns lens weights. Genesis writes them through ResolvedPatch.lens_weights; SetLensWeights replaces them through reduce → apply_effect; replay re-derives both.
    • Inputs: CreateWorldIntent.lens_weights from the consumer (Dungeon's from its v4 payload, defaulted on the surface by Dungeon policy); CommandBody::SetLensWeights from the owner principal.
    • Outputs: WorldSnapshot.lens_weights (read by the elaborator's draw in Cut 3 and by any projection); the effect in the commit row.
    • Derived state: the Eve create surface's default value (Dungeon policy, display until submitted). The drawn lens (Cut 3) is derived from the weights at draw time and then recorded; it is not re-derived.
    • Forbidden writers: AdmitPatch (resolves with None, pinned); any system capability (require_system_capability table, pinned); any consumer or elaborator lane; the library (no default weights).
    • Shared paths: genesis and SetLensWeights share LensWeights::draws and Mismatch::LensWeightsNeverDraw; replay and live commits share reduce/apply_effect; verify_state_shape is the third statement of validity, as it is for scale_intent; the Eve button and the smoke harness both reach CreateWorldIntent with weights Dungeon stated.
    • Deletion line: nothing deleted; three schema strings are replaced and the old ones become refused, not read.
  • Verification:
    • builds: cargo check -p ghostlight, cargo check -p ghostlight --tests, cargo check -p ghostlight-dungeon --tests; warning set unchanged (forced rebuild, cmp).
    • tests: cargo test -p ghostlight = 420 + new (-- --list tally: every base name present); cargo test -p ghostlight --test external_admission = 8 + 2; cargo test -p ghostlight-dungeon --bin ghostlight-dungeon = 51
      • 2 (same base names; every_operation_the_panel_emits_has_a_schema runtime.rs:4065 passes with the eighth binding); cargo test -p ghostlight --doc = 10 (with --all-features too: the standing seal check).
    • negative: rg -n 'consumer\.v4' crates docs notes state --glob '!state/evidence*' lists only history lines (L0 map and postmortem, docs/architecture/ghostlight-library-extraction*.md; ontology :255 names v2 as history and stays); rg -n 'world_create\.v3' crates = 1, the stale-payload denial test; rg -n 'fn uniform' crates/ghostlight/src = 0 and rg -n 'uniform_lens_weights' crates/ghostlight-dungeon/src ≥ 3 (definition, Eve default, smoke harness); rg -n 'lens' crates/ghostlight-dungeon/src/mesh.rs crates/ghostlight-dungeon/src/idunn_health.rs = 0.
    • mutations: M2.1 lib.rs reduce SetLensWeights arm: delete the require_owner call: soul_the_lens_weights_are_replaced_only_by_the_owner_command (non-owner principal) must fail. M2.2 lib.rs apply_effect LensWeightsReplaced arm: delete its owner re-check only: the forged journal row half of the same test must fail. M2.3 patch.rs genesis check: !weights.draws() → weights.0.is_empty(): a_genesis_lens_set_that_never_draws_is_refused (all eight named at zero) must fail. M2.4 journal.rs lens check deleted: a state row with an all-zero set written by hand must open; the refusal test must fail. M2.5 lib.rs:172 schema string reverted to v4: a_store_written_before_the_lens_schema_is_refused must fail. M2.6 runtime.rs CreatePayload.lens_weights given #[serde(default)]: the Dungeon test posting a v4 payload without lens_weights (add it) must fail to be denied.
    • operator: none in this cut; the Linux proof is the recipe run and is listed under findings.
  • Promises:
    • P2.1 A created world carries the weights it was given; replay reproduces them digest-for-digest.
    • P2.2 An all-zero set is refused at genesis, by the command, and at the Dungeon payload boundary with Mismatch::LensWeightsNeverDraw; a single zero weight is admitted.
    • P2.3 Only the owner principal can replace weights; every system capability and every non-owner principal is Unauthorized, from inside the crate and from the external crate; a forged owner row fails replay.
    • P2.4 AdmitPatch cannot carry or change weights (resolves None).
    • P2.5 consumer.v4 stores are refused at open; no migration path exists (rg -n 'v4' crates/ghostlight/src/journal.rs shows only the refusal test's literal).
    • P2.6 The library requires explicit weights and holds none; world_create.v4 carries them; Dungeon's surface defaults them by its own uniform_lens_weights(); a v3 invocation is denied.
    • P2.7 Weights enter state_digest and no scope digest.
  • Landed: d06fd7e (code), 10be98c (docs).
  • Verdicts: Soul pass 1; Hands' mutations against 10be98c, Soul's own against the same tree.
Promise Verdict Evidence Mutations
P2.1 HOLDS Genesis and replay tests; Soul's replay probe across two weight commits MH.2; Soul MS.2
P2.2 HOLDS Refused at genesis, the command, the Dungeon payload and the stored state row; a zero weight among real ones is admitted. The stored-row check is a redundant third layer (c2.s1.f3) M2.3, M2.4, MH.4; Soul MS.4 (one shared draws() owner), MS.5
P2.3 HOLDS Non-owner principal, approver, elaborator, clock and consumer refused in-crate and from an external crate; one state.owner source read by both require_owner and the effect arm; CommandEnvelope and WorldKernel private; only submit_principal accepts a body, with the caller derived from verified evidence. The forged all-zero row test catches through the digest, not the draw rule (c2.s1.f4) M2.1, M2.2; Soul MS.1
P2.4 HOLDS An Active AdmitPatch resolves with lens_weights: None and leaves weights unchanged none isolates it; asserted by test
P2.5 HOLDS consumer.v4 stores refused, rerun by Soul; no migration read path M2.5
P2.6 HOLDS in the library and the create payload; UNPROVEN on the browser path Payload refusals, uniform Dungeon default pinned, harness passes weights explicitly. The browser form's bindings never reach the payload fields (L1.f11) M2.6, MH.3; Soul MS.3
P2.7 HOLDS ScopePreimage carries no weights; three scope digests identical across two weight commits. No session draws yet, so "a session keeps its lens" is untested here and owned by Cut 3 MH.1
  • Soul findings, pass 1:
    • c2.s1.f1 (introduced, medium, fix): SetLensWeights with weights equal to the current ones commits: revision advances and the digest moves. Nothing canonical changed, so this breaks the kernel invariant that a no-effect command leaves revision, digests and journal unchanged. The clock tick is not a precedent, because it moves fictional time. Fix: the command returns NoEffect when the weights equal the current weights.
    • c2.s1.f2 (pre-existing, info): replay, the commit count, and verify_state_shape all refuse a stored all-zero state; see c2.s1.f3.
    • c2.s1.f3 (introduced, low, recorded): the verify_state_shape lens clause is not load-bearing. With it removed, replay ("head state does not equal replayed history") and the commit-count check still refuse the row. It is a third layer, as the spec intends.
    • c2.s1.f4 (introduced, low, fix): the all-zero forgery in a_forged_lens_weights_row_fails_replay (journal.rs:1411-1421) is refused by the resulting-state-digest mismatch, so the test still passes with draws() weakened. Fix: build the forgery so its digests are consistent and only the draw rule can refuse it, then mutate draws() to prove it.
  • Fix batch landed: afca403 (c2.s1.f1) and acb9b33 (c2.s1.f4).
    • reduce's SetLensWeights arm refuses a set equal to the current weights with PatchRejected([NoCanonicalChange]), after the capability, owner and draw checks. The kernel has no NoEffect variant; the existing "valid but changes nothing" refusal is used, and the implementation plan's wording is corrected to match.
    • The forged-row test now builds self-consistent forgeries. A control set rebuilt the same way replays, so only the draw rule refuses the all-zero row, at verify_state_shape.
    • Mutations: MF1.1 (the equality check deleted) fails the external and in-crate tests; MF4.1 (draws() changed to !is_empty()) fails the forged-row test.
    • Counts: library 435, doc 10, external_admission 11, Dungeon 53, build_provenance 1, persona-projection 13. Warnings identical.
  • Soul findings, pass 2 (all against acb9b33; promises 1 and 3–7 of the batch held):
    • c2.s2.f1 (introduced, low, fix in Cut 3): the no-op check compares raw maps, but a missing lens reads as weight zero. {charter:3} → {patina:0, charter:3} commits (revision 3 → 4), and changing back commits again. Both sets draw identically. Fix in Cut 3, beside c1.s1.f2: equality compares every lens's effective weight, not the map's spelling.
    • c2.s2.f2 (introduced, low, recorded): only the in-crate test pins that the no-op check comes after the draw rule (mutation SO.2). The external test cannot observe it. One pin is sufficient.
    • c2.s2.f3 (introduced, low, fixed here): this map's Cut 2 spec still said identical weights commit. It is now marked as history above.

Cut 3. The lens and its text on the session, in the store, and the adoption rule

  • Repo/branch: Ghostlight codex/ghostlight-dungeon-mvp from Cut 2's commit. One commit. Depends on Cuts 1–2 and rulings L1-Q1, L1-Q4 (revised: identity unchanged), L1-Q5, L1-Q7 (a), and carries L1-Q9's option C (the adoption rule) because P3.2 is unprovable without it.
  • First: Cut 0's base-session-id.txt and base-mismatches.json in hand; Cut 2 pushed and green; probe 3's boundary stall reproduced once as a temporary test at Cut 2 (it must still say Superseded; that is the before-state the adoption rule removes).
  • Deletes first: elaboration.rs:52 ELABORATION_INSTRUCTIONS as a bare constant referenced by elaboration_request (it moves into lens::instructions()); elaboration.rs:404-405, the whole-session equality checkpoint.session() != &session as the supersession test (it is replaced by the identity comparison below).
  • Keeps and moves: session_command_id (elaboration.rs:1271-1277) is untouched: the lens is not in the identity. select_answer keeps its name and its two arms; it gains the draw and the text.
  • Adds:
    • elaboration.rs:57-66: ElaboratorSession.lens: Lens and ElaboratorSession.instructions: String after ancestry, docs: "Drawn once when the session is first built from its command id, recorded here, and never redrawn; a resumed session reads it back." and "The instruction text this session was built with, persisted as agent_prompt is; integrity binds the stored invocation to this text, not to the code constant." deny_unknown_fields stays.
    • elaboration.rs:642-677 select_answer: after building the identity fields, let command_id = session_command_id(..)?; let lens = lens::draw(&snapshot.lens_weights, snapshot.world_id, command_id)?; instructions: lens.instructions() in both arms (the KernelError maps to ControllerError::Serialization as digest_of does). step at :386 then reuses that id rather than deriving it twice.
    • elaboration.rs:400-412 lookup, the adoption rule (L1-Q9 C): if !checkpoint.session().same_answer(&session) { return Ok(Superseded) } let session = checkpoint.session().clone(); where same_answer compares world_id, jurisdiction, answer and answer_digest only. ancestry, lens and instructions are the row's: ancestry because the world moving is not the answer moving (probe 3), lens and text because a resume never redraws (L1-Q3). Doc: "The row is the recorded session. Identity decides whether it is this answer's row; everything else about the session is read from it."
    • elaboration.rs:1233-1254 elaboration_request(command_id, round, model, instructions: &str, input); callers :445, :584, and :153 pass &session.instructions (the ElaboratorInFlight arm of integrity_is_valid destructures session).
    • elaboration.rs:201-247 valid_elaboration_progression: unchanged; it compares whole sessions, so a checkpoint that changes the lens, the text or the ancestry is an illegal transition. Pin it. (Progression compares rows to rows; adoption compares a fresh derivation to a row. The two rules differ on purpose and the docs on both say so.)
    • controllers.rs:77-78: controller_work.v16 / ghostlight.controller_work.v16.
    • Tests (elaboration.rs tests unless said): the four ElaboratorSession literals at :2399, :2428, :2550, :2574 gain lens: Lens::Patina, instructions: Lens::Patina.instructions(); a_session_identity_is_derived_from_its_answer (:2549) additionally asserts first.to_string() == "<base-session-id.txt>" and that changing lens or instructions leaves the id equal; soul_the_session_command_id_derivation_moved_under_the_refactor (:2398) is unchanged; a_resumed_session_keeps_its_recorded_lens_when_the_weights_change (controllers tests, beside :9497): world created with {patina:1} only; round one is refused and persisted; the owner submits SetLensWeights{{numen:1}} (a commit, so ancestry moves too); a fresh runner over the same store resumes (same id; adoption keeps the row's session) and commits under the same command id with the checkpoint's session.lens == Patina and the second invocation's instructions still naming Patina and its input carrying the first refusal; then a new boundary (a second dead-end route declared by the owner) starts a new session whose lens is Numen; a_boundary_session_resumes_after_an_unrelated_commit (controllers tests; probe 3's boundary half as a permanent test): Rejected, then submit_clock(60), then a fresh runner's step is Committed under the same id and its input carries the refusal; (probe 3's deficit half needs the listing and is Cut 4's a_stranded_deficit_session_is_adopted_with_its_refusal_intact); a_checkpoint_that_changes_the_lens_or_its_text_is_an_illegal_transition: from a persisted ElaboratorInFlight, a next checkpoint identical except lens is refused by the real store with the "illegal checkpoint transition" error; likewise except instructions, likewise except ancestry; a_row_whose_text_and_invocation_disagree_is_refused_at_open (controllers tests, the Q7 probe as a permanent test): a raw row whose stored instructions is "STORED TEXT A" and whose invocation was prepared under "REQUEST TEXT B" fails its checkpoint binding at open, and the same row with both texts equal to a string that is not the current Lens::Patina.instructions() opens (the property (a) buys, stated as such); soul_the_same_patch_admits_the_same_under_every_lens (controllers tests): for each of the eight lenses, a world created with that lens at 1 and every other at 0, the round-one bad shed patch of :9497 yields refusals[0].mismatches JSON equal to base-mismatches.json, and the repaired patch commits; the eight agent_prompts are byte-equal (the prompt carries no lens text) and the eight instructions differ only in the lens clause; the_catalog_takes_no_lens: patch_tools() and patch_tool_signatures() are called with no argument (proof by signature; the test asserts the Tools: line of a lensed prompt equals patch_tool_signatures() byte-for-byte); a_controller_work_row_from_v15_is_refused_at_open (controllers tests): a real lensed ElaboratorInFlight payload under a v15 envelope is refused at open (the shape of :11343), beside the v10/v9 loop.
  • Per-file changes: as listed; docs/architecture/ghostlight-world-ontology.md:308 names controller_work.v16 [Hands]; notes/fresh-workspace-handoff.md:227 [steward].
  • Authority map:
    • Owner: select_answer owns the draw and the text for a new session; the checkpoint row owns the whole session once it exists, and the adoption rule reads it.
    • Inputs: WorldSnapshot.lens_weights, the session's command id, the store's lookup.
    • Outputs: ElaboratorSession.{lens, instructions} in every checkpoint stage; the text on the wire as the system prompt.
    • Derived state: the fresh draw and text are derived and then discarded whenever a row exists (X is no longer an owner; the row's session is).
    • Forbidden writers: a resume path that redraws or re-authors the text (structurally absent: after lookup returns a row, the fresh session value is dropped); a checkpoint transition that changes the lens, the text or the ancestry (refused by row-to-row session equality); the code constant (no longer consulted by integrity for this lane; the seed, narrative and operational lanes keep theirs — L1.f9); a supersession test that reads ancestry (deleted).
    • Shared paths: first run and resume share step's match existing; the real store and RecordingWorkStore share valid_controller_work_progression; the connector and the SDK sidecar both receive request.instructions.
    • Deletion line: ELABORATION_INSTRUCTIONS as the integrity reference and the whole-session supersession equality are gone before the new fields are read; controller_work.v15 rows become refused.
  • Verification:
    • builds: as Cut 2.
    • tests: cargo test -p ghostlight = Cut 2 count + new; sdk_inference::tests::schema_fixtures_match_the_checked_in_sidecar_grammar passes without regenerating the fixture (the diff shows sidecar/claude-sdk/test/schemas.json unchanged); Dungeon 53 unchanged.
    • negative: rg -n 'controller_work\.v15' crates = 0 outside the new refusal test; git diff Cut2..Cut3 -- crates/ghostlight/src/patch.rs sidecar is empty; rg -n 'ELABORATION_INSTRUCTIONS' crates/ghostlight/src = 1 (its definition in lens.rs); rg -n 'lens' crates/ghostlight/src/controllers.rs matches only tests and the two constants' doc lines; rg -n 'session\(\) != &session' crates/ghostlight/src/elaboration.rs = 0.
    • captures compared: patch_tool_signatures() and the patch_tools() digest equal base-catalog.txt (same method).
    • mutations: M3.1 elaboration.rs adoption rule: restore whole-session equality: a_resumed_session_keeps_its_recorded_lens_when_the_weights_change and a_boundary_session_resumes_after_an_unrelated_commit must fail (Superseded). M3.2 elaboration.rs adoption rule: keep the fresh session instead of the row's: the same test must fail on the checkpoint's lens or on the illegal transition. M3.3 elaboration.rs select_answer: draw from stock_weights()-shaped uniform weights instead of the snapshot: the eight-lens test (each world with one nonzero lens) must fail. M3.4 elaboration.rs:205 existing.session() != next.session() → compare identity fields only: a_checkpoint_that_changes_the_lens_or_its_text_is_an_illegal_transition must fail. M3.5 integrity_is_valid: pass Lens::Patina.instructions() instead of session.instructions: a_row_whose_text_and_invocation_disagree_is_refused_at_open's second half (a non-current text opens) must fail. M3.6 session_command_id: append session.lens.name() as a part: a_session_identity_is_derived_from_its_answer's base-UUID pin must fail.
  • Promises:
    • P3.1 The lens is drawn once, when no row exists, from the snapshot's weights and the session's command id; the command id derivation is byte-identical to base (the captured UUID is reproduced).
    • P3.2 A resumed session keeps its recorded lens, text and ancestry across a weight change, an unrelated commit, a fresh runner, and a store reopen; a row-to-row checkpoint that changes any of them is refused; a boundary session is no longer reported Superseded by the world merely moving.
    • P3.3 The same patch admits the same under every lens (pinned against the base mismatch set).
    • P3.4 The catalog is lens-independent by signature; the sidecar fixture and patch.rs are untouched.
    • P3.5 controller_work.v15 rows are refused at open; no migration.
    • P3.6 Integrity binds the stored invocation to the stored text; a row whose two disagree is refused, and a row whose text is not the current code's still opens (the (a) trade, stated).
    • P3.7 Deficit rediscovery after an unrelated commit is Cut 4's promise (P4.6), not this cut's; no test in this cut is ignored.
  • Landed: dfb3c52 (c1.s1.f2, the draw's divisor guarded directly), 4334dd7 (c2.s2.f1, lens sets compared by effective weight), 18b1098 (Cut 3 proper; carries two unfulfilled-expectation warnings that the next commit removes), 4457fde (c1.s1.f3, markers removed), 2bf8164 (non-adoption across world or jurisdiction). session_command_id now takes (world_id, jurisdiction, &answer_digest), so the lens is absent by signature; the derivation bytes are unchanged.
  • Verdicts: Soul pass 1 against 2bf8164.
Promise Verdict Evidence Mutations
P3.1 HOLDS for identity; UNPROVEN that the call-site draw reads the command id (c3.s1.f2) The UUID pin equals Cut 0's 56dbcdb2…; session_command_id takes no session M3.6a, M3.6b kill; Soul S3 (draw with CommandId::new()) survives
P3.2 HOLDS; its illegal-transition pin is flaky (c3.s1.f1) At 1a402e1 the boundary test failed as Superseded; it now commits through a store reopen with the refusal intact. The weights test keeps the recorded lens across reopen. Lens, text and ancestry transitions are each observed accepted under M3.4 and refused without it M3.1, M3.2, M3.4; Soul S1 kills
P3.3 HOLDS Eight-lens admission equals base-mismatches.json; prompts byte-equal M3.3
P3.4 HOLDS Catalog signatures and digest rerun, equal to Cut 0; no patch.rs or sidecar diff signature proof
P3.5 HOLDS v15 row refused at open; the same payload under v16 opens none
P3.6 HOLDS Disagreeing stored text and invocation refused; agreeing arbitrary text opens. Nothing pins that resume uses the stored text (c3.s1.f3) M3.5 kills; Soul S5 survives committed tests
P3.7 HOLDS Deficit orphan reproduced as base behaviour; no ignores added none
c1.s1.f2 HOLDS Divisor guarded (lens.rs:195-203); no panic with draws() weakened MF2.1
c2.s2.f1 HOLDS weighs_the_same_as over Lens::ALL; padded twins refused in both directions through the mailbox MF21.1
c1.s1.f3 HOLDS Markers gone; forced-rebuild warnings identical to Cut 2 none
  • Soul findings, pass 1:
    • c3.s1.f1 (introduced, medium, fix): flaky pin. controllers.rs:10221 rewrites session.lens = Lens::Numen, but refused_checkpoint() draws under uniform weights with a random world id. About one run in eight the recorded lens is already Numen, and assert_ne!(next, checkpoint) (:10230) fails. Soul observed 2 failures in 9 runs.
    • c3.s1.f2 (introduced, low, fix): every lens-observing test uses a single-lens world, so the draw is forced. A call site that draws with an unrelated command id (S3) survives. Only lens.rs unit tests pin the recipe.
    • c3.s1.f3 (introduced, low, fix; the untested Q7 ruling): mutation S5, which rebuilds the resumed text from session.lens.instructions() (:476), survives every committed test. No test proves that a session resumes with its stored text after the lens's text changes in code, which was the purpose of L1-Q7 (a). Recorded cost within Q7: nothing ties a row's stored text to its recorded lens. A row with arbitrary text or another lens's text, invocation prepared to match, opens and drives inference with that text. Only the local store file can write it (pub(super) fields).
    • c3.s1.f4 (pre-existing, low-medium, recorded): see L1.f13 (seed lane).
    • c3.s1.f5 (pre-existing orphaning, lens re-roll introduced, low, recorded): the boundary's scope preimage includes the route record (lib.rs:3892-3899). A caller with patch authority who alters a lane's cost moves the digest while the boundary survives. The next session re-rolls its lens and the in-flight row is orphaned. Containment, occupant or incident changes remove the boundary outright (lib.rs:3878-3884). A fresh session after a real structural change is arguably correct; the orphan row adds to orphan hygiene.
    • c3.s1.f6 (info): dropping answer_digest from same_answer (S2) is an equivalent mutant, because the id already carries the digest.
  • Test-only fix batch landed: f63dfd1 (c3.s1.f1), b3b5053 (c3.s1.f2), 2c3b513 (c3.s1.f3). Production diff against ef64008 is empty; all hunks are inside controllers.rs's test module.
    • c3.s1.f1: at ef64008 the illegal-transition test failed 3 of 40 looped runs. The lens rewrite now always differs from the recorded lens, and 120 of 120 runs passed.
    • c3.s1.f2: a_fresh_session_draws_its_lens_from_its_own_command_id checks eight worlds under stock weights through the real call site, asserting the premise that an unrelated id draws differently. S3 (draw with CommandId::new(), elaboration.rs:713) now fails it, against b3b5053.
    • c3.s1.f3: a_resumed_session_keeps_its_stored_text_when_the_lens_text_changes resumes a real-store row whose stored text differs from the lens's current text and asserts every later inference carries the stored text. S5 (elaboration.rs:476, the text rebuilt from the lens) now fails against 2c3b513. It is caught first by the store refusing the mutant's checkpoint; the text assertion is a second guard.
    • Counts: library 445 (444 + 1 ignored), doc 10, external_admission 12, Dungeon 53, build_provenance 1, persona-projection 13. Warnings identical to Cut 3.
    • No separate Soul pass on this batch. It is test-only with an empty production diff and defined, killed mutations. Cut 4's Soul pass reruns S3 and S5 independently.

Cut 4. Concurrent sessions over a per-sweep claim set, under the elaboration ceiling

  • Repo/branch: Ghostlight codex/ghostlight-dungeon-mvp from Cut 3's commit. One commit (library and Dungeon driver together: the sweep signature changes and the second pool is born). Depends on Cut 3 and ruling L1-Q4.
  • First: Cut 3 pushed and green; probe 1's collision reproduced once more at Cut 3 as a temporary test through two direct step_session calls (it must still collide there; that is the before-state this cut makes unreachable).
  • Deletes first:
    • crates/ghostlight/src/elaboration.rs:603-632: the sequential sweep loop and its comment about eight tasks and a capacity-32 mailbox (30 lines).
    • elaboration.rs:328-342: ElaborationOutcome::Inactive if no arm produces it after the phase check moves to sweep (the compiler decides; delete, do not allow(dead_code)).
    • crates/ghostlight-dungeon/src/runtime.rs:1821-1822: the "One sequential sweep per wake" doc lines; :1080-1081 "There is no second concurrency owner" becomes "Two pools, one per lane; neither lane draws from the other's."
  • Keeps and moves: step(jurisdiction) becomes step_session(session: ElaboratorSession, snapshot: &WorldSnapshot) with the body from :386 on; the phase check moves to sweep.
  • Adds (library):
    • elaboration.rs: fn demand_entries(snapshot) -> Result<Vec<ElaboratorSession>, ControllerError>: for each jurisdiction of scale_deficit plus Uncovered (the list :609-617 builds), every boundary boundary_in admits in snapshot order, then the deficit entry when the row is nonzero, each through Cut 3's select_answer shape (pure over the snapshot); a boundary under nested roots appears under each covering root, so the list is deduped by command id keeping first occurrence. The claim set is this Vec, alive for one sweep and never persisted. Rediscovery (L1-Q9 A): sweep calls self.work.elaboration_in_flight() once per sweep, before drawing anything, and demand_entries takes that list: for each demand entry, if exactly one listed row has the same world_id, jurisdiction and answer (ancestry, lens and text ignored), the entry is that row — its session and its command id are adopted and no draw happens; if none, a fresh session is built as above; if more than one (which the dedup and one-sweep-at-a-time make impossible from this code, but a store can hold anything), the oldest by stored_at is adopted and the rest are logged at warn as orphans. A deficit entry adopted this way keeps its old ancestry and old id; require_answer re-checks the deficit at commit (lib.rs:1706-1712), so the ancestry is informational, and the repair prompt still carries the refusal the model saw. The command id stays the kernel's idempotency key and stops being the only way to rediscover work; step_session's lookup by id and Cut 3's adoption rule remain the second line for the boundary path.
    • controllers.rs:1541 region: ControllerWorkStore::elaboration_in_flight(&self) -> Result<Vec<(CommandId, ElaboratorSession)>, ControllerWorkStoreError> as a required trait method (no default body: a store that cannot list must say so at compile time). CultCacheControllerWorkStore answers it from the in-memory journal.work map (:1662-1667 shape): one pass over the rows, filtering ControllerWork::Elaboration in ElaboratorInFlight or ReadyToSubmit (not NoPatch), after verify_journal_custody as lookup does. Cost O(rows) over a map of tens to hundreds of entries, run once per sweep (every 300 s), never per entry and never per step; no index, no schema, no new row. RecordingWorkStore (:8339) implements it the same way over its work map. Dungeon's test stores (AlwaysFreshWorkStore runtime.rs:3194 and its siblings) return Ok(Vec::new()), which is true of them.
    • elaboration.rs: pub async fn sweep(&self, permits: Arc<tokio::sync::Semaphore>) -> Result<(), ControllerError>: snapshot; return Ok(()) unless Active; demand_entries; a tokio::task::JoinSet; for each entry let permit = permits.clone().acquire_owned().await (a closed semaphore ends the sweep with Ok(())), spawn a task that holds the permit across step_session (the runner derives Clone; every field is Arc or Clone); collect; a requires_quarantine error is returned after every task has finished (so no task is orphaned), others are tracing::debug! as today. Doc: "One permit per session for its whole step, from the ceiling the caller owns. The library holds no concurrency number of its own."
  • Adds (Dungeon):
    • runtime.rs:68-96 AppState.elaboration_permits: Arc<Semaphore> beside controller_permits, doc: "The elaboration ceiling. controller_permits is the simulation budget: speak turns and cover cells, and nothing else, draw from it."; :355 region: Arc::new(Semaphore::new(configured_elaboration_ceiling())); :1866-1872 region: fn configured_elaboration_ceiling() -> usize reading GHOSTLIGHT_ELABORATION_MAX_CONCURRENT, >= 1, default 2, with the doc: "A ceiling, not a budget: the most sessions elaboration may run at once. Nothing reserves connector capacity for it; a connector capacity refusal is a retryable fault the next sweep retries." :1837: runner.sweep(state.elaboration_permits.clone()); :1817-1822 doc: sweeps still never overlap (the loop awaits the sweep), so one sweep's claim set is the only set of sessions alive. Test fixtures at :2602 gain the second semaphore (TEST_ELABORATION_CEILING = 2). docs/architecture/ghostlight-dungeon-mvp.md:478 names both variables [Hands].
  • Tests:
    • Library (controllers tests): distinct_entries_run_at_once_under_the_ceiling: a world with two boundaries (two dead-end routes from the commons; the fixture at :9402 plus one route), a counting port that records the maximum simultaneous infer calls and yields inside infer, pool of 2 → maximum 2, two distinct rows, both Committed, two distinct provider request ids; the_sweep_never_exceeds_its_ceiling: same world, pool of 1 → maximum 1; a_sweep_holds_a_permit_while_it_infers: pool of 1 already held by the test → no infer call until the permit is released (release after a timeout; zero calls before, one after); one_answer_is_one_session_per_sweep: with one boundary and pool 2 the sweep runs exactly one session (custody elaboration_commands == 1, one infer); a_boundary_under_nested_roots_is_claimed_once: the two-root world of :11605 with a boundary inside the inner root runs one session for it; a_deficit_entry_is_one_per_jurisdiction_per_ancestry: a world with a deficit and no boundary runs one session per sweep and a second sweep after a Committed session runs a new id (a finished row is not in flight and is not adopted).
    • Library, rediscovery (controllers tests, probe 3 as permanent tests through sweep with a pool of 1): a_stranded_deficit_session_is_adopted_with_its_refusal_intact: the deficit world of probe 3; sweep one ends Rejected (one row, one refusal); submit_clock(60); sweep two ends Committed under the first command id, the second invocation's input carries the first refusal, infer was called exactly twice across both sweeps (once per sweep: no repeated round), and custody elaboration_commands == 1; a_boundary_session_is_repaired_after_a_commit_and_a_tick: the boundary world; sweep one Rejected; the owner admits an unrelated operations-only patch, then submit_clock(60); sweep two Committed under the same id with the refusal in its input, one row; the_store_gains_no_orphan_per_commit: the deficit world; after sweep-Rejected, five clock ticks each followed by a sweep whose script keeps refusing (bad shed every round, budget permitting), the store holds one elaboration row and infer was called once per sweep; a_row_for_another_answer_is_not_adopted: rows shaped like real ones that must not match — a real ElaboratorInFlight row for the same deficit answer under a different jurisdiction (the two-root world of :11605, deficit under root B, sweep for root A), a real row whose world_id differs (a second world file's row copied into the first store through the raw backing store, with a valid envelope and canonical bytes), and a real NoPatch row for the same answer — the sweep builds a fresh session for the entry in each case, and the foreign-world and other-jurisdiction rows are left untouched (their bytes equal before and after).
    • Dungeon (runtime.rs tests): saturating_one_pool_never_delays_the_other as specified under L1-Q4: hold all elaboration permits, run run_cover_tick on active_two_cell_world with a counting port, both cells run within a bounded wall time; hold all simulation permits, run elaborator().sweep(state.elaboration_permits.clone()) on a world with one boundary, one infer completes. the_tick_driver_never_exceeds_its_controller_permit_pool (:3269) is unchanged and still passes on the simulation pool.
  • What makes probe 1's path unreachable after this cut. The loser died at persist on the _ => false arm because two sessions shared one command id and raced on one row. After this cut every session alive in the process is one entry of one sweep's claim set, deduped by id, started by sweep alone (step_session is pub(super); the seed lane has its own runner), and sweeps do not overlap (runtime.rs:1827-1839 awaits one before ticking the next). Two sessions with one id would need two entries with one id in one claim set, which the dedup forbids, or two overlapping sweeps, which the driver forbids and the library does not guard (stated under Forbidden writers). The _ => false arm stays as the store's refusal of any such row, and one_answer_is_one_session_per_sweep is the positive form of the deleted probe.
  • Per-file changes: elaboration.rs:603-632 replaced; :375-386 split; runtime.rs:68-96, :355, :1080-1081, :1817-1841, :1866-1872, :2602; docs/architecture/ghostlight-world-ontology.md:668 rewritten as the live rule: "Sessions run concurrently over distinct demand entries — every open boundary and one deficit per jurisdiction — each drawing its lens by the world's weights and recording it, each holding one permit of the elaboration ceiling; a sweep first reads the store's in-flight sessions and resumes any that answer a current demand entry; the sweep is one at a time." [Hands]; ghostlight-world-ontology.md:773-775 "Sessions" bullet: the "in Draft" clause stays target (L3) [Hands]; ghostlight-dungeon-mvp.md:473-479 names the two pools [Hands]; notes/fresh-workspace-handoff.md:284-290 [steward].
  • Authority map:
    • Owner: sweep owns which sessions exist in a wake (the claim set); the caller's elaboration Semaphore owns how many infer at once; the simulation Semaphore owns speak turns and cover cells; the mailbox owns commit order.
    • Inputs: one snapshot per sweep; the elaboration pool; the store's in-flight listing once per sweep (L1-Q9 A) and its lookup by id inside each step_session (Cut 3's adoption rule).
    • Outputs: one step_session per distinct entry.
    • Derived state: the claim set (never stored).
    • Forbidden writers: any second sweep concurrent with the first (the runtime loop awaits; the library does not guard it — stated); any caller starting step_session directly (pub(super)); any library-side concurrency number; any lane acquiring the other lane's pool; a fresh draw or a fresh id for an answer that has an in-flight row (the listing is consulted before any draw); the command id as the sole rediscovery path (deleted as such).
    • Shared paths: every session takes the same permit path and the same step_session; a test port and the production port see the same PreparedInference; both pools are read at open by the same shape of function.
    • Deletion line: the sequential loop is gone before JoinSet is written.
  • Verification:
    • builds: cargo check -p ghostlight-dungeon --bin ghostlight-dungeon (the signature change and the second pool are the Dungeon edits).
    • tests: cargo test -p ghostlight = Cut 3 count − any deleted probe + new; Dungeon 53 + 1 with the same base names.
    • negative: rg -n 'for jurisdiction in jurisdictions' crates/ghostlight/src = 0; rg -n 'fn step\(' crates/ghostlight/src/elaboration.rs = 0 (only step_session); rg -n '\.sweep\(\)' crates = 0 (checked at base: the only sweep() calls are runtime.rs:1837 and :3934, the ignored road test, which must also pass the elaboration pool; the seed lane's sweep(1) at :1809 is a different function and does not match); rg -n 'Semaphore' crates/ghostlight/src = the sweep signature and its doc only; rg -n 'controller_permits' crates/ghostlight-dungeon/src lists no line inside elaborate_world; rg -n 'elaboration_permits' crates/ghostlight-dungeon/src lists no line inside run_cover_tick or the speak handler.
    • mutations: M4.1 elaboration.rs sweep: drop the acquire_owned (spawn without a permit): the_sweep_never_exceeds_its_ceiling and a_sweep_holds_a_permit_while_it_infers must fail. M4.2 demand_entries: remove the dedup by command id: a_boundary_under_nested_roots_is_claimed_once must fail. M4.3 sweep: return on the first error instead of after the JoinSet drains: distinct_entries_run_at_once_under_the_ceiling with one scripted Retryable fault must fail on the orphaned task's missing commit. M4.4 runtime.rs:1837: pass state.controller_permits instead of elaboration_permits: saturating_one_pool_never_delays_the_other's second half must fail. M4.5 demand_entries: skip the listing (always build fresh): a_stranded_deficit_session_is_adopted_with_its_refusal_intact must fail (Committed under a new id, three infer calls, two rows) and the_store_gains_no_orphan_per_commit must fail (six rows). M4.6 demand_entries: match on world_id and answer only (drop jurisdiction): a_row_for_another_answer_is_not_adopted's other-jurisdiction case must fail. M4.7 demand_entries: match on jurisdiction and answer only (drop world_id): its foreign-world case must fail. M4.8 CultCacheControllerWorkStore::elaboration_in_flight: include NoPatch rows: its NoPatch case must fail. M4.9 elaboration.rs adoption rule (Cut 3's same_answer) restored to whole-session equality while the listing stays: a_boundary_session_is_repaired_after_a_commit_and_a_tick must fail (Superseded), which proves the two halves are separately necessary.
    • operator: one GHOSTLIGHT_SMOKE_TRACE road run (runtime.rs:3738, ignored) after this cut with GHOSTLIGHT_ELABORATION_MAX_CONCURRENT=2: the trace shows two elaboration sessions in one sweep when the seeded world has several boundaries, never more than two, and cover ticks proceeding while they run.
  • Promises:
    • P4.1 Two sessions in one sweep never share a command id, a store row, or a provider request id; probe 1's collision cannot be reproduced through sweep.
    • P4.2 Sessions in one sweep run concurrently up to the elaboration ceiling and never beyond it; a sweep with no permit available makes no inference.
    • P4.3 Saturating either pool never delays the other lane.
    • P4.4 The sequential loop is deleted; no library-side concurrency number exists; the two pools are configured by two named variables with the stated defaults.
    • P4.5 A quarantine-class error still ends the sweep with Err, after every spawned session has finished.
    • P4.6 A stranded deficit session is adopted by what it answers: it resumes under its first command id with its refusal in the next invocation and no repeated round.
    • P4.7 A boundary session is repaired after an unrelated commit and a clock tick, under its id, with its refusal in the next invocation.
    • P4.8 The store gains no orphan elaboration row per commit; rows for another jurisdiction, another world, or a finished (NoPatch) session are never adopted and never touched.
    • P4.9 elaboration_in_flight runs once per sweep and every ControllerWorkStore implements it (no default body).
  • Landed: 8538fab (store listing method), 6150bd7 (pool split; one field-never-read warning that the next commit removes), b3963f9 (concurrent sweep, demand_entries with rediscovery, step_session; the sequential loop, step, Clean and Inactive deleted), bc31d11 (run_elaboration_sweep extracted; no session starts after a quarantine error), 3e35b3d (ReadyToSubmit boundary test; permit recording). Before the cut, Hands reproduced probe 1 at d9b71c4: one commit, one illegal-transition death.
  • Verdicts: Soul pass 1 against 3e35b3d.
Promise Verdict Evidence Mutations
P4.1 HOLDS One session per answer per sweep; distinct entries run at once; loops 30/30 MD1, M4.2b kill; M4.2a equivalent (the answer dedup makes the id guard dead)
P4.2 HOLDS Permit held while inferring; high water equals ceiling; no leak on retryable error or panic (Soul probes D, E) M4.1
P4.3 HOLDS for cover cells and the sweep; UNPROVEN for player speak turns (c4.s1.f2) Two Semaphore::new at runtime.rs:364-365; speak :1092 and cover :2009 on simulation; sweep :1855 on elaboration M4.4, MC1, MC2 kill; Soul MC3 (speak on elaboration) survives
P4.4 HOLDS Sequential loop gone; defaults 2 (minimum 1) and 4 read at runtime.rs:1894, :1905 none
P4.5 HOLDS on error paths; FALSIFIED on the panic path (c4.s1.f4) Quarantine error returned after started sessions finish; none start after one. A panicking task unwinds the sweep, aborts its sibling, and ends the runtime driver M4.3, M4.3b, MQ kill; Soul MS3 survives (c4.s1.f5)
P4.6 HOLDS Stranded deficit adopted under its first id with its refusal and no repeated round; Soul probe C1 M4.5
P4.7 HOLDS with the substitute (SetLensWeights plus a clock tick for the operations-only patch) Boundary repaired. The id-only resume path is pinned by the ReadyToSubmit test M4.9 survives this test (c4.s1.f1)
P4.8 HOLDS as stated; see c4.s1.f8 for long-run growth One row across five ticks; no adoption across jurisdiction, world, or a NoPatch row; foreign bytes unchanged M4.5–M4.8
P4.9 HOLDS Listing read once per sweep; required method with no default MP
  • Departure measured, now L1-Q10. The listing returns only ElaboratorInFlight rows, not ReadyToSubmit. Soul's probes:

    • Including them (MR1): a committed session's row is adopted every later sweep and resubmitted (AlreadyApplied), with no inference, and the deficit is stuck forever.
    • Excluding them, crash window with no commit (C1): the row is found by id, submitted, and the deficit advances.
    • Excluding them, crash window with a commit (C2): a new id and a fresh session, one repeated round, and the authored row orphaned. The deficit is not stalled.

    Hands' stated cost is accurate.

  • Soul findings, pass 1:

    • c4.s1.f1 (introduced, medium, fix): Cut 3's adoption rule now depends on one test. M3.1 and M4.9 are the same text (elaboration.rs:425), and over the full suite only a_boundary_row_ready_to_submit_is_submitted_after_a_tick fails. The sweep passes the listed row's own session to step_session, so same_answer is trivially true on every adopted path, and Cut 3's two former killers no longer reach the rule.
    • c4.s1.f2 (introduced, medium, fix): player speak turns drawing from elaboration_permits (runtime.rs:1092, MC3) survive all Dungeon tests. Pool independence is unproven for the speak lane.
    • c4.s1.f3 (pre-existing gap, moved by this cut, low-medium, fix): deleting the phase != Active return in sweep (elaboration.rs:645, MS5) survives all 458 tests. A Draft or Archived world would list, draw, infer and be refused every 300 seconds.
    • c4.s1.f4 (pre-existing in effect, medium, fix, Authority self-under-standing-go): a panic inside one session task resume-unwinds out of sweep (elaboration.rs:695) and aborts the sibling mid-inference, leaving its row ElaboratorInFlight. It ends the driver task spawned at runtime.rs:410, whose handle is dropped, so elaboration stops silently until restart. No permit leaks, and the next healthy sweep would adopt both rows. Fix: a task panic becomes an error returned after started siblings finish, and the driver keeps running and logs it. Whether that error quarantines stays with L1.f1; existing log-only handling is kept.
    • c4.s1.f5 (introduced, low, recorded): swapping the quarantine stop flag and the permit release (MS3) is unobservable on the current-thread test runtime; P4.5's ordering holds by code order only.
    • c4.s1.f6 (introduced, low, recorded): adopting the newest orphan or listing newest-first (MS1, MS4) survives; the spec calls multiple rows per answer unreachable from this code.
    • c4.s1.f7 (pre-existing, moved, low-medium, fix): the Uncovered jurisdiction is never exercised through the sweep; dropping its push (MS2, elaboration.rs:733) survives.
    • c4.s1.f8 (pre-existing, recorded as L1.f14): stored rows are never retired.
    • Cut 3's pins after the rerouting: S3 is killed only by a_fresh_session_draws_its_lens_from_its_own_command_id; S5 only by a_resumed_session_keeps_its_stored_text_when_the_lens_text_changes.
    • Counts: library 459 (458 + 1 ignored), doc 10, external_admission 12, Dungeon 54 (53 + 1 ignored), build_provenance 1, persona-projection 13. Forced-rebuild warnings identical to Cut 3.
  • Panic handling ruled: a session-task panic becomes an error returned after already-started siblings finish, no new session starts after it, and the runtime driver keeps running and logs it. Whether it quarantines stays with L1.f1. Authority: operator (agreed to c4.s1.f4's stated fix). Ruled: 2026-09-16.

  • Fix batch landed: 6f35229 (c4.s1.f1), c90b5a0 (c4.s1.f3), a3d109b (c4.s1.f7), 4b50130 (c4.s1.f2), 0764842 (c4.s1.f4).

    • c4.s1.f1: a_finished_boundary_session_stays_finished_after_the_world_moves joins the ReadyToSubmit test in killing M3.1. Reachability, traced by Hands and attacked by Soul: through the sweep, the adoption rule changes behaviour only for ReadyToSubmit boundary rows found by id. Listed rows receive their own session. A changed answer moves the id, because the id hashes the scope digest. Deficit ids carry ancestry. Otherwise only a digest collision reaches it.
    • c4.s1.f3: a_draft_world_is_not_swept checks no listing read, no inference, no row, a whole pool, and an unchanged revision. WorldPhase has no Archived case. MS5 is killed.
    • c4.s1.f7: the_sweep_claims_work_no_root_covers sweeps a MissingStructure boundary on an unpositioned debtor under Uncovered. MS2 is killed.
    • c4.s1.f2: a_speak_turn_and_a_sweep_draw_only_from_their_own_pools drives a speak turn through the production HTTP router and a sweep, reads both pools inside the provider boundary, and exhausts each pool in turn. MC3 and M4.4 are killed; 30/30.
    • c4.s1.f4: a SessionPermit guard's Drop sets the per-sweep stop flag before releasing the permit, unless the session returned normally without a quarantine-class error. A task that did not return becomes ControllerError::Serialization("an elaboration session did not return: …"), quarantine-class and returned after every started sibling finishes. elaborate_world takes its interval. Tests: a_panicking_session_lets_its_sibling_finish, no_session_starts_after_a_panic, the_elaboration_driver_survives_a_panicking_sweep. R1 (restore resume_unwind), R2 and RQ are killed; 30/30.
    • Counts: library 464 (463 + 1 ignored), Dungeon 56 (55 + 1 ignored), doc 10, external_admission 12, build_provenance 1, persona-projection 13. Distinct warnings identical to 21edeca.
  • Soul findings, pass 2 (promises 1–6 of the batch held; the guard releases its permit exactly once on normal return, retryable error, quarantine, panic, and cancellation of the whole sweep; a panicked session is adopted next sweep without duplicating its refusal; R1 fails the driver test by the driver ending, not a timeout):

    • c4.s2.f1 (pre-existing gap, low-medium, fix): the guard's "a retryable error does not raise stop" leg is unpinned. Mutation held.stop = outcome.is_err() (elaboration.rs:677) survives, because the retryable test uses a pool of 2. A pool-of-1 probe with a retryable first call kills it. A regression would end every sweep at the first connector-capacity fault.
    • c4.s2.f2 (pre-existing gap, low-medium, fix): Uncovered is pinned only when no deficit row exists. Pushing it only in that case (elaboration.rs:759) survives. A world with a root in deficit and an unrooted debtor would never sweep the debtor's MissingStructure.
    • c4.s2.f3 (pre-existing, low, fix by deletion): same_answer's answer_digest comparison (elaboration.rs:86) never decides, because the id already binds the digest. Equivalent under two Soul passes (c3.s1.f6, this pass).
    • c4.s2.f4 (introduced by design, low, L1.f1): a panic inside persist poisons the journal lock (controllers.rs:1694 maps poison to WorkPersistence). Every later sweep then errors, and the driver logs it only at debug (runtime.rs:1856), so an operator would not see a wedged elaboration lane. Evidence for the L1.f1 ruling, not a fix here.
  • Second fix batch landed: 635123f (c4.s2.f2), 2b4b833 (c4.s2.f1), 872ba35 (c4.s2.f3, the deletion in its own commit).

    • c4.s2.f1: a_retryable_fault_does_not_stop_the_sweep kills held.stop = outcome.is_err(). It uses a pool of 1, so the second session exists only after the first faults; 30/30.
    • c4.s2.f2: the_sweep_claims_uncovered_work_beside_a_root_in_deficit kills the mutation that pushes Uncovered only when there is no deficit.
    • c4.s2.f3: && self.answer_digest == other.answer_digest removed from same_answer. Counts unchanged; session_command_id still hashes the digest, and two tests fail if it stops.
  • Soul's final pass (against b15ade4; all three code items sound):

    • The retryable-fault test cannot pass through overlap: the only permit is held through step_session.
    • The deletion is safe: same_answer's single caller compares a session whose id already binds the digest. One behaviour change: a forged row under a derived id with a different digest is now adopted instead of Superseded. Row integrity never bound id to digest, and the foreign-row test already accepts adoption of copied rows.
    • The Uncovered gap remaining is L1.f15.
    • Doc findings: the ontology loop claimed seed requests and Vault evidence for the Active sweep, the handoff said "title weights", and map.yaml did not name L2. All three fixed at close-out.
    • Soul's forced rebuild left an empty untracked crates/ghostlight-dungeon/src/lib.rs. It was verified empty and untracked, then removed.

L1-Q10 Whether the in-flight listing excludes rows ready to submit

  • Asked: 2026-09-16, from Hands' departure on Cut 4, measured by Soul.
  • Context: see "Departure measured" above.
  • Options: A, exclude ReadyToSubmit rows: no stall, and a crash between persist and submit followed by a commit costs one repeated round and one orphan row. B, include them: every committed deficit stalls permanently. C, include them and retire a row when resubmission answers AlreadyApplied: closes the crash window, but needs a row-retirement path that does not exist yet (L1.f14).
  • Recommendation: A now, with the crash window and C recorded under L1.f14, which owns row retirement.
  • Depends on it: nothing else in L1.
  • Ruling: A. The listing excludes ReadyToSubmit rows. The crash window and option C are recorded under L1.f14. Authority: operator. Ruled: 2026-09-16.

Cut 5. Reconcile the target and the maps

  • Repo/branch: Ghostlight codex/ghostlight-dungeon-mvp from Cut 4's commit. Text only; one commit; may be folded into Cut 4's landing commit by the root agent.
  • First: Cuts 1–4 pushed; Soul verdicts recorded here.
  • Deletes first: docs/architecture/ghostlight-stock-lenses.md:92-105 ("Questions for Imagination to bring back") — the rulings live here.
  • Keeps and moves: none.
  • Adds: ghostlight-stock-lenses.md:3-8 status paragraph rewritten to the derived rule ("open until the cut map's cuts are closed"); its "Known constraints" section rewritten as the live design (identity unchanged, lens and text on the session, v16, consumer.v5, world_create.v4, sweep(ceiling), two pools, the adoption rule); the target's invariant 3 gains "the lens is recorded on the session and is not part of its identity", invariant 4 names SetLensWeights as the second writer, invariant 5 names the two pools, and invariant 6 gains "the world moving does not supersede a session; only its answer moving does". The target's "Out of scope" keeps D1–D3 but notes world_create.v4 landed here by ruling L1-Q6. notes/ghostlight-implementation-plan.md:878: L1 marked landed with the commit range [Hands]. notes/fresh-workspace-handoff.md, notes/ghostlight-current-system-map.md, state/map.yaml [steward].
  • Verification: rg -n 'Shipped: the sweep runs one sequential' docs notes = 0; rg -n 'consumer\.v4|controller_work\.v15|world_create\.v3' docs notes state/map.yaml matches only the L0 history documents, notes/local-live-smoke.md, and evidence.
  • Promises: P5.1 No document describes the sequential unlensed sweep as the live system. P5.2 Every schema string in the live docs matches lib.rs:172-173, controllers.rs:77-78 and eve.rs:614.
  • Landed: 39b2af4 (ontology), 04fd004 (plan, handoff, map.yaml), b15ade4 (MVP doc), and close-out fixes by the root agent. The source anchors in P5.2 have moved to lib.rs:174-175, controllers.rs:78-79 and eve.rs:627.
  • Verdicts: Soul's final pass against b15ade4, plus the close-out fixes.
Promise Verdict Evidence Mutations
P5.1 HOLDS after close-out No live doc describes the sequential sweep; the target doc was rewritten at close-out. Soul found the ontology loop claiming seed requests and Vault evidence for the Active sweep; fixed none; doc claims checked against source
P5.2 HOLDS consumer.v5, controller_work.v16 and world_create.v4 in the live docs match source. The remaining older names are marked history (L0 docs, plan steps 13 and 14, smoke runs, map step 13) none

Subtraction ledger

Cut Removed (estimate) Added (estimate) Deps / formats / targets Actual
0 — — scratch captures only scratch captures only, no repo change
1 0 lens.rs ~150 + tests ~130; lib.rs 2 lines + test helper ~6 0 deps; 0 targets lens.rs +372 (217 code, 155 tests; the tool tables are one name per line under rustfmt); lib.rs +7; elaboration.rs 1 line changed; 0 deps; 0 targets
2 ~6 (doc lines replaced, the v2 denial case) library: state field, command, effect, two reducer arms, resolve param, mismatch variant, snapshot field, replay check ~90; 19 literal sites × 1 line; tests ~220; Dungeon: payload field, policy fn, Eve control and binding, three schema strings, harness ~40; tests ~60; docs ~8 0 deps; consumer.v4 → v5; world_create.v3 → v4 12 files, +825 / −40: production ~130 across lib.rs, patch.rs, journal.rs, mailbox.rs, action.rs, runtime.rs, eve.rs plus 20 construction sites; tests ~650 (refusal matrix, direct apply_effect half, forged rows, state rows, replay). 0 deps; the two schema bumps as estimated
3 ~4 (the constant as integrity reference, the whole-session supersession equality) session fields, draw and text in select_answer, adoption rule, request param ~60; tests ~200; docs ~3 controller_work.v15 → v16 6 files, +1071 / −113: production about +100 / −60 (elaboration.rs session fields, same_answer, adoption, draw in select_answer, request parameter, id signature, the constant deleted; lens.rs the constant moved in, the divisor guard, weighs_the_same_as, markers removed; lib.rs one call; controllers.rs two constants); tests about +890 (real-store tests, fixture generalization, two added tests); docs 1 line. controller_work.v15 → v16 as estimated
4 ~35 (sequential sweep, Inactive, doc lines) sweep + demand_entries with rediscovery ~110; trait method + three store impls ~45; second pool and its config ~25; tests ~360; docs ~14 public sweep signature gains a Semaphore; ControllerWorkStore gains one required method; one new env variable elaboration.rs production +220 / −82 (including the test-only step_in); controllers.rs production +56 / −2; runtime.rs production +41 / −18; tests about +1,430 / −194 (fixtures, gated ports, three real-store non-adoption cases); docs about +21. 0 deps; one env variable; one required trait method; one new public re-export (ElaboratorSession); sweep signature change
5 ~14 ~25 0 Code (second Cut 4 fix batch): +107 / −12, two tests and one deleted comparison. Docs: +70 / −39 across the ontology, plan, handoff, map.yaml and MVP doc. 0 deps

Net for L1: about +1,300 lines, of which about two thirds are tests, no new dependency, no new crate, no new binary, four schema strings replaced, one environment variable added, one required method on the store trait. The growth buys the capabilities the target names (lenses, world-owned weights and their owner command, a replayable draw recorded on the session, concurrent sessions under a ceiling that cannot starve simulation, an explicit weights payload) and retires one liability: a sweep whose only protection against a second session on one answer was that nobody wrote one.

Actual for L1, reconciled 2026-09-16 against 817c9f4: 12 crate files, +4,907 / −266 (controllers.rs +2,807, mostly tests; runtime.rs +571; elaboration.rs +467; lib.rs +414; lens.rs +379 new; journal.rs +223; external_admission.rs +237). Docs, notes and map +1,957 / −46, most of it this cut map. The estimate was about +1,300; the overrun is overwhelmingly test code, the same shape as L0. The tests bought real catches: a flaky illegal-transition pin (3 of 40 runs), the untested Q7 resume rule, the untested retryable-no-stop guard leg, a no-op revision under two spellings, and a forged row caught by the wrong check. Four schema strings replaced as estimated, one environment variable, one required trait method, one new production type (SessionPermit), no dependency, crate or binary. Liabilities retired beyond the estimate: the elaborator repair loop that never worked across sweeps (L1.f10), and a background driver that a single task panic killed silently.

Findings not assigned to a cut

  • L1.f11 (pre-existing, medium, operator): the browser create form is not wired end to end for any binding. eve-browser-lowering captures textarea drafts as strings under payload.bindings (index.ts:2034, 2059-2076). Nothing in the repo lifts bindings to top-level fields or parses json-typed values, and execute_world deserializes invocation.payload straight into CreatePayload (crates/ghostlight-dungeon/src/runtime.rs:1446). Only tests and the smoke harness exercise world.create, and Cut 2's eighth binding inherits the same gap. It bears directly on the playtest gate (Dungeon pass D2).

    • Ruling: fix in Dungeon pass D2, which rebuilds the create path anyway. Authority: operator. Ruled: 2026-09-16.
  • L1.f12 (pre-existing shape widened by Cut 2, design, operator): Draft approvals are bound to nothing. draft_approvals (lib.rs:806) is only inserted (lib.rs:4827) and read (lib.rs:1594, 4837), never cleared. Soul's probe: a member approves, the owner commits SetLensWeights, then a Draft AdmitPatch, and activation still succeeds on the original approval. An approval therefore covers any flavor or structure change made after it. No spec decided this.

    • Correction: lens weights are not part of this problem. They shape what elaboration adds later, not the world an approver sees, and the owner may change them in any phase (L1-Q3). The substance is structure: a Draft AdmitPatch after an approval.
    • Ruling: deferred until multi-player membership is rebuilt. Today approvals are effectively the owner approving their own world. If approvals are bound then, bind them to the world's structure, excluding lens weights. Authority: operator. Ruled: 2026-09-16.
  • L1.f13 (pre-existing, low-medium, operator): the seed lane has the deficit-shaped rediscovery defect. seed_command_id (elaboration.rs:1381-1386) hashes ancestry, so an owner Draft commit after a refused seed round moves the key. The next seed session misses the row, repeats the inference without the refusal it earned, and orphans the old row (Soul's probe: rows = 2, no refusal carried). The whole-session comparison at :1650 can only be reached for same-ancestry rows and is effectively inert. L1-Q9 (A) fixes the elaborator lane only; the seed lane is outside L1.

  • L1.f15 (pre-existing behaviour, low, recorded): Uncovered work is pinned only for worlds with at most one named root. The mutation if jurisdictions.len() < 2 survives the whole suite: a world whose deficit names two roots and not Uncovered would never sweep uncovered boundaries. The behaviour is correct today; the case is untested.

  • L1.f16 (capability, operator): the ontology once said consumers "may use or replace" the stock lenses. Lens is a closed enum of eight, so consumers choose weights only. Cut 5 made the doc match the code. Whether a consumer-supplied lens set is still wanted is the operator's decision; recommendation is to defer until a consumer needs one, likely Delvehold.

  • L1.f14 (pre-existing, medium, operator): stored controller-work rows are never retired. Soul's probe B: every committed elaborator session leaves a permanent ReadyToSubmit row. Probe A: a session refused on its last budgeted round fails with a quarantine-class Serialization("elaboration evidence exceeded its round budget") instead of ending NoPatch, leaving its row ReadyToSubmit. With a commit between sweeps, a fresh row opens, so a model that never succeeds abandons one row per six refused rounds, without bound. Without a commit, the same id is resubmitted every sweep with no inference. Row count is bounded only by the world's lifetime. L1-Q10's crash window and its option C (retire a row on AlreadyApplied) belong here.

  • L1.f1 (pre-existing, medium, operator-triaged, not blocking L1): a sweep error whose requires_quarantine() is true reaches runtime.rs:1837-1838 and is logged at debug; controller_quarantined is never set by the elaboration lane, unlike a speak turn (:1102-1105) or a cover cell. Cut 4 changes the call's argument and keeps the call shape; it does not touch this path, so the operator's triage stands: whether elaboration faults quarantine cognition is a Dungeon behaviour change with its own reason, outside L1.

  • L1.f2 (introduced by Cut 3, low, recorded): integrity cannot check that the persisted text is the text current code would author for the session's lens (Q7 (a) gives that up by design); a hand-forged row with lens: Numen and Patina's text passes integrity as long as its invocation agrees with its text. A contains check would be a text tripwire with the limits L0 recorded; not added. (The earlier note that the lens sits inside the command id is history; it does not.)

  • L1.f3 (pre-existing, low, recorded): probe 1 showed two invocations under one command id carry one provider_request_id, so the connector's replay record for the first attempt would answer the second. Cut 3 and Cut 4 make it unreachable through sweep; the request-id recipe itself is unchanged.

  • L1.f4 (pre-existing, cosmetic, recorded): the substrate map's Dungeon count (50 + 1) is the Windows count; on Linux the bin carries four more tests (cfg(target_os = "linux")), so the recipe's test-dungeon step runs 54 + 1 at base. Any "Dungeon count unchanged" claim must say which host.

  • L1.f5 (pre-existing, low, recorded): deployment/idunn/recipe.toml state slots still declare world_state.foundation.v0 and controller_work.v3 (L0's F6); Cut 2 and Cut 3 make the drift one version wider and change nothing about it. Deployment gate owns it.

  • L1.f6 (introduced by Cut 2, low, recorded): SetLensWeights has no Dungeon route or Eve control in L1; its live consumers are the library and the external-admission tests. The route is D2's, with world.set_lens_weights → ghostlight.world_set_lens_weights.v0 in eve.rs:609-623 and a runtime.rs:1530 arm when the slider exists.

  • L1.f7 (pre-existing, low, recorded): the Linux release remains unproven by anything here; the recipe's test-world-library and test-dungeon steps are the proof and run only through Idunn.

  • L1.f8 (introduced by Cut 4's design, medium, recorded): the split pools remove process-local starvation only. Both lanes reach the connector under one caller id and one quota (runtime.rs:1863-1865), so under connector capacity pressure the connector, not Dungeon, decides who is refused; elaboration's refusal is retried next sweep and simulation's is the retryable fault it is today. Making simulation win at the connector needs connector-side priority or two caller ids, either of which is outside L1.

  • L1.f10 (pre-existing, high, fix — resolved by L1-Q9 A: the deficit half in Cut 4's listing, the boundary half in Cut 3's adoption rule): an in-flight elaboration session is rediscovered only by re-deriving its command id and looking that id up; there is no listing query. Probe 3: after any unrelated commit, a deficit session's key moves (ancestry is in its digest, elaboration.rs:669), the next sweep starts a fresh session, repeats the inference without the refusal it earned, and leaves the old row as an orphan; a boundary session's key survives but its row is reported Superseded forever because ancestry is in the session equality (:404-405). On the road the clock commits every tick, so no Rejected session of either kind has been repaired on a later sweep. Cut 3 fixes the boundary half (adoption by identity); Cut 4 fixes the deficit half (rediscovery by answer through elaboration_in_flight) and stops new orphans. Orphan rows already on disk from before L1 are not cleaned by either cut.

  • L1.f9 (pre-existing, low, recorded): under Q7 (a) only the elaboration lane binds integrity to stored text. SEED_INSTRUCTIONS (elaboration.rs:1299), PERSONA_PROVIDER_INSTRUCTIONS and the operational and interpreter constants still feed integrity_is_valid from code, so an edit to any of them still refuses a store holding that lane's in-flight row until the row version is bumped (probe Q7, base behaviour). Whether those lanes should follow (a) is a question for the pass that next edits them.