Class RecordingInterpretationBuilder
- Namespace
- Kuestenlogik.Bowire.Mocking
- Assembly
- Kuestenlogik.Bowire.dll
Phase-5 helper that resolves the effective frame-semantics annotations
for a single (service, method) pair against a captured frame and
produces the list of RecordedInterpretation entries that
land on the recording step. Lives in the Kuestenlogik.Bowire.Mocking namespace
because the recording-file shape is owned here, but the logic is
disk-I/O-free — pure transformation against an in-memory
IAnnotationStore.
public static class RecordingInterpretationBuilder
- Inheritance
-
RecordingInterpretationBuilder
- Inherited Members
Remarks
The builder's contract mirrors the workbench's existing extension
router (extensions.js → mountWidgetsForMethod): walk the
effective annotations, group paired kinds at the same parent JSONPath,
and resolve the typed payload from the frame for each pairing. The
recorded payload is the same shape the JS-side widget consumes, so the
replay loop reads it byte-for-byte off disk without re-running detection
or pairing.
The builder is built around the kinds that ship in v1.3 — WGS84
coordinates (paired latitude + longitude), GeoJSON points,
image.bytes (with optional image.mime-type),
audio.bytes (with optional audio.sample-rate), and
standalone scalars covered by timeseries.*. Unknown / unhandled
semantic kinds are silently skipped — they round-trip through the
recording file as effective-schema entries (via
BowireRecordingSchemaSnapshot) but don't emit per-frame
interpretations until a future phase wires their payload extraction.
Pure-function shape: no logging, no exceptions, no static state — every failure mode (missing field, type mismatch, malformed base64) returns "no interpretation" rather than throwing. The recording capture path is a side-channel; one rogue frame can't break the recorder.
Methods
Build(IAnnotationStore, string, string, string, JsonElement)
Resolve every interpretation visible for the given
(serviceId, methodId, messageType, frame) tuple. Returns an
empty list when no annotations match — never null, never
throws.
public static IReadOnlyList<RecordedInterpretation> Build(IAnnotationStore store, string serviceId, string methodId, string messageType, JsonElement frame)
Parameters
storeIAnnotationStoreAnnotation store whose effective entries the builder walks. Typically the singleton LayeredAnnotationStore wired into the host's DI container.
serviceIdstringService identifier of the recorded step.
methodIdstringMethod identifier of the recorded step.
messageTypestringDiscriminator value for this frame — Wildcard (
"*") for single-type methods.frameJsonElementDecoded JSON payload rooted at the message body.