fix: recover wrong-pod actions instead of 404 (action/SSE symmetry)#123
Merged
Conversation
An action POST whose via_tab this pod doesn't hold returned a bare 404 —
silently dropping the click — while the SSE handshake already re-bootstraps the
exact same stale tab (recoverSSE). Without sticky sessions an action routed to
the wrong pod thus died with no recovery, the only remaining cross-pod
correctness asymmetry.
A recoverable id (well-formed and naming a mounted route — wrong-pod routing, a
TTL sweep, or a restart) now gets a reload directive over the datastar action
response, so a fresh page GET re-bootstraps the tab — the same degraded-recovery
path the SSE handshake uses. The descriptor's group middleware runs first so an
auth guard vetoes recovery exactly as it vetoes the page, and a forged id (no
mounted route) keeps the historical 404 so junk traffic still can't mint
contexts. Emits via.action.recover{mode=reload}.
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.
Top item from the 1.0 design council: the only remaining cross-pod correctness gap.
Problem
An action POST whose
via_tabthis pod doesn't hold returned a bare404— silently dropping the click — while the SSE handshake already re-bootstraps the same stale tab (recoverSSE). Without sticky sessions, an action round-robined to the wrong pod just died, with no recovery and no feedback. SSE recovers; actions didn't — a strictly-worse asymmetry.Fix
A recoverable id (well-formed and naming a mounted route — wrong-pod routing, TTL sweep, or restart) now gets a reload directive over the datastar action response (reusing
streamReloadScript, the SSE path's degraded-recovery), so a fresh page GET re-bootstraps the tab. The descriptor's group middleware runs first (auth vetoes recovery as it vetoes the page); a forged id (no mounted route) keeps the historical 404 so junk can't mint contexts. Emitsvia.action.recover{mode=reload}(added to the metrics catalogue).Tests
location.reloadscript +via.action.recovermetric (not 404)Full
ci-check.shgreen.