Skip to content

fix(mir-signal): forward /registry in --webroot mode (production 404)#49

Merged
frahlg merged 1 commit into
mainfrom
fix-registry-route-webroot
Jun 14, 2026
Merged

fix(mir-signal): forward /registry in --webroot mode (production 404)#49
frahlg merged 1 commit into
mainfrom
fix-registry-route-webroot

Conversation

@frahlg

@frahlg frahlg commented Jun 14, 2026

Copy link
Copy Markdown
Member

Production hotfix. After deploying B2, GET /registry returned 404 on the live
relay even though /healthz was 200.

Root cause

B2.1 registered /registry on signal.Server.Handler(), but the production --webroot
wrapper (cmd/mir-signal withStatic) keeps its own hardcoded signalPaths map of
which paths to forward to the signal server — and /registry was missing from it. So with
the SPA served, /registry fell through to the static file server → 404. The B2 tests used
Server.Handler() directly and never exercised the wrapper.

Fix

  • Add /registry to withStatic's signalPaths, and to sw.js SIGNALING (so the service
    worker treats it as a live endpoint, not a cacheable asset).
  • TestWithStaticForwardsSignalingPaths pins the production wrapper: it asserts /registry
    (and /healthz) are forwarded to the signal server and a missing asset still 404s via the
    FS. Verified it FAILS with the exact /registry = 404 when the route is dropped.

Once merged I redeploy and confirm /registry is live.

🤖 Generated with Claude Code

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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@frahlg frahlg merged commit 8260918 into main Jun 14, 2026
2 checks passed
@frahlg frahlg deleted the fix-registry-route-webroot branch June 14, 2026 11:53
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