Skip to content

feat: improve search response cleansing with expanded allowlists - #76

Merged
steve-calvert-glean merged 1 commit into
mainfrom
scalvert/search-response-cleansing-v2
Apr 6, 2026
Merged

feat: improve search response cleansing with expanded allowlists#76
steve-calvert-glean merged 1 commit into
mainfrom
scalvert/search-response-cleansing-v2

Conversation

@steve-calvert-glean

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #71. Improves the search response cleansing logic based on real API response analysis:

  • Expanded metadata allowlist: owner, assignedTo, updatedBy, status, priority, container, datasourceId — these are useful fields present in Jira, GitHub, and other datasource responses
  • Snippet field fix: use text instead of deprecated snippet key to match actual API responses
  • Person allowlist trimmed: removed email (not present in search API responses), keeping only name
  • Empty snippet filtering: strips snippets with blank/missing text to avoid noisy empty entries
  • Snapshot tests: new test file with real-world fixture data (people, jira, github, mixed queries) plus a structural validator that asserts no unexpected keys leak through the allowlist

Test plan

  • go test ./internal/output/ -run Cleanse -v — all 10 tests pass
  • Snapshot tests validate against 4 real API response fixtures
  • Structure test independently validates no disallowed keys in output

🤖 Generated with Claude Code

…snapshot tests

- Expand metadata allowlist: owner, assignedTo, updatedBy, status,
  priority, container, datasourceId
- Fix snippet field: use "text" instead of deprecated "snippet" key
- Trim person allowlist: drop "email" (not present in API responses)
- Filter empty snippets: remove snippets with blank/missing text
- Add snapshot tests with real-world fixtures (people, jira, github,
  mixed queries) and structural validation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@steve-calvert-glean steve-calvert-glean added bug Something isn't working labels Apr 6, 2026
@steve-calvert-glean
steve-calvert-glean merged commit 40f21cc into main Apr 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants