src/backend/pii/masking_service.go orchestrates detection + generator lookup + mapping persistence, but lacks a dedicated masking_service_test.go. Sibling files (database.go, generators, detectors) all have tests.
What to add
Create src/backend/pii/masking_service_test.go covering:
- A string containing 2–3 PII types — each is masked, original/masked pairs are stored in the mapper
- Repeated identical PII — should map to the same dummy value within a session
- No PII in input — output equals input, no mappings stored
- Mixed-language / unicode input — does not panic and round-trips correctly
Hints
- Stub the detector to return a fixed
[]Entity rather than running ONNX in tests.
- Reuse
database_test.go patterns.
- Run
go test ./src/backend/pii/....
Difficulty: good first issue, ~1–2 hours.
src/backend/pii/masking_service.goorchestrates detection + generator lookup + mapping persistence, but lacks a dedicatedmasking_service_test.go. Sibling files (database.go, generators, detectors) all have tests.What to add
Create
src/backend/pii/masking_service_test.gocovering:Hints
[]Entityrather than running ONNX in tests.database_test.gopatterns.go test ./src/backend/pii/....Difficulty: good first issue, ~1–2 hours.