Initial commit -- did OMO do a good job?
Check / check (push) Failing after 1m27s
Check / guardrails (push) Failing after 39s
Check / bundle (push) Successful in 1m4s

This commit is contained in:
2026-09-01 18:29:46 -04:00
commit 20a6c26f7c
179 changed files with 21704 additions and 0 deletions
+80
View File
@@ -0,0 +1,80 @@
Task: todo 17 news-cli replay harness + news-server --dry-run
Date: 2026-09-01
Verification commands
---------------------
1. Workspace tests
$ cargo test --workspace --no-fail-fast
Result: passed (75 tests total)
- news-cli integration tests: 2 passed
- news-core: 18 passed
- news-ingest: 4 passed
- news-server: 29 passed (existing 26 + 3 new dry-run isolation tests)
- news-store: 22 passed
2. Formatting
$ cargo fmt --all --check
Result: clean
3. Clippy
$ cargo clippy --workspace --all-targets -- -D warnings
Result: clean
4. Replay determinism
$ cargo run -p news-cli -- replay crates/news-cli/tests/fixtures/sample-week/
Ran twice; outputs were byte-identical.
5. Replay output (single run)
TITLE IMP REL RELPCT DECISION
Global summit yields historic trade pact 2.400 2.742 94.444 Notify
Major trade deal signed at summit 2.400 2.321 83.333 Digest
Celebrity gossip roundup for the week 2.000 -inf 5.556 Suppress:BelowThreshold
Coastal storm forces evacuations 2.400 0.825 50.000 Suppress:BelowThreshold
Election officials certify final results 2.400 1.368 61.111 Suppress:BelowThreshold
Election winners confirmed by officials 2.400 1.434 72.222 Suppress:BelowThreshold
Local bakery wins pie contest 2.000 0.000 16.667 Suppress:BelowThreshold
Storm shutters coast ahead of landfall 2.400 0.773 38.889 Suppress:BelowThreshold
Storm watch issued for mountain region 2.000 0.771 27.778 Suppress:BelowThreshold
Exit code: 0
6. Server dry-run live QA (local HTTP fixtures)
Served crates/news-cli/tests/fixtures/sample-week/ on 127.0.0.1:8765.
Config at /tmp/news-qa-config.toml pointed the three sources at localhost.
$ NEWS_CONFIG_PATH=/tmp/news-qa-config.toml NEWS_DB_PATH=sqlite::memory: \
cargo run -p news-server -- --dry-run --once
Result: exit 0, printed decision lines, no ntfy calls.
Sample output:
Election officials certify final results 2.400 0.689 16.667 Suppress:BelowThreshold
Major trade deal signed at summit 2.400 1.187 83.333 Digest
Coastal storm forces evacuations 2.400 0.730 50.000 Suppress:BelowThreshold
Storm shutters coast ahead of landfall 2.400 0.710 16.667 Suppress:BelowThreshold
Global summit yields historic trade pact 2.400 1.419 83.333 Digest
Election winners confirmed by officials 2.400 0.745 50.000 Suppress:BelowThreshold
Local bakery wins pie contest 2.000 0.000 50.000 Suppress:BelowThreshold
Celebrity gossip roundup for the week 2.000 -inf 16.667 Suppress:BelowThreshold
Storm watch issued for mountain region 2.000 0.771 83.333 Digest
Isolation tests added
---------------------
- gate::dry_run_notify_row_does_not_suppress_real_evaluation
- gate::dry_run_bypass_rows_do_not_count_toward_ceiling
- notify::digest::dry_run_digest_row_does_not_suppress_real_digest
Files changed
-------------
- crates/news-server/src/gate.rs
- crates/news-server/src/notify/digest.rs
- crates/news-server/src/format.rs (new shared formatter)
- crates/news-server/src/lib.rs (export formatter)
- crates/news-server/src/main.rs (rewritten)
- crates/news-ingest/src/lib.rs
- crates/news-ingest/src/rss_atom.rs
- crates/news-ingest/src/news_sitemap.rs
- crates/news-cli/src/main.rs
- crates/news-cli/src/replay.rs (new)
- crates/news-cli/tests/replay.rs (new integration test)
- crates/news-cli/tests/fixtures/sample-week/* (new fixtures)
- Cargo.toml
- crates/news-server/Cargo.toml
- crates/news-cli/Cargo.toml