Summary
go run ./cmd/testserver panics before serving the browser build, so the documented browser mode at http://localhost:8081 cannot be used for tool testing or browser access.
Affected tool / area
Browser/server mode, cmd/testserver.
Repro steps
- From repo root, build the frontend:
cd frontend && npm run build.
- From repo root, run:
go run ./cmd/testserver.
- Observe startup panic before port
8081 is available.
Expected
The testserver starts and serves the frontend plus generated HTTP API endpoints on http://localhost:8081.
Actual
The process panics after registering services:
panic: catch-all wildcard '*filepath' in new path '/*filepath' conflicts with existing path segment 'health' in existing prefix '/health'
...
github.com/gin-gonic/gin.(*RouterGroup).StaticFS(...)
main.main()
/Users/vmini/workspace/devtoolbox/cmd/testserver/main.go:48
Root-cause notes
router.NewServer() already registers API/health routes, then cmd/testserver/main.go calls engine.StaticFS("/", http.Dir("frontend/dist")). Gin expands that to a root catch-all route (/*filepath), which conflicts with the existing /health prefix.
Verification
npm run build: passed.
go run ./cmd/testserver: reproduces consistently.
go test ./...: passed, so current automated tests do not cover this startup path.
Priority
High: this blocks browser-mode manual testing and any service-backed frontend E2E run through the HTTP API.
Summary
go run ./cmd/testserverpanics before serving the browser build, so the documented browser mode athttp://localhost:8081cannot be used for tool testing or browser access.Affected tool / area
Browser/server mode,
cmd/testserver.Repro steps
cd frontend && npm run build.go run ./cmd/testserver.8081is available.Expected
The testserver starts and serves the frontend plus generated HTTP API endpoints on
http://localhost:8081.Actual
The process panics after registering services:
Root-cause notes
router.NewServer()already registers API/health routes, thencmd/testserver/main.gocallsengine.StaticFS("/", http.Dir("frontend/dist")). Gin expands that to a root catch-all route (/*filepath), which conflicts with the existing/healthprefix.Verification
npm run build: passed.go run ./cmd/testserver: reproduces consistently.go test ./...: passed, so current automated tests do not cover this startup path.Priority
High: this blocks browser-mode manual testing and any service-backed frontend E2E run through the HTTP API.