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) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015xPLgmcXCc9JjVwmQF63eM
This commit is contained in:
connorandClaude Opus 5 committed 2026-09-10 10:22:11 -04:00
1 parent da6bf4fd8d
commit 17fc887500
1 file changed
+10
+10
View File
@@ -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")