fix: reconnect-banner aria-live + nil-CtxR Read guard#132
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-review minor items S11 + S6, plus a justified descope of S5.
role=statusbut noaria-live→ addaria-live=politeso AT announces a drop.(*CtxR).rctx()derefsr.ctxwith no nil guard → a typed-nil*CtxRpanicked beforeRead'sctx==nilcheck. 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)
/readyzfail 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 viavia.events.forward_incompatible/via.snapshot.*_halt+ the alerting-hints doc. Net: adds outage risk, no new visibility.drainingis set first on purpose —/readyzmust 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)aria-live; browser reconnect test still greenFull
ci-check.shgreen.