Skip to content

feat: add repository-owned babysit-pr skill - #25

Merged
shaug merged 8 commits into
mainfrom
scott/issue-23-babysit-pr
Jul 21, 2026
Merged

feat: add repository-owned babysit-pr skill#25
shaug merged 8 commits into
mainfrom
scott/issue-23-babysit-pr

Conversation

@shaug

@shaug shaug commented Jul 21, 2026

Copy link
Copy Markdown
Owner

TL;DR

Adds a portable, repository-owned babysit-pr skill that drives an existing GitHub PR through candidate-bound validation, feedback, review, CI, mergeability, and an explicitly authorized completion policy.

Summary

  • Defines runtime-neutral ready_to_merge, merge_when_ready, and watch_until_closed contracts with strict authority and mutation-ownership boundaries.
  • Adds an adapted, pinned Apache-2.0 watcher with exact head/base identity, paginated GitHub evidence, unresolved-thread state, bounded failed-run retries, atomic state, and single-watcher locking.
  • Requires fresh repository-owned review-code-change evidence after head-changing fixes and for standalone readiness when the caller has not supplied current evidence.
  • Covers CI triage, untrusted feedback, connector policy, base drift, partial APIs, concurrent ownership, missing capabilities, and terminal handoffs with focused tests and 21 evaluation cases.
  • Documents the skill in the repository and wires it into the full validation suite. Integration into implement-ticket remains the dependent Delegate implement-ticket PR lifecycle to babysit-pr #24 follow-up.

Validation

  • just check
  • git diff --check
  • python3 skills/babysit-pr/scripts/gh_pr_watch.py --repo shaug/agent-scripts --pr 22 --once

Tickets

Fixes #23

shaug added 8 commits July 20, 2026 17:07
## Summary

- Serialize watcher and retry-controller access to the PR state file
- Reserve one durable per-head retry cycle before rerunning any workflow
- Report per-run trigger failures without rolling back the consumed budget
- Add regression coverage for partial command failure and competing state

## Why

- Keep bounded retry policy correct across partial GitHub failures and
  concurrent watcher activity
## Summary

- Centralize repository/PR state-path resolution for every watcher mode
- Route one-shot snapshots through the same lock as watch and retry operations
- Reject target identity changes while the state lock is held
- Add focused one-shot locking and target-change coverage

## Why

- Prevent one-shot state writes from racing with and erasing durable retry
  reservations or feedback-deduplication state
## Summary
- Pass the locked state path into snapshot collection
- Reject live target drift before reading or writing state
- Replace mocked mismatch coverage with a real double-resolution regression

## Why
- Ensure every state mutation occurs under the exact repository and pull request lock
## Summary
- Capture the initially resolved repository and pull request as immutable lock context
- Reject target drift before any state read or write, including explicit state files
- Add regression coverage for automatic target changes with a fixed state path

## Why
- Keep every snapshot and retry fenced to the exact pull request whose state lock was acquired
@shaug
shaug marked this pull request as ready for review July 21, 2026 02:51
@shaug
shaug merged commit 9156f05 into main Jul 21, 2026
1 check passed
@shaug
shaug deleted the scott/issue-23-babysit-pr branch July 21, 2026 04:40
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.

Add a repository-owned babysit-pr skill

1 participant