DataSourceTrace class final
What every edu_data_source a run read gave, one fixed step at a time —
edu-00 §9's "значение из источника... становится вводом для этого
шага ленты", written down the same way InputTape writes down a
controller: dense, one entry per step, so a replay reads the exact value
a run saw rather than a value recomputed from a clock that has since
moved on.
Why a trace of its own, next to InputTape, rather than folded into
it. InputTape is keyed to GameAction — a vocabulary this package
owns and every game shares. A sensor reading has no action behind it and
invents no new one: edu-00 deliberately keeps the engine's input
vocabulary closed to controllers and gives external values their own,
parallel, additive channel — the same reasoning Demo's own
DigestTrace already sits beside InputTape rather than inside it.
Constructors
- DataSourceTrace()
-
DataSourceTrace.fromJson(Map<
String, Object?> json) -
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
How many steps this trace holds.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
steps
→ List<
int> -
The step numbers recorded, in order and strictly increasing —
record enforces both, the same discipline
InputTapeRecorderholds its own frames to.no setter
Methods
-
branchAt(
int step, int throughStep, Map< String, Object?> continuation(int step)) → DataSourceTrace -
A new trace: this one's own history up to and including
step, then whatevercontinuationresolves for every step after it and up tothroughStep— a "what if", branched atstepwithout touching this trace at all.continuationis a plain function rather than a secondDataSourceRegistrybecause branching is a property of the trace, not of who is asking for one: the caller already knows which source it swapped and for what. -
firstStepWhere(
String path, bool test(Object? value)) → int? -
The first recorded step whose own
path's value satisfiestest, or null if none ever did —ls-i-02's own "an engineer... scrubs the timeline to the moment the lesson named," the same shape DigestTrace.divergenceFrom already answers for a checkpoint mismatch, here for a reading crossing a threshold rather than two runs disagreeing. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
record(
int step, Map< String, Object?> resolvedBindings) → void -
Every binding this run resolved at
step— whatresolveBindingsreturned, kept exactly rather than re-derived. -
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
-
valueAt(
int step) → Map< String, Object?> ? -
What was recorded at exactly
step, or null if nothing was.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited