pub struct LoadReport {
pub unknown_globals: Vec<String>,
pub unresolved_renames: Vec<String>,
pub anonymous_states_dropped: u32,
}Expand description
What Story::load_state couldn’t apply, so a host can surface it rather
than have data silently vanish. Globals whose name no longer exists are
dropped (no slot to hold them) and reported here. Visit/turn counts are
never dropped — counts for scopes the current program lacks are retained
harmlessly (unused until/unless the scope returns), so they aren’t reported
except when the miss-path alias lookup (M-3, docs/modules-spec.md §5)
still can’t place them — see unresolved_renames for a named scope,
or anonymous_states_dropped for an anonymous one.
Fields§
§unknown_globals: Vec<String>Saved global names with no matching global in the current program.
unresolved_renames: Vec<String>M-3 rehydration miss-path teaching messages (docs/modules-spec.md
§5): a saved fn token, divert value, or visit/turn-count key that
didn’t match the current program even after consulting the compiled
#@was alias table. Only populated for a program that actually
carries alias-table entries (i.e. uses #@was somewhere) — an
ordinary content edit with no rename directive stays silent, same
as before M-3.
anonymous_states_dropped: u32Count of saved visit/turn-count entries for an anonymous scope
(VisitEntry::path is None — a gather or choice point with no
author label, or a sequence, none of which have a name an #@was
alias table entry could ever be written against) that could not be
placed in the current program (issue #1674, gap 4 of the identity
cluster: “anonymous-container state is bounded and reported, not
solved”). Unlike unresolved_renames, this is populated
unconditionally on a miss — an anonymous scope’s positional id can
never be recovered through the alias table regardless of whether the
program uses #@was elsewhere, so gating this on
Program::has_aliases (the way unresolved_renames is) would make
it silent for the overwhelming majority of projects, defeating the
point.
The bounded fallout docs/decision-log.md’s 2026-07-27 ruling
measured: a once-only choice may reappear as if never chosen, or a
sequence may restart from its first branch. Each miss increments
this once per saved entry — a scope with both a visit and a turn
count that both go unresolved counts as two, since each is
independently lost state, not one.
That “bounded” measurement covers the visit/turn-count half only.
The same day’s “CORRECTION to the R1 entry” widened the blast
radius: anonymous scopes also carry translation units (intl exports
keyed by scope id, Option-named), which this field does not
account for — it counts only what Story::load_state itself drops.
Implementations§
Trait Implementations§
Source§impl Clone for LoadReport
impl Clone for LoadReport
Source§fn clone(&self) -> LoadReport
fn clone(&self) -> LoadReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more