Skip to content

fix: reconnect-banner aria-live + nil-CtxR Read guard#132

Merged
joaomdsg merged 1 commit into
mainfrom
fix/rereview-aria-nilguard
Jun 11, 2026
Merged

fix: reconnect-banner aria-live + nil-CtxR Read guard#132
joaomdsg merged 1 commit into
mainfrom
fix/rereview-aria-nilguard

Conversation

@joaomdsg

Copy link
Copy Markdown
Member

Re-review minor items S11 + S6, plus a justified descope of S5.

  • S11: reconnect banner had role=status but no aria-live → add aria-live=polite so AT announces a drop.
  • S6: (*CtxR).rctx() derefs r.ctx with no nil guard → a typed-nil *CtxR panicked before Read's ctx==nil check. Guarded at the single chokepoint (consistent with CtxR's other accessors). Defensive — never hit on framework paths.

Descoped from S5 (with reasons — both are foot-guns)

  • /readyz fail on halted projector: a forward-incompat halt is roll-forward-only and usually hits every pod for that key, so failing readiness would pull the whole fleet → cascading outage. Halts are already observable via via.events.forward_incompatible / via.snapshot.*_halt + the alerting-hints doc. Net: adds outage risk, no new visibility.
  • "set draining last": draining is set first on purpose — /readyz must report not-ready at the start of shutdown so the LB stops routing while you drain. Setting it last defeats the whole point.

Tests

  • Read(nil *CtxR) → no panic, zero value (StateApp + StateSess)
  • reconnect script carries aria-live; browser reconnect test still green

Full ci-check.sh green.

Two minor re-review hardening items.

S11: the reconnect "Reconnecting…" banner had role=status but no aria-live, so
some assistive tech wouldn't announce a connection drop. Add aria-live=polite.

S6: (*CtxR).rctx() dereferenced r.ctx with no nil-receiver guard, so a
hand-constructed typed-nil *CtxR passed to StateApp/StateSess.Read panicked in
rctx() before the Read's own ctx==nil check could return the zero value. Guard
the nil receiver at the single chokepoint — consistent with CtxR's other
accessors. (Never happens on framework paths; defensive consistency.)

Deliberately NOT done from the same re-review group: /readyz failing on a halted
projector (a forward-incompat halt is roll-forward-only and usually hits every
pod for that key, so failing readiness would pull the whole fleet → cascading
outage; halts are already surfaced via via.events.forward_incompatible /
via.snapshot.*_halt + the alerting-hints doc), and "set draining last" (draining
is set FIRST on purpose so /readyz reports not-ready at the start of shutdown and
the LB drains traffic before teardown — setting it last would defeat that).
@joaomdsg
joaomdsg merged commit f15a627 into main Jun 11, 2026
4 checks passed
@joaomdsg
joaomdsg deleted the fix/rereview-aria-nilguard branch June 11, 2026 01:35
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.

1 participant