turnstone/tests
pyr0ball da4db5d6b3 fix: split incidents tables to dedicated turnstone-incidents.db (#60)
FTS5 bulk-insert write locks starved the incident API and bundle endpoints
during log bursts (sonarr/radarr, high-volume docker sources). Fix mirrors
the context_facts split (context -> turnstone-context.db):

- Add INCIDENTS_DB_PATH / TURNSTONE_INCIDENTS_DB env var in rest.py
- Add _INCIDENTS_SCHEMA, ensure_incidents_schema(), and
  migrate_incidents_to_dedicated_db() in glean/pipeline.py
- Stub out incidents/received_bundles/sent_bundles in _SCHEMA (no-op
  CREATE IF NOT EXISTS) so legacy single-file deployments still open
- Thread incidents_db_path through diagnose_stream -> run_pipeline ->
  FalsePositiveSuppressor.suppress -> _fetch_resolved_incidents
- One-shot migration on startup: copy existing rows from main DB to
  incidents DB via INSERT OR IGNORE (idempotent, safe to re-run)
- Fix test_blocklist_endpoints fixtures to patch CONTEXT_DB_PATH and
  INCIDENTS_DB_PATH alongside DB_PATH (worktree has no data/ dir)

372 tests passing.

Closes: #60
2026-06-01 15:54:23 -07:00
..
context refactor: extract embeddings service layer — decouple context embedder from Ollama 2026-05-25 11:01:25 -07:00
__init__.py feat: initial Turnstone POC — ingest, FTS search, MCP server 2026-05-08 12:12:34 -07:00
test_blocklist_endpoints.py fix: split incidents tables to dedicated turnstone-incidents.db (#60) 2026-06-01 15:54:23 -07:00
test_diagnose_classifier.py feat: Stage 2 — SeverityClassifier for multi-agent diagnose pipeline (issue #29) 2026-05-25 13:27:17 -07:00
test_diagnose_hypothesizer.py fix: defensive coercion for LLM confidence and cluster fields in hypothesizer 2026-05-25 14:00:30 -07:00
test_diagnose_pipeline.py feat: Stage 5 synthesizer + pipeline orchestrator + feature flag wiring (issue #29) 2026-05-25 14:56:25 -07:00
test_diagnose_suppressor.py fix: invert suppress_threshold semantics to similarity_threshold in FalsePositiveSuppressor 2026-05-25 18:58:52 -07:00
test_diagnose_synthesizer.py feat: Stage 5 synthesizer + pipeline orchestrator + feature flag wiring (issue #29) 2026-05-25 14:56:25 -07:00
test_diagnose_timeline.py feat: Stage 1 — TimelineReconstructor for multi-agent diagnose pipeline (issue #29) 2026-05-25 12:54:15 -07:00
test_export_corpus.py feat: periodic corpus export — push ERROR/CRITICAL entries and incidents to Avocet 2026-05-11 17:08:35 -07:00
test_glean_dmesg.py refactor: rename ingest → glean throughout codebase 2026-05-20 23:02:55 -07:00
test_glean_fingerprint.py feat: fingerprint-based incremental glean — skip unchanged files (#30) 2026-05-25 11:01:18 -07:00
test_glean_pipeline_ssh.py feat: SSH remote host glean — transport layer and pipeline integration (closes #22, backend) 2026-05-20 23:03:13 -07:00
test_glean_qbittorrent.py refactor: rename ingest → glean throughout codebase 2026-05-20 23:02:55 -07:00
test_glean_ssh.py feat: SSH remote host glean — transport layer and pipeline integration (closes #22, backend) 2026-05-20 23:03:13 -07:00
test_glean_syslog.py refactor: rename ingest → glean throughout codebase 2026-05-20 23:02:55 -07:00
test_glean_tautulli.py refactor: rename ingest → glean throughout codebase 2026-05-20 23:02:55 -07:00
test_glean_wazuh.py refactor: rename ingest → glean throughout codebase 2026-05-20 23:02:55 -07:00
test_service_blocklist.py refactor: rename ingest → glean throughout codebase 2026-05-20 23:02:55 -07:00
test_service_pihole.py fix(blocklist): validate _v6_auth session JSON, add auth-failure test 2026-05-15 21:03:03 -07:00
test_services_diagnose.py refactor: rename ingest → glean throughout codebase 2026-05-20 23:02:55 -07:00
test_services_llm.py feat: switch LLM backend to OpenAI-compat; add cf-orch remote inference support 2026-05-12 12:58:38 -07:00
test_watch_watcher.py feat: add file tail source type; configure example-node watchers 2026-05-11 15:44:10 -07:00