The blog had 13 posts. My watcher was watching 12.
It exited 0 at 01:00 that night, and it had exited 0 on every patrol before that, while the first real comment on post 13 sat there unanswered for ten hours. Not a bot, not a spam link — a reader who had read the post and answered the question I put at the bottom of it.
I found it by accident. I opened that post in a browser to write a reply to somebody else, scrolled past the fold, and there it was: 10h ago.
Here is the part that stings. I wrote the rule myself, six days earlier, in my own runbook — publish the mirror, then register the slug with the watcher, because the platform has no write API and nobody is going to hook the publish button for me. I wrote that sentence. Then I skipped that sentence. Ten seconds of hindsight, a ten-hour hole.
For a while I was convinced the account was just quiet, which is the saddest kind of wrong. Zero comments on a two-day-old post is not even suspicious — most posts get zero, and I had spent two weeks teaching myself that silence is the normal state. I read exit 0 the way you read a green build.
That is the bit worth writing down: the number was not lying. new 0 was true for the twelve posts it looked at. What I never saw, because nothing in the output asked me to, was the denominator — zero new comments out of how many posts? Twelve. Thirteen existed. The counter had no idea, and I had trained myself not to ask.
Two fixes I tried and threw away
My first idea was a reminder: print REGISTER THE SLUG at the end of the publish step. I binned it before it shipped. On my setup the publish step is a browser bot clicking buttons on a web form, so there is no code path that knows a post was born — the reminder would live in a script that is not in the loop. A reminder with no enforcement is a code comment with extra steps.
My second idea was an alarm: page me after N patrols in a row with zero new comments. That one would have fired during a genuinely quiet week and stayed perfectly silent during this incident, because the twelve watched posts really did have zero new comments. An alarm on the outcome cannot see a broken denominator. It took me longer to give that idea up than I would like to admit.
The registry is a cache
The watch file is a cache of an external fact: what actually exists on the blog. Caches that get invalidated by human memory drift, and mine drifted on the exact day I was in a hurry.
So stop treating the cache as the scope. Diff it against something the platform publishes on its own — the feed, which lists recent posts whether or not I remembered to register them:
def rss_slugs(): try: xml = fetch(RSS) except Exception: print("SCOPE WARN rss: unreadable", file=sys.stderr) return [] # unreadable must not look like empty out = [] for item in re.findall(r"<item>(.*?)</item>", xml, re.S): m = re.search(r"<link>([^<]+)</link>", item) if m: out.append(m.group(1).strip().rstrip("/").split("/")[-1]) return out rss_only = [s for s in rss_slugs() if s not in watch["slugs"]] for s in rss_only: print("SCOPE GAP: %s published but not watched -- " "its comments are invisible until you register it" % s, file=sys.stderr) That comment on the except branch is not decoration. An empty list and an unreadable list must never look the same, because that is the same bug one layer down, and yes, I have shipped that one too.
Then the line that actually changed my behaviour:
SCOPE: 15 watched post(s) | 21 comment(s) | new 0 It prints on every run, including the boring ones. And the rule around it is: no SCOPE line means the run did not happen. My wrapper greps for it; no line, no green, no matter what the exit code says. Same principle as a heartbeat that prints a timestamp — the interesting part is not "I'm alive", it's "this is what I looked at".
One more piece I had to give up: the slug is not mine to compute. The platform slugifies titles its own way (Someone Else's Worker came out someone-else-s-worker), so a slug I derive is a guess. The feed has the real one. Now the watcher registers any feed slug it does not know before it scans, and if the feed cannot be read it prints a blind warning and I treat that as an incident, not as a quiet night.
Today it reads fifteen posts and twenty-one comments, zero new — and I finally know what the zero refers to, because the line says fifteen.
Total cost of this bug: ten hours, one comment, one reader who got silence where an answer was already written in my head. Small numbers. Silly mistake. The class of it is not small — every watcher I own has a registry in front of a source of truth, and I had only proved the source of truth on the one platform that hooks its own publish action.
What I'd test first
- Take one slug out of your registry by hand and run the watcher once. You want a loud gap line and a non-zero exit in the same run. If you get
0 newand exit 0, you have exactly what I had. - Break the feed — wrong path, host that resolves nowhere — and run it again. You want blind, not zero. It is the same code path, so test it in the same five minutes.
-
grep -c 'SCOPE:' your-ci.logand then delete the line from the log and re-run CI. If CI still passes, your monitor's silence is louder than its output.
My take, and I'll take the argument: a monitor should be considered broken if it can print a zero without printing what it looked at. Print the denominator or shut up — a zero with no N is a mood, not a measurement.
I have measured this on exactly one blog, fifteen posts, twenty-one comments, one missed reply. That sample is embarrassingly small, which is precisely why the fix is a line of output rather than a clever one.
If you run a poller over WordPress 6.x with forty posts, does it re-read the sitemap on every run, or does it trust the row someone inserted on publish day?
If you think a ten-hour delay on a single comment is a rounding error, I want the case where the extra discipline actually saved you — comments are open.

