From 17fc887500cb99047e2e693af07c7ceccccd2fbf Mon Sep 17 00:00:00 2001 From: Connor Johnstone Date: Thu, 10 Sep 2026 10:22:11 -0400 Subject: [PATCH] Add `news digest --no-push` Rebuilds the day's digest and its prose in place after a settings change, without sending a second pointer for a day already pushed. Deliberately a flag on the real command rather than a script beside it. A tuning path that diverges from the production path is what made the old system's replay harness worthless, and rebuilding today's digest by hand would have been exactly that divergence. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_015xPLgmcXCc9JjVwmQF63eM --- news/cli.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/news/cli.py b/news/cli.py index a573abf..c62bd0e 100644 --- a/news/cli.py +++ b/news/cli.py @@ -260,6 +260,14 @@ def cmd_digest(args) -> int: ntfy = NtfyConfig.from_env() base = ntfy.api_base or "" link = f"{base}/digest/{day}" + if args.no_push and not args.dry_run: + # Rebuild today's digest in place after a settings change, without + # sending a second pointer for a day already pushed. Deliberately + # the same code path as the scheduled run rather than a script + # beside it: a tuning path that diverges from the production path + # is what made the old system's replay harness worthless. + print(f"digest rebuilt, not pushed -> {link}") + return 0 if args.dry_run: print(f"[dry-run] push: {title}\n{body}\n-> {link}") for i in items[:8]: @@ -308,6 +316,8 @@ def main(argv: list[str] | None = None) -> int: p = sub.add_parser("digest", help="build the digest and push a pointer to it") p.add_argument("--dry-run", action="store_true") + p.add_argument("--no-push", action="store_true", + help="rebuild the digest and its prose without sending ntfy") p.set_defaults(fn=cmd_digest) p = sub.add_parser("serve", help="run the web server")