140 lines
8.1 KiB
Markdown
140 lines
8.1 KiB
Markdown
# Recorded telemetry replay
|
|
|
|
## Open a saved capture offline
|
|
|
|
Open **Recorded telemetry replay** (`/telemetry-replay`) from the shared
|
|
navigation. Refresh validates files in the Client's existing app-local
|
|
recordings directory. Select an explicit capture ID and choose **Load saved
|
|
capture**. Loading never auto-plays. No profile import, diagnostic session,
|
|
live feed, vehicle, model or configuration catalogue is required.
|
|
|
|
The current execution kind is **RecordedReplay**, with a fresh replay-instance
|
|
identifier and the saved capture ID. Provider, target kind, profile revision,
|
|
vehicle/session/configuration/run identifiers, protocol and completion are
|
|
**original archived metadata**, not current vehicle evidence or verified
|
|
identity. Raw/decoded inspection shows the last applied observation; before
|
|
first and empty archives have an explicit no-observation/no-sample state.
|
|
The source archive is never edited, saved again or rebound into the recording
|
|
workspace by replay. Readback establishes consistency, not authenticity.
|
|
|
|
Incomplete and Error captures retain a prominent original state/reason/error.
|
|
Before Play, Next, Previous or either seek, explicitly acknowledge that load's
|
|
partial/error source. Stop, First, inspection and Close remain available.
|
|
Acknowledgement survives navigation within the same load, but not a replacement
|
|
load. Reaching the end means **end of retained data**, never a newly Complete
|
|
source or recovery of unrecorded samples.
|
|
|
|
## Two independent cursor values
|
|
|
|
- Position is integer `TimeSpan` ticks in `[0, duration]`. One second is
|
|
10,000,000 ticks. Duration is the last observation's capture elapsed time,
|
|
or zero when empty; no trailing UTC/model interval is invented.
|
|
- Applied count is the exact prefix length from zero to the retained count.
|
|
Load, First and Stop mean **before first**: count zero, position zero and
|
|
no current values. This differs from time seek zero if zero-time records exist.
|
|
|
|
Next applies exactly one observation. Previous rebuilds one fewer. Ordinal seek
|
|
rebuilds exactly the requested count and sets position to that last record's
|
|
capture time (zero for count zero). Time seek includes every record whose
|
|
capture time is less than or equal to the requested tick, including all ties,
|
|
but preserves the requested position between records. Manual navigation leaves
|
|
Paused, or Completed when every record of a nonempty archive is applied.
|
|
Empty seek zero remains Stopped; empty Next/Previous is visibly rejected.
|
|
|
|
Time-driven playback applies whole due-time groups in recorded sequence before
|
|
publishing. All-zero archives complete without a timer; manual Next can still
|
|
inspect a single record inside a tie. Completion depends on applied count, not
|
|
position equalling duration. Completed requires explicit Restart or navigation,
|
|
not an implicit replay when Play is pressed again.
|
|
|
|
Diagnostic logical ticks and model step/time remain per-sample source context.
|
|
They do not determine ordering or duration: model resets and repeated model
|
|
times remain exactly recorded. Modules are not represented as simultaneous.
|
|
There is no interpolation, extrapolation, smoothing or model rerun.
|
|
|
|
## Exact quality and last-Good reduction
|
|
|
|
Bindings are pre-indexed from actual positive archived signal snapshots using
|
|
the first-observed module/signal/exact unit/origin rules. This index permits
|
|
configuration before playback but contains no current measurements.
|
|
Every navigation reconstructs the bounded prefix from scratch (maximum 4,096
|
|
observations), clearing current, last-Good and per-module status caches first.
|
|
No later value can leak into an earlier prefix.
|
|
|
|
Only `read.signals` observations change signal state. A failed operation changes
|
|
only that module. A prior finite Good sample may be retained as visibly
|
|
**recorded Stale**, with its original observation/capture/diagnostic/model time
|
|
and failure reason. Uncertain is not last-Good authority. Without a prior Good,
|
|
a failed read is Error/`--`, never zero. Unknown, null/non-numeric, missing
|
|
signals and unit/origin changes use the same source-quality/range/last-Good
|
|
rules as the [live dashboard](live-dashboard.md). Unsupported origin changes
|
|
are also rejected at the existing strict archive boundary.
|
|
|
|
Example: A=850 Good at 1 s; B=12.6 Good at 2 s; A=1000 Uncertain at 2 s;
|
|
A Timeout at 4 s. Seek 1.5 s yields only A=850 Good, with no B sample.
|
|
Seek 2 s applies three records, A=1000 Uncertain and B=12.6 Good. Seek 4 s
|
|
retains A=850 Stale from 1 s, not 1000, and leaves B Good. Previous restores
|
|
the exact three-record Uncertain prefix; First clears both.
|
|
|
|
## One cancellable owner and explicit controls
|
|
|
|
Play resumes Stopped/Paused. Restart is rewind-plus-Play and requires quiescence.
|
|
Repeated active Play is idempotent and shares the owner. Pause freezes the
|
|
position at the request instant, applies the due prefix, then cancels/drains
|
|
the old wait. Resume rebases from that position, waiting only the remaining
|
|
capture interval. Stop drains then clears to before-first while retaining the
|
|
archive, definitions, speed and acknowledgement.
|
|
|
|
Speed defaults to 1x and accepts finite 0.25x through 1000x inclusive. Only
|
|
capture elapsed intervals are scaled; source facts and results are unchanged.
|
|
Pause and finish cleanup before changing speed, seeking, restarting, replacing
|
|
or refreshing an archive. Rejected speed input rerenders to the committed
|
|
value; invalid inputs are never clamped into success. Gauge edits remain atomic
|
|
and may rerender during playback without advancing it; archive/drain operations
|
|
reject overlapping edits.
|
|
|
|
The clock uses monotonic `TimeProvider` and a cancellable wait seam, decimal
|
|
overflow-safe tick scaling and individual waits bounded at 30 wall seconds.
|
|
This is not a hard real-time SLA or smooth-animation promise. A clock/wait
|
|
failure is visibly Faulted, preserving the last committed prefix/sample state;
|
|
the actual fault reason remains visible even after another command is rejected.
|
|
A non-cancellation failure during pending Pause/Stop cleanup also remains
|
|
Faulted rather than becoming a successful reset. Stop/First after cleanup
|
|
provides explicit recovery.
|
|
|
|
The factory returns a fresh session per page, not a disposed scoped singleton.
|
|
The page drains loading/playback on Close or unmount. Generation/owner checks
|
|
prevent delayed old loads/wakes from publishing. While an archive command or
|
|
cleanup is pending, competing starts/navigation/replacements reject before
|
|
mutation. Failed/cancelled replacements retain the previous validated context,
|
|
definitions, values, rate and position, with a visible actual error rather
|
|
than a healthy empty replacement.
|
|
|
|
## Shared recorded gauges and display units
|
|
|
|
Use the shared in-memory editor to add zero through eight numeric/bar gauges.
|
|
Exact source units and bounds remain canonical; only labels/readouts are
|
|
projected to global display units. An open draft pins its selected display
|
|
units until save/cancel/reset. Invalid edits are atomic, and unedited bounds
|
|
retain their exact original source values. All gauges are labeled Recorded
|
|
replay, even Good or Paused/Completed readings. Hide/show, remounting and global
|
|
unit changes never start/stop/seek/read the player.
|
|
|
|
Only the existing global unit preference persists. Layout, definitions,
|
|
cursor, acknowledgement and speed are runtime-only; a new load clears
|
|
definitions/cursor/acknowledgement but keeps valid speed and global units.
|
|
|
|
## Verification boundaries
|
|
|
|
`TelemetryReplayTests` covers real recorder/codec/temporary-filesystem input,
|
|
offline DI, independent exact-prefix fixtures, controlled monotonic waits and
|
|
barriers, typed atomic rejections, faults, replacement/unmount, source-byte
|
|
immutability, zero live/model calls and zero Save calls, plus actual rendered
|
|
route/editor events. Existing live-source regressions remain intact.
|
|
Native evidence uses the real Windows Client, app storage and saved static-v1/
|
|
dynamic-v2 captures; it is not controlled timing, race or fault proof.
|
|
Commands, counts, native observations and limitations are recorded separately
|
|
in the [Step-08 worker report](../prompts/Step-08-Report.md).
|
|
Step-07/07A/07B and Step-08 are accepted. Synthetic calibration authoring is a
|
|
separate feature and cannot change replay archives, cursor or playback ownership.
|