From 2865ea738d03638c280382670c6ccdd226bc73ab Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 16 Sep 2026 11:13:56 +0200 Subject: [PATCH] Close the two snapshot rows Dungeon never reads An item stays pub only when the compiler requires it for an API Dungeon calls. WorldSnapshot's resources and routes fields were pub, which forced ResourceSnapshot and RouteSnapshot pub; Dungeon reads neither field and only the library's own controllers do. The fields and both types are now pub(crate). The workspace builds with the same unique warning set. Every other bare-pub identifier Dungeon never names was closed one at a time under cargo check --workspace --all-targets. Each either fails to compile because Dungeon or the admission tests use it through a public path, or adds a private_interfaces warning from a public enum variant field or method that Dungeon does use (KernelError, CommandBody, CausalBoundary, RefKind, ControllerWorkCustody, NarrativeCheckpoint, WorldMailbox), or strands library code as dead. Those stay pub. ScopeDigest, WorkLane and ScopeComponents are in the second group: the warnings come from KernelError::ScopeChanged, ControllerWorkCustody::Uncertain and the NarrativeCheckpoint variants. NarrativeInterruption's bound_scope_digest and fresh_scope_digest return &str, so they never forced ScopeDigest open, and Dungeon calls both at runtime.rs:1286-1287 and 2022-2023, so they stay pub too. Co-Authored-By: Claude Opus 5 --- crates/ghostlight/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/ghostlight/src/lib.rs b/crates/ghostlight/src/lib.rs index 0df8612..285c4e3 100644 --- a/crates/ghostlight/src/lib.rs +++ b/crates/ghostlight/src/lib.rs @@ -1061,7 +1061,7 @@ pub struct AffordanceSnapshot { } #[derive(Clone, Debug, PartialEq, Eq)] -pub struct ResourceSnapshot { +pub(crate) struct ResourceSnapshot { pub(crate) id: EntityId, pub(crate) label: String, } @@ -1074,7 +1074,7 @@ pub struct PlaceSnapshot { } #[derive(Clone, Debug, PartialEq, Eq)] -pub struct RouteSnapshot { +pub(crate) struct RouteSnapshot { pub(crate) id: EdgeId, pub(crate) label: String, pub(crate) from: EntityId, @@ -1097,8 +1097,8 @@ pub struct WorldSnapshot { pub subjects: Vec, pub affordances: Vec, pub places: Vec, - pub resources: Vec, - pub routes: Vec, + pub(crate) resources: Vec, + pub(crate) routes: Vec, /// Already ordered by pressure, then attention debt, then id: one owner, so /// an operator interface, the mesh projection, and any future driver read /// the same order and