transport-log-stream-sse: honor ?after query as the resume cursor for source-driven reconnects #855
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#855
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
dashboard-log-stream-source(#810) is the ONLYEventSourceconstruction site and it owns reconnect + resume backfill with an injected timer (it closes the follow and opens a fresh one, rather than relying on the browser's native auto-reconnect). A freshly-constructed browserEventSourcecannot set a request header, so its source-driven reconnect/resume carries its ring cursor as a query param?after=<seq>onGET /api/v1/logs/stream/{scope}.The merged SSE route (
transport-log-stream-sse, #808) reads the reconnect cursor only from theLast-Event-IDheader (lastEventID(r)ininternal/controlapi/logstream.go). It ignores?after. So:Last-Event-IDand the hub backfills.Last-Event-IDheader, so the route treats them as a fresh subscribe (afterSeq 0) and replays the ring tail instead of backfilling the gap after the last held Seq. Client-side dedup (#810 dedups on Seq) keeps this correct-but-wasteful — no duplicate line renders — but it is not a true gap-backfill.Proposed fix
In
lastEventID(r)(or a small wrapper), fall back to theafterquery parameter when theLast-Event-IDheader is absent:afterSeq = header ?? query("after") ?? 0. A one-line-ish change plus a route test; the header stays authoritative when present (native reconnect), the query covers source-driven reconnect.Found while
Building #810 (
observability:dashboard-log-stream-source). #810 is complete and green against its fake-EventSource seam; this only affects the live production wiring against the real route. Filed rather than edited because the route is thetransport-log-stream-sseslice (#808), not #810 (CLAUDE.md rule 3 — stay in scope).swarm-claim host=elitebook-distributed-server-03 run=10097
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #855 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope