Class RecordingReplayInterpretationResolver
- Namespace
- Kuestenlogik.Bowire.Mocking
- Assembly
- Kuestenlogik.Bowire.dll
Phase-5 replay-determinism shim. Given a recording step (either the top-level BowireRecordingStep or one of its BowireRecordingFrame children) plus the frame about to be emitted, decide whether to short-circuit detection with the captured RecordedInterpretation list or fall back to the live IFrameProber + builder pass.
public static class RecordingReplayInterpretationResolver
- Inheritance
-
RecordingReplayInterpretationResolver
- Inherited Members
Remarks
The rule the ADR's "Recording / replay integration" section pins:
-
Step carries
interpretations→ use them verbatim. Skip the prober. The replayed widget sees the same payload the original capture did, regardless of how detector heuristics have drifted since record-time. -
Step has no
interpretationsfield (pre-Phase-5 recordings) → run the live prober + RecordingInterpretationBuilder as a fall-back. Same behaviour as the live path.
The fall-back path is the v1-recording backwards-compatibility
guarantee: a recording captured under v1.2.0 (no
interpretations, no discriminator, no
schemaSnapshot) still replays cleanly through the workbench
under v1.3+. The prober only ticks for pre-Phase-5 frames — the
counter on the prober is the test seam that verifies the
short-circuit.
Methods
Resolve(IReadOnlyList<RecordedInterpretation>?, IFrameProber?, IAnnotationStore?, string, string, string, JsonElement)
Resolve the interpretations to emit alongside a single replayed
frame. Honours the captured list when present; otherwise runs
detection via the supplied prober + the
effective annotation store, exactly as the live SSE path does.
public static IReadOnlyList<RecordedInterpretation> Resolve(IReadOnlyList<RecordedInterpretation>? capturedInterpretations, IFrameProber? prober, IAnnotationStore? store, string serviceId, string methodId, string messageType, JsonElement frame)
Parameters
capturedInterpretationsIReadOnlyList<RecordedInterpretation>The
interpretationslist on the recorded step / frame.nullfor pre-Phase-5 captures.proberIFrameProberFrame prober to feed the frame through when the recording carries no captured interpretations. May be
nullwhen the host has opted out of built-in detection (DisableBuiltInDetectors) — the fall-back path then returns an empty list, which is the correct "no widget mounts" semantics for an unannotated frame.storeIAnnotationStoreAnnotation store used by the fall-back path to walk effective annotations and pair them with the frame. May be
nullwhen the host has no annotation store wired — also produces empty.serviceIdstringService identifier of the recorded step.
methodIdstringMethod identifier of the recorded step.
messageTypestringDiscriminator value for this frame — Wildcard when the recording predates Phase 5 (no
discriminatorfield) and the framework treats the step as single-type.frameJsonElementDecoded JSON payload rooted at the message body. The fall-back path needs this to extract typed payloads (lat/lon, base64 bytes, ...) for each effective annotation.