Skip to content

[Audit] Overlapping stream-detail fetches on rapid SSE bursts can apply stale data #1212

Description

@K1NGD4VID

Filed from the second-wave repository audit (issue 10/100). See the audit summary for full category context.

  • Location: frontend/src/app/streams/[id]/stream-details-content.tsx:141-153
  • Problem: The refresh effect re-fires on every streamEvents update and creates a new AbortController each time, but nothing prevents an older, slower in-flight fetch from resolving after and overwriting a newer one — the abort signal only covers unmount, not overlap within the same mount.
  • Evidence: Fresh AbortController per SSE event with no request-generation/sequence guard.
  • Suggested implementation: Track a monotonically increasing request id (or abort the previous controller before starting a new fetch) and ignore responses that don't match the latest id.
  • Acceptance criteria: A test firing two SSE events in quick succession with reversed response latencies ends on the data from the later event.
  • Difficulty: M
  • Expected impact: Prevents the stream detail view from regressing to stale amounts/status during bursts of activity.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingfrontendFrontend related taskssecond-wave-auditFiled from the second-wave repo audit (100 issues)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions