src/backend/processor/response.go is the only file in the processor package and has no response_test.go. Response post-processing (PII restoration / streaming handling) is on the hot path and worth testing in isolation.
What to add
Create src/backend/processor/response_test.go with table-driven tests for:
- Non-streaming JSON response — masked values are restored to originals
- Streaming/SSE response — chunks are reassembled and restored correctly
- Empty body / no PII — passes through unchanged
- Mapping miss (response contains a masked token with no entry in the map) — fallback is documented and tested
Hints
- Mirror the style of
src/backend/pii/database_test.go for table-driven tests.
- Construct mappings manually rather than wiring up the full detector.
- Run
go test ./src/backend/processor/....
Difficulty: good first issue, ~1–2 hours.
src/backend/processor/response.gois the only file in theprocessorpackage and has noresponse_test.go. Response post-processing (PII restoration / streaming handling) is on the hot path and worth testing in isolation.What to add
Create
src/backend/processor/response_test.gowith table-driven tests for:Hints
src/backend/pii/database_test.gofor table-driven tests.go test ./src/backend/processor/....Difficulty: good first issue, ~1–2 hours.