src/backend/server/server.go (~28KB) handles HTTP request orchestration but has no server_test.go next to it. The rest of the backend (pii/, proxy/, providers/, config/) has companion test files, so the server is an outlier.
What to add
Create src/backend/server/server_test.go covering at least:
- Happy-path request handling for one provider (OpenAI is fine)
- Malformed JSON body — should return 400
- Empty body — should return 400
- Missing/invalid
Authorization header pass-through
- Concurrent request handling (table-driven with
t.Parallel())
Hints
- Use
httptest.NewRecorder() / httptest.NewServer() — see src/backend/proxy/handler_test.go for the pattern already in use here.
- Stub or fake the PII detector + provider — you don't need a real ONNX model.
- Run with
make test-all or go test ./src/backend/server/....
Difficulty: good first issue, ~1–2 hours.
src/backend/server/server.go(~28KB) handles HTTP request orchestration but has noserver_test.gonext to it. The rest of the backend (pii/,proxy/,providers/,config/) has companion test files, so the server is an outlier.What to add
Create
src/backend/server/server_test.gocovering at least:Authorizationheader pass-throught.Parallel())Hints
httptest.NewRecorder()/httptest.NewServer()— seesrc/backend/proxy/handler_test.gofor the pattern already in use here.make test-allorgo test ./src/backend/server/....Difficulty: good first issue, ~1–2 hours.