turnstone/app/tasks
pyr0ball a9d8171fe8 feat(incidents): auto-incident detection + example-node Podman setup
Auto-incident detector:
- New app/tasks/incident_detector.py: post-glean error cluster detector
  - Sliding window algorithm: source + N errors within window_s seconds
  - Deduplication via issue_type='auto:{source_id}' + interval overlap check
  - Respects TURNSTONE_AUTO_INCIDENT_THRESHOLD (default 5) and
    TURNSTONE_AUTO_INCIDENT_WINDOW (default 600s) env vars
  - 20 tests all passing
- Wired into glean_scheduler.run_once() and scheduler_loop()
- TURNSTONE_AUTO_INCIDENT env var to disable (default enabled)

Podman standalone improvements:
- REPO_DIR auto-detected from script location (no longer hardcoded to /opt/turnstone)
- DATA_DIR/PATTERNS_DIR/HF_CACHE_DIR configurable via env vars
- Bootstrap step copies host-specific sources-<hostname>.yaml on first run
- Auto-incident env vars passed through

example-node sources:
- patterns/sources-example-node.yaml: Sonarr, Radarr, Bazarr, Prowlarr,
  Tautulli, autoscan, organizr, nextcloud, journal export
2026-06-11 18:37:53 -07:00
..
__init__.py feat: periodic ingest scheduler + Orchard submission pipeline 2026-05-20 08:57:25 -07:00
anomaly_scorer.py feat: anomaly scoring pipeline (#10) 2026-06-09 11:15:13 -07:00
cybersec_scorer.py feat: cybersec zero-shot scoring pipeline (#9) 2026-06-10 01:03:25 -07:00
glean_scheduler.py feat(incidents): auto-incident detection + example-node Podman setup 2026-06-11 18:37:53 -07:00
incident_detector.py feat(incidents): auto-incident detection + example-node Podman setup 2026-06-11 18:37:53 -07:00