feat: domain-view mapping for patterns and diagnose output (#32) #64
No reviewers
Labels
No labels
compliance
demo
deployment
docs
enhancement
parser
patterns
performance
security
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Circuit-Forge/turnstone#64
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/32-domain-view"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
LogPatterngainsdomain: str = ""— backward compatible, existing YAML withoutdomain:still parsesby_domain: {domain: count}— instant triage signal before reading individual entries/api/search?domain=networkingpost-filters results to entries tagged with patterns in that domainTest plan
by_domain: {storage: N, media: M}in summary/api/search?q=error&domain=networking— confirm only networking-tagged entries returneddomain:field (future custom patterns) return empty domain counts without errorsAdds a domain: field to the pattern taxonomy and surfaces per-domain hit counts in diagnose summaries for faster triage. Changes: - LogPattern gains domain: str = "" (backward-compatible default) - load_patterns() reads domain from YAML via p.get("domain", "") - All 42 patterns in default.yaml annotated across 10 domains: service_health | networking | auth | storage | memory | kernel | power | web_proxy | media | gpu - _pattern_domain dict built at startup from compiled patterns - _domain_counts() helper: maps matched_patterns tags to domains, counts hits per domain across a result set - diagnose POST: summary includes by_domain: {domain: count} - diagnose stream: summary SSE event includes by_domain when pattern_domain is provided (passed from rest.py at startup) - /api/search gains ?domain= filter: post-filters results to entries whose matched_patterns include at least one tag in the given domain Test fixtures: patch _pattern_domain={} and CONTEXT_DB_PATH in test_blocklist_endpoints.py and test_glean_tautulli.py (worktree has no data/ dir; same fix as feat/60-incidents-db). 372 tests passing. Closes: #32Pull request closed