Cybersecurity-Projects/PROJECTS/intermediate/security-news-scraper/cmd/nadezhda
CarterPerez-dev f65d197c96 feat(nadezhda): M7 watch daemon with optional webhook notify
Add a watch command (--interval, --once, --no-enrich): a long-lived daemon that re-ingests every enabled source on a ticker and, when a webhook is configured, POSTs genuinely new high-signal stories to it (Slack, Discord, or any JSON endpoint via a text/content/items payload).

internal/watch is a pure, stdlib-only scheduler: the pipeline is injected as a Cycle closure, so the daemon is fully unit-testable with a fake ticker and notifier. Graceful shutdown on SIGINT/SIGTERM returns cleanly; a cycle error is logged and the loop continues (fail-soft).

Notify uses a dedicated fetch-time watermark (store.NewlyFetchedClusters) so a freshly ingested but older-dated advisory is surfaced, which a publish-time filter would drop. Notable stories are capped by watch.notify_max_items and filtered by score threshold or KEV status.

Extract the shared ingest and cluster sequence (pipeline.go) so scrape and watch cannot drift, and route scrape and enrich through cmd.Context() so they honor SIGTERM too.
2026-07-06 22:07:31 -04:00
..
ai.go feat(nadezhda): AI setup wizard (nadezhda ai) + credential store + Ollama port fix 2026-07-06 21:26:10 -04:00
cve.go feat(nadezhda): M3 CVE extraction + NVD/KEV/EPSS enrichment 2026-07-05 15:54:49 -04:00
digest.go feat(nadezhda): M4 ranking + digest + Markdown/JSON export 2026-07-05 18:42:57 -04:00
enrich.go feat(nadezhda): M7 watch daemon with optional webhook notify 2026-07-06 22:07:31 -04:00
ideate.go feat(nadezhda): M6 AI ideation layer (ideate + TUI i-key) 2026-07-06 21:26:52 -04:00
ideate_test.go feat(nadezhda): M6 AI ideation layer (ideate + TUI i-key) 2026-07-06 21:26:52 -04:00
list.go feat(nadezhda): M3 CVE extraction + NVD/KEV/EPSS enrichment 2026-07-05 15:54:49 -04:00
main.go feat(nadezhda): M7 watch daemon with optional webhook notify 2026-07-06 22:07:31 -04:00
pipeline.go feat(nadezhda): M7 watch daemon with optional webhook notify 2026-07-06 22:07:31 -04:00
root.go feat(nadezhda): AI setup wizard (nadezhda ai) + credential store + Ollama port fix 2026-07-06 21:26:10 -04:00
scrape.go feat(nadezhda): M7 watch daemon with optional webhook notify 2026-07-06 22:07:31 -04:00
sources.go feat(nadezhda): M0 scaffold for security news + CVE aggregator 2026-07-05 13:22:08 -04:00
tui.go feat(nadezhda): M6 AI ideation layer (ideate + TUI i-key) 2026-07-06 21:26:52 -04:00
version.go feat(nadezhda): M0 scaffold for security news + CVE aggregator 2026-07-05 13:22:08 -04:00
watch.go feat(nadezhda): M7 watch daemon with optional webhook notify 2026-07-06 22:07:31 -04:00
watch_test.go feat(nadezhda): M7 watch daemon with optional webhook notify 2026-07-06 22:07:31 -04:00