Skip to content

feat(watcher): chase quiet PR reviewers - #74

Merged
EvanAgee merged 3 commits into
mainfrom
fm/fm-auto-chase-quiet-reviewer
Aug 31, 2026
Merged

EvanAgee merged 3 commits into
mainfrom
fm/fm-auto-chase-quiet-reviewer

Conversation

@EvanAgee

Copy link
Copy Markdown
Owner

Intent

Re-request a quiet external reviewer only when a tracked pull request is otherwise ready: checks green, review threads resolved, exactly one requested reviewer, and the reviewer last responded before the current head. Start the quiet clock when firstmate first observes that head. Re-request at most once per six-hour interval, cap requests per head, and escalate once after 24 quiet hours. Reset state on a new head. Never approve, merge, or dismiss a review. Keep the faapto merge rule unchanged.

What changed

  • Added a head-keyed reviewer chase state machine to the authenticated PR watcher path.
  • Revalidates eligibility and the exact head immediately before the DELETE and POST request pair.
  • Persists completed requests only after both calls succeed and rechecks eligibility before interrupted-request recovery.
  • Paginates reviewer history and rejects drafts, conflicts, multiple requested reviewers, unresolved threads, red checks, and outstanding changes-requested reviews.
  • Added watcher-boundary and security coverage for interval limits, head resets, ineligible PRs, escalation, recovery, and forbidden GitHub operations.

Validation

Passed locally:

  • bin/fm-test-run.sh tests/fm-pr-review-chase.test.sh (8 tests)
  • bin/fm-test-run.sh tests/fm-pr-check-security.test.sh
  • Bash syntax checks for every linted script
  • bin/fm-lint.sh
  • bin/fm-doc-audience-check.sh
  • npx unslop on every changed file. The tool reported no supported files.

The broader bin/fm-test-run.sh --changed selection ran 36 suites. It reported three local harness-sensitive failures outside the reviewer-chase suites: fm-arm-pretool-check.test.sh A13 command classification, fm-calm-pi-extension.test.sh HTML export DOM rendering, and fm-omp-detection.test.sh detecting the active Codex harness instead of unknown. Repository CI is the shipping authority for those checks.

Automated review exception

The no-mistakes intent and rebase steps completed on this preserved head. Its automated review/fix worker timed out four times. The captain determined that the reviewer infrastructure was the blocker and explicitly authorized shipping this head without another automated review round. A supported skip-review run could not start because the recovered head and the private gate ref had diverged, so this PR uses the approved direct fallback.

Pipeline

Updates from git push no-mistakes

Automated review was skipped under the exception above. No review pass is claimed.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 24 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3bb20634-46d7-4cd3-9980-c9ab42dab8fb

📥 Commits

Reviewing files that changed from the base of the PR and between 8bbd466 and 7da260b.

📒 Files selected for processing (8)
  • AGENTS.md
  • bin/fm-pr-review-chase.sh
  • bin/fm-teardown.sh
  • bin/fm-test-run.sh
  • bin/fm-watch.sh
  • docs/scripts.md
  • tests/fm-pr-check-security.test.sh
  • tests/fm-pr-review-chase.test.sh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@EvanAgee EvanAgee added the agent-pr-watched An agent merge watch is armed on this PR label Aug 31, 2026
@EvanAgee
EvanAgee merged commit 210a20a into main Aug 31, 2026
19 checks passed
EvanAgee added a commit that referenced this pull request Sep 22, 2026
Refs #1
Refs #42
Refs #60
Refs #65
Refs #73
Refs #74
Refs #107
Refs #109
Refs #117

## What I walked

In a throwaway `.scratch-c4-walk/home` and local Git repository:

```
$ FM_HOME=.scratch-c4-walk/home bin/fm-merge-local.sh walk-clean
merged fm/walk-clean into local main (aa84759 -> 1b9c678) in /Users/evanagee/.treehouse/firstmate-df5ff1/9/firstmate/.scratch-c4-walk/project
$ git -C .scratch-c4-walk/project log -1 --format=%s main
clean local landing
```

```
$ FM_HOME=.scratch-c4-walk/home FM_GH_BIN=.scratch-c4-walk/fake-gh bin/fm-flow.sh walk status
matched rulesets: main-protection=1 (rules: pull_request,required_status_checks) review=2 (rules: pull_request)
registry posture: [no-mistakes-prod-only +yolo]
main-protection ruleset 1 enforcement: active
main-protection ruleset gates: pull_request + required_status_checks present
review ruleset 2 enforcement: active
stored previous posture: <none>
verdict: full
```

```
$ FM_HOME=.scratch-c4-walk/home bin/fm-merge-local.sh walk-outage fm/walk-outage
error: task walk-outage is mode=no-mistakes; a PR-bound task lands locally only while GitHub is unreachable (state/.github-down present)
merge its PR with bin/fm-pr-merge.sh after approval
exit=1
```

The flow status used a local fake that returned read-only ruleset data. No GitHub request, PR, or push was made.

## Port record

The root already had guarded `fm-pr-merge.sh` and `fm-merge-local.sh`, canonical v2 PR poll registration and repair, GitLab merge verification, task control locks, leases, captain holds, and persisted merge authority. During the final rebase, the root also gained the outage landing skill unchanged.

I kept those root implementations. The port adds auto-arm, reviewer chase, review-thread gating, issue claims and post-merge closing, GitHub outage landing and return sync, and the project flow switch around them.

I dropped the fork's obsolete `captain-merge` token, `fm-pr-check-migrate.sh`, and C3 delivery timing, backfill, and token ledger changes. The root's captain-hold authority and repairable poll publication cover those seams.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-pr-watched An agent merge watch is armed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant