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:

  1. 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.
  2. Step has no interpretations field (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

capturedInterpretations IReadOnlyList<RecordedInterpretation>

The interpretations list on the recorded step / frame. null for pre-Phase-5 captures.

prober IFrameProber

Frame prober to feed the frame through when the recording carries no captured interpretations. May be null when 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.

store IAnnotationStore

Annotation store used by the fall-back path to walk effective annotations and pair them with the frame. May be null when the host has no annotation store wired — also produces empty.

serviceId string

Service identifier of the recorded step.

methodId string

Method identifier of the recorded step.

messageType string

Discriminator value for this frame — Wildcard when the recording predates Phase 5 (no discriminator field) and the framework treats the step as single-type.

frame JsonElement

Decoded 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.

Returns

IReadOnlyList<RecordedInterpretation>