npm run witness:collect
One collector pass: fetch every enabled source, parse it, archive it, and write what changed.
npm run witness:collect
npm run witness:collect -- --dry-run
npm run witness:collect -- --source anthropic-pricingFlags
| Flag | Meaning |
|---|---|
--dry-run | Needs no database. Fetches and parses, writes nothing. |
--source <id> | Read one source, enabled or not |
--source reading a disabled source is what pairs with `witness:seed --hold-new`: a new adapter gets watched against the live page before it is turned on for everyone.
What one pass writes
A fetch_run, a fetch row per source with a final status, an observation per parsed figure, and whatever price periods and market events the comparison implies.
A priced row the registry does not hold becomes a candidate rather than an observation.
In-flight runs and freshness
A run's row is written when it finishes. While it is working, the source's last completed run is still the most recent one, so a source can read as stale while it is actively being read.
Check whether a run is live before acting on a stale reading. Re-enqueueing a job that is eighty percent through a backfill makes it worse.
The engine runs at the end
Trigger evaluation happens after the collector's writes, in the same pass, so a price move and the watch it fires are one unit of work rather than two that can disagree.
