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 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-16 11:13:56 +02:00
commit 2865ea738d

View file

@ -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<SubjectSnapshot>,
pub affordances: Vec<AffordanceSnapshot>,
pub places: Vec<PlaceSnapshot>,
pub resources: Vec<ResourceSnapshot>,
pub routes: Vec<RouteSnapshot>,
pub(crate) resources: Vec<ResourceSnapshot>,
pub(crate) routes: Vec<RouteSnapshot>,
/// 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