fix(mir-signal): forward /registry in --webroot mode (production 404)#49
Merged
Conversation
B2.1 registered /registry on signal.Server.Handler(), but the production --webroot wrapper (withStatic) has its OWN hardcoded signalPaths map and /registry was missing from it — so the live relay 404'd /registry into the static file server. Tests used Server.Handler() directly and never saw the wrapper. Add /registry to signalPaths (and to sw.js SIGNALING so the SW doesn't cache it), plus TestWithStaticForwardsSignalingPaths which pins the production wrapper (it fails with the exact 404 when the route is dropped). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Production hotfix. After deploying B2,
GET /registryreturned 404 on the liverelay even though
/healthzwas 200.Root cause
B2.1 registered
/registryonsignal.Server.Handler(), but the production--webrootwrapper (
cmd/mir-signalwithStatic) keeps its own hardcodedsignalPathsmap ofwhich paths to forward to the signal server — and
/registrywas missing from it. So withthe SPA served,
/registryfell through to the static file server → 404. The B2 tests usedServer.Handler()directly and never exercised the wrapper.Fix
/registrytowithStatic'ssignalPaths, and tosw.jsSIGNALING(so the serviceworker treats it as a live endpoint, not a cacheable asset).
TestWithStaticForwardsSignalingPathspins the production wrapper: it asserts/registry(and
/healthz) are forwarded to the signal server and a missing asset still 404s via theFS. Verified it FAILS with the exact
/registry = 404when the route is dropped.Once merged I redeploy and confirm
/registryis live.🤖 Generated with Claude Code