turnstone/patterns
pyr0ball 02c1b1a032 feat: domain-view mapping for patterns and diagnose output (#32)
Adds 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: #32
2026-06-01 19:57:16 -07:00
..
default.yaml feat: domain-view mapping for patterns and diagnose output (#32) 2026-06-01 19:57:16 -07:00
sources-cluster.yaml refactor: rename ingest → glean throughout codebase 2026-05-20 23:02:55 -07:00
sources.yaml refactor: rename ingest → glean throughout codebase 2026-05-20 23:02:55 -07:00
telemetry.yaml feat(blocklist): telemetry YAML list + loader + domain matcher 2026-05-15 20:54:40 -07:00