The watcher engine
The engine is the part of Watcher that actually watches: the loop that runs for one watch, decides whether anything happened, and delivers the result. Every trigger — a cron job, a button in the app, an API call — ends up in the same loop.
This section documents it at operational depth: precise enough to predict its behaviour and debug it, without requiring you to read the source. If you do want the source, Internals is the bridge.
Why it exists
Section titled “Why it exists”Polling a page by hand does not scale, keyword matching produces false alarms, and asking a language model alone produces confident fiction. The engine exists to wrap a model in checks that do not depend on the model being right:
- it only judges content it has not judged before,
- it demands a quote it can find in the page,
- it grades the source that quote came from,
- it asks a second, different model about every trigger,
- and it remembers what it already told you.
What it is responsible for
Section titled “What it is responsible for”- Redelivering alerts that previously failed to send.
- Collecting from every source, tolerating individual failures.
- Reducing to genuinely new content.
- Asking the evaluator for a verdict, with recent history as context.
- Validating the verdict’s evidence against what was collected.
- Deciding an alert tier.
- Suppressing duplicates, exactly and semantically.
- Delivering on every configured channel.
- Persisting what it learned.
What it is not responsible for
Section titled “What it is not responsible for”Read in this order
Section titled “Read in this order”How it worksOne run, stage by stage, with the early exits named.
TriggersThe four things that can start a run.
Decision rulesExactly when an alert fires, and at which tier.
Run outcomesAll ten outcomes: meaning, stored state, and what to do.
Failures and retriesWhat happens when a source, a model or a channel breaks.
What Watcher remembersState between runs, and the consequences you will actually notice.
InternalsModules, ports and the concurrency model.