Skip to content

fix(watchdog): stop alerting on content the mirror is never meant to publish - #2541

Merged
Hugo0 merged 1 commit into
mainfrom
fix/watchdog-mirror-path-filter
Jul 28, 2026
Merged

fix(watchdog): stop alerting on content the mirror is never meant to publish#2541
Hugo0 merged 1 commit into
mainfrom
fix/watchdog-mirror-path-filter

Conversation

@Hugo0

@Hugo0 Hugo0 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Urgent-ish: the watchdog from #2538 is currently false-alarming to Discord every 15 minutes. This stops it.

What happened

Its first live run cried wolf:

mono content@d9a33de | mirrored from @0b0740a | peanut-content c268e5d | live c268e5d
error: the mirror is behind mono (mono content@d9a33de, mirror published 0b0740a) — stuck 869m

d9a33de is a docs edit to content/_system/ARCHITECTURE.md. The mirror rsyncs content/ with --exclude='_system/' (plus _system/generated/ separately), so that commit is correctly never published — but the hop-1 check compared mono's latest content/** commit against the mirror: sync from mono@<sha> stamp and read it as a stuck mirror. It would repeat every 15 min forever.

The fix

The stamp can't answer "is the mirror healthy" — it only ever names commits that happened to touch mirrored paths. Ask something with a real answer instead: did the mirror's last completed run succeed? A run that published nothing is healthy; one that errored is not. A broken mirror also now skips the 45-min grace period, since it won't fix itself.

Hop 2→3 (LIVE != TIP) is unchanged and still catches everything downstream.

QA

Dry-run against the exact live state that produced the false alarm:

mirror last run: success | peanut-content c268e5d | live c268e5d
VERDICT: CURRENT — no alert

YAML parses, bash -n clean, prettier clean.

Note on the false positive

The watchdog itself behaved correctly end to end — detected a divergence, posted to Discord, failed the run loudly. The bug was in what it compared, not in the alerting. Worth knowing the alert path is proven working.

…publish

The watchdog's first live run cried wolf and would have done so every 15
minutes forever.

It compared mono's latest commit touching `content/` against the sha stamped
in peanut-content's "mirror: sync from mono@<sha>" tip. But the mirror rsyncs
`content/` with `--exclude='_system/'` (plus `_system/generated/` separately),
so a commit touching only `content/_system/**` is correctly never published.
The comparison read that as the mirror being stuck. d9a33de — a docs edit to
content/_system/ARCHITECTURE.md — tripped it within minutes of merge.

The stamp can't answer "is the mirror healthy" because it only ever names
commits that happened to touch mirrored paths. Ask something that has a real
answer: did the mirror's last completed run succeed? A run that published
nothing is healthy; one that errored is not. A broken mirror also skips the
grace period, since it will not fix itself.

Verified against the same live state that produced the false alarm: now
reports CURRENT and stays silent.
@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
peanut-wallet Ready Ready Preview, Comment Jul 28, 2026 9:40am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9e21a0c4-6dcb-4d26-a7fa-4ef7c6e5a25d

📥 Commits

Reviewing files that changed from the base of the PR and between cc6975d and 23181a9.

📒 Files selected for processing (1)
  • .github/workflows/content-pipeline-watchdog.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/watchdog-mirror-path-filter

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Code-analysis diff

Painscore total: 6284.43 → 6284.43 (0)
Findings: 0 net (+0 new, -0 resolved)

@github-actions

Copy link
Copy Markdown
Contributor

🧪 UI test report — ✅ all green

Suites

  • unit: 2193 ran, 0 failed, 0 skipped, 37.5s

📊 Coverage (unit)

metric %
statements 61.2%
branches 44.8%
functions 50.6%
lines 61.5%
⏱ 10 slowest test cases
time test
4.2s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › never places two stickers in heavy overlap (broad seed sweep)
1.2s src/utils/__tests__/demo-api.test.ts › isDemoMode() is false when not running under Capacitor
0.5s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › every sticker stays within canvas at any count
0.4s src/app/actions/__tests__/api-headers-extended.test.ts › should not include apiKey in validateInviteCode body
0.3s src/app/(mobile-ui)/withdraw/__tests__/withdraw-states.test.tsx › Bank withdrawal keeps the $1 minimum for sub-$1 amounts
0.3s src/app/actions/__tests__/api-headers.test.ts › should include Content-Type in validateInviteCode
0.3s src/components/Card/share-asset/__tests__/shareAssetLayout.test.ts › keeps stickers off the username pill (final pass respects the keep-out)
0.2s src/utils/__tests__/demo-balance.test.ts › starts at the full balance on a fresh install and stamps a timestamp
0.2s src/utils/__tests__/url.utils.test.ts › uses the public BASE_URL in Capacitor, not the localhost WebView origin
0.2s src/utils/__tests__/demo-balance.test.ts › keeps a spent-down balance across a cold start within the TTL
📍 Inline annotations are in the **Unit test report** check above. Coverage artifact: `coverage-unit`. Generated by `.github/workflows/tests.yml`.

@Hugo0
Hugo0 merged commit 26a6c91 into main Jul 28, 2026
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant