Skip to content

A replay-time report of recorded data a current substrate would refuse #512

Open

Description

@scttfrdmn

What

#491 chose option 2 — warn, don't withhold — for stored SQS message attributes that
violate a rule a current substrate enforces on send. ReceiveMessage logs at WARN and
returns the message unchanged.

Option 3 from that issue is the more principled home for the same signal, and this is it:
surface "this event log contains data a current substrate would refuse" through the
replay/inspection machinery rather than the data plane.

Why the data plane is the wrong place, even though that is where it ships today

The warning is correct but structurally misplaced, in three ways:

  • It is a property of the log, reported per request. A fixture with one illegal
    message warns on every receive of it, including every redelivery after a visibility
    timeout. Deduplicating would need per-process state a replay cannot reproduce, so the
    repetition is deliberate — but the thing being reported happened once, at record time.
  • It is easy to miss. A WARN line in a server log competes with everything else a
    run emits. An operator replaying an old log to reproduce a bug is reading test output,
    not scrollback.
  • It only fires for data that is read. A message nothing receives never warns, so the
    log can carry a violation the operator never learns about. A report over the log finds
    every one.

What it would look like

A check over recorded state or events that answers "what in this log would a current
substrate refuse?", surfaced where replay and time-travel inspection already live
(emulator/replay.go, GET /v1/debug/...). SQS message attributes are the first
instance; the shape generalizes to any rule added after a log was recorded, which is a
category that grows with every fidelity fix.

Prior art in the repo for the "recorded under older rules" problem is thin, which is
partly why this is worth designing rather than bolting on: substrate has been adding
validations steadily (#452, #468, #469, #471, #472, #490), and each one is a rule some
existing fixture may predate.

What must not change

The data-plane behaviour. #491's reasoning is the constraint, not a starting point:

Withholding a stored message would make a recorded run unreplayable. Substrate's core
property is that replaying an event log reproduces the same observations, and the message
was accepted by the substrate that recorded it.

TestSQS_MessageAttributes_StoredAttributesAreReturnedNotWithheld exists to fail if
anyone changes it, and this issue must not.

Acceptance criteria

  • A design for where a "stale fixture" report belongs in the replay/inspection
    surface, agreed on the issue before implementation.
  • SQS message attributes reported through it, over the whole log rather than only
    messages a run happens to receive.
  • The receive-time WARN either kept or removed as a decision, with the reasoning
    recorded — if the report supersedes it, say why; if both are wanted, say what each is
    for.
  • A test that a stored-illegal message is still returned unchanged. That guarantee
    survives this issue.
  • docs/services.md's "The rules apply on send, not on receive" section updated.

Filed from #491's option 3, cited in the v0.87.0 CHANGELOG.

Activity

  1. added
    type: feature
    area: replay
    priority: low
    status: needs-design
    on Aug 2, 2026
  2. scttfrdmn commented on Sep 20, 2026

    @scttfrdmn
    OwnerAuthor

    Left unmilestoned deliberately in the roadmap pass that assigned the other 84 open issues to v0.121.0–v0.127.0.

    Consistent with the labels already on it (status: needs-design, priority: low): a replay-time report of recorded data a current substrate would refuse needs the shape of the report decided first.

    One dependency worth recording: the report's value scales with how many refusals exist to report against, and v0.124.0 ("a refusal the page publishes") and v0.126.0 ("a request member read and discarded") both add refusals that did not exist when this was filed. So designing it after those land gets a more useful report, not a stale one.

  3. scttfrdmn commented on Nov 15, 2026

    @scttfrdmn
    OwnerAuthor

    Re-triaged 2026-11-14 and left without a milestone, by decision. It stays status: needs-design.

    The point from 2026-09-20 still holds: the report gets more useful as more refusals exist to report against. v0.128.0 and v0.129.0 are fidelity milestones that will add many of them, so the design waits until they land.

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

    area: replayarea: sqspriority: lowstatus: needs-designtype: feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions