Skip to content

fix(mecatui): stop rejected-bearer reconnect loops - #1149

Merged
jhrozek merged 18 commits into
mainfrom
acc/mecatui-live-reconnect
Sep 7, 2026
Merged

jhrozek merged 18 commits into
mainfrom
acc/mecatui-live-reconnect

Conversation

@JAORMX

@JAORMX JAORMX commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • stop bearer-backed live-reader and reconnect-probe authentication rejection from entering the transient reconnect loop
  • preserve bearer provenance through the injectable live-stream boundary while retaining provenance already carried by returned streams
  • pin the complete close → reconnect probe → rearm → immediate-close sequence so attempt numbering and backoff span loop instances
  • add deterministic backoff, real-event reset, stale-generation, recovery-overlay, teardown, and no-retry regression coverage

Acceptance criteria

  • initial and freshly rearmed live-reader Unauthenticated failures classify as AuthRejected and route to actionable /connect recovery
  • reconnect-probe open rejection is terminal and does not retry
  • immediate-close cycles advance to attempt 2 and request the exact bounded backoff before probing
  • only a real current-generation live event resets continuity; stale generations cannot rearm an old session

Verification

  • task lint
  • task test
  • task docs
  • task ac-trace-strict
  • go run ./cmd/mecademo
  • focused reconnect tests under -race -count=10

Panel review

  • Spec: complete after two repair rounds strengthened the real client/UI seams
  • Standards: acceptance/index/task lifecycle and proof names are consistent
  • Test adequacy: deterministic delay waiter is mutation-sensitive; full live-reader lifecycle is exercised
  • UX: existing /connect remediation remains actionable and clears stale reconnect state
  • Architecture: no engine/proto/protocol widening; one non-blocking important note accepts the optional client-local BearerBackedStream method used by injectable live sources

PANEL: ship_blockers=0 important=1 advisory=0 reviewer_failures=0

Closes #779

JAORMX and others added 18 commits September 6, 2026 11:49

@jhrozek jhrozek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed via automated agent pass — well-scoped, correct fix, good test coverage, CI green. Approving.

@jhrozek
jhrozek enabled auto-merge (squash) September 7, 2026 07:49
@jhrozek
jhrozek merged commit 2d75e66 into main Sep 7, 2026
24 checks passed
@jhrozek
jhrozek deleted the acc/mecatui-live-reconnect branch September 7, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mecatui: a persistently rejected bearer causes a zero-delay live-feed reconnect loop

2 participants