Skip to content

[EPIC E6] Build correlated GF step-event stream #543

Description

@JorisHeadease

Build the correlated step-event stream that drives the live GF viewer and provides the shared substrate for later inspection tooling.

Work items

  • Add capture middleware around calls forwarded by the sandbox backend proxy.
  • Generate one correlation ID per scenario run and an ordered sequence number per event.
  • Emit the documented GF-labelled request, response, outcome, duration and timestamp fields.
  • Allowlist captured headers and payload fields, and redact authorization headers, cookies, access tokens, credentials and other secrets before constructing or retaining an event.
  • Deliver run-scoped events to the browser over SSE.
  • Retain a bounded event window so a page refresh can restore the current run.
  • Mask BSNs on shared deployments while allowing synthetic identifiers in local development.
  • Drive per-patient demo locks from the same run lifecycle.
  • Define reconnect and resume semantics independently of the frontend framework.

Acceptance criteria

  • Events arrive in order and carry the correct run correlation ID.
  • A refresh restores events within the retention window without replaying another run.
  • Concurrent runs cannot observe each other's events.
  • Shared deployments do not expose plaintext BSNs.
  • No retained or streamed event contains authorization headers, cookies, access tokens, credentials or other secrets.
  • The event schema contains no Datastar-specific fields or transport behavior and can be consumed unchanged by Preact + htm.

Refs #532
Refs #538

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

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions