feat(ops): forward-progress watchdog — catch "busy but not progressing"#457
Open
hadamrd wants to merge 1 commit into
Open
feat(ops): forward-progress watchdog — catch "busy but not progressing"#457hadamrd wants to merge 1 commit into
hadamrd wants to merge 1 commit into
Conversation
Event watchers (PR_OPEN/STALL/DEAD) are blind to a loop that is busy but not making forward progress — e.g. spinning for hours re-reviewing one approved-but-blocked PR while every liveness check stays green (cost ~9h once). The invariant that matters is merges landing, not liveness. scripts/progress-watchdog.sh watches forward progress and exits non-zero on a tripwire so a supervisor/operator/agent can react: - 10 loop entrypoint absent (matches the real `bin/forge-loop`, not the self-matching string "forge-loop run") - 11 stop-file present - 12 two-factor stall: no merge in 90min AND event log quiet 30min (a fresh event log = the loop is legitimately building/repairing a risk-gated PR that parks for human review, which IS progress) - 13 an open PR piling up comments past a cap (busy-but-stuck signature) Repo-agnostic via REPO_PATH/GH_REPO env; polls merges with token-free ls-remote. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
scripts/progress-watchdog.sh— a repo-agnostic supervisor that watches forward progress (merges landing), not just liveness.Why
Event watchers (PR_OPEN / STALL / DEAD) are blind to a loop that is busy but not progressing — spinning for hours re-reviewing one approved-but-blocked PR while every liveness check stays green. That blind spot cost ~9h of wasted grind once. The invariant that actually matters is merges landing.
Tripwires (exit non-zero so a cron/systemd/operator/agent can react)
bin/forge-loop, not the stringforge-loop run(which self-matches an interactive shell)Usage
All thresholds are env-overridable (STALL_SECS / QUIET_SECS / POLL_SECS / COMMENT_CAP). Merge polling uses token-free
git ls-remoteso no GH_TOKEN is required (which would otherwise break theghCLI).Test
bash -nsyntax-clean🤖 Generated with Claude Code