From fa1afd7b5df346e5610d405bd469d2bb8770b71c Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 1 Jul 2026 18:50:25 +0000 Subject: [PATCH] host: mount otel/routes before blog-routes so GET /otel isn't swallowed by /:slug The otel dashboard route (GET /otel) is single-segment, so blog-routes' /:slug catch-all shadowed it (404 'no post: otel'); only /otel/stream (two segments) survived. Move otel/routes ahead of the blog routes. Live-only wiring fix (route order); no test change. Co-Authored-By: Claude Opus 4.8 --- lib/host/serve.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/host/serve.sh b/lib/host/serve.sh index dc82404c..722fa152 100755 --- a/lib/host/serve.sh +++ b/lib/host/serve.sh @@ -194,6 +194,7 @@ EPOCH=1 # auto-mounts /login + /logout and wraps everything in the signed-session # middleware, so a browser logs in then publishes. The bearer resolver is a stub # (no API tokens configured) — browser session is the live auth path for now. - # blog-routes LAST — its GET /:slug catch-all must not shadow the rest. - echo "(eval \"(host/serve $PORT (list host/static-routes host/feed-routes host/relations-routes (host/blog-write-routes (fn (tok) nil)) host/blog-routes otel/routes))\")" + # blog-routes LAST — its GET /:slug catch-all must not shadow the rest. otel/routes must + # come BEFORE blog-routes, or GET /otel is swallowed by /:slug (only /otel/stream survives). + echo "(eval \"(host/serve $PORT (list host/static-routes host/feed-routes host/relations-routes otel/routes (host/blog-write-routes (fn (tok) nil)) host/blog-routes))\")" } | exec "$SX_SERVER"