Skip to content

Correlation scanner skips interpretation payloads — ScanStep claims every JSON surface and misses one #547

Description

@thomas-stegemann

Problem

RecordingCorrelationScanner.ScanStep documents itself as walking "every JSON-bearing surface of one step", but it misses one: the interpretations.

public static void ScanStep(BowireRecordingStep step, CorrelationLeafVisitor onLeaf)
{
    if (step is null) return;
    ScanLeaves(step.Body, onLeaf);
    foreach (var message in step.Messages) ScanLeaves(message, onLeaf);
    ScanLeaves(step.Response, onLeaf);
    if (step.SentMessages is not null)
        foreach (var frame in step.SentMessages) ScanFrame(frame, onLeaf);
    if (step.ReceivedMessages is not null)
        foreach (var frame in step.ReceivedMessages) ScanFrame(frame, onLeaf);
}

BowireRecordingStep.Interpretations and BowireRecordingFrame.Interpretations are both IList<RecordedInterpretation>?, and RecordedInterpretation.Payload is a JsonElement — a real JSON surface with real leaves, produced by the frame-semantics framework and carried verbatim through save/load. ScanFrame walks frame.Body and frame.Data but not frame.Interpretations.

Why it matters

An interpretation payload is where a semantic widget's data lives — a coordinate pair, a decoded identifier, a resolved entity reference. If a recording carries a correlation key only inside an interpretation payload, the correlated timeline cannot see it, and the step stays dark for no reason the user can observe.

Scope note

Found while shipping #545. It changes nothing for the harbor recording, which carries no interpretations, so it is not a regression in the timeline that ships today — it is a surface the scanner claims to cover and does not.

Acceptance

ScanStep walks step.Interpretations[].Payload, ScanFrame walks frame.Interpretations[].Payload, and a test builds a recording whose only shared identifier lives in an interpretation payload and asserts the two steps correlate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions