Skip to content

Commit 62dde5b

Browse files
fix(babysit): gate conflict-resolution pushes and handle UNKNOWN mergeable
1 parent daf4217 commit 62dde5b

3 files changed

Lines changed: 30 additions & 18 deletions

File tree

.agents/skills/babysit/SKILL.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,18 @@ round. Always check both conditions freshly after every push.
5454
stopping on a partial page would silently miss unresolved ones past the cutoff.
5555
If `mergeable` comes back `CONFLICTING`, go fix that first (step 2) before evaluating review
5656
state — a conflicting PR can't run CI, and this can happen mid-loop even on a PR that was
57-
clean at creation, since staging moves several times a day. Otherwise, if Greptile is 5/5 and
58-
every thread across all pages has `isResolved: true`, stop — report the outcome (see
59-
"Reporting" below) and skip the rest of this list.
57+
clean at creation, since staging moves several times a day. If `mergeable` is `UNKNOWN`
58+
(GitHub still computing it), don't stop and don't treat it as either state — just wait for
59+
the next round (step 9) and recheck then. Otherwise, if `mergeable` is `MERGEABLE`, Greptile
60+
is 5/5, and every thread across all pages has `isResolved: true`, stop — report the outcome
61+
(see "Reporting" below) and skip the rest of this list.
6062

6163
2. **If the PR has a merge conflict**, fix it: `git fetch origin staging`, `git rebase
62-
origin/staging`, resolve the conflicts for real (don't just take one side blindly), then push
63-
with `--force-with-lease`. Continue on to step 8 to trigger a fresh review of the resolved
64-
code.
64+
origin/staging`, resolve the conflicts for real (don't just take one side blindly), then run
65+
the same pre-push checks as step 6 (lint, boundary validation, and the conditional
66+
cleanup/db-migrate gates) before pushing with `--force-with-lease`, and verify the push
67+
landed the same way step 7 does. Skip steps 3–7 and go straight to step 8 to trigger a fresh
68+
review of the resolved code.
6569

6670
3. **If no review has run yet** (fresh PR, no Greptile/Cursor comments): they usually run
6771
automatically on PR open — confirm via `gh pr checks <n>` (look for `Cursor Bugbot` /

.claude/commands/babysit.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,18 @@ round. Always check both conditions freshly after every push.
5353
stopping on a partial page would silently miss unresolved ones past the cutoff.
5454
If `mergeable` comes back `CONFLICTING`, go fix that first (step 2) before evaluating review
5555
state — a conflicting PR can't run CI, and this can happen mid-loop even on a PR that was
56-
clean at creation, since staging moves several times a day. Otherwise, if Greptile is 5/5 and
57-
every thread across all pages has `isResolved: true`, stop — report the outcome (see
58-
"Reporting" below) and skip the rest of this list.
56+
clean at creation, since staging moves several times a day. If `mergeable` is `UNKNOWN`
57+
(GitHub still computing it), don't stop and don't treat it as either state — just wait for
58+
the next round (step 9) and recheck then. Otherwise, if `mergeable` is `MERGEABLE`, Greptile
59+
is 5/5, and every thread across all pages has `isResolved: true`, stop — report the outcome
60+
(see "Reporting" below) and skip the rest of this list.
5961

6062
2. **If the PR has a merge conflict**, fix it: `git fetch origin staging`, `git rebase
61-
origin/staging`, resolve the conflicts for real (don't just take one side blindly), then push
62-
with `--force-with-lease`. Continue on to step 8 to trigger a fresh review of the resolved
63-
code.
63+
origin/staging`, resolve the conflicts for real (don't just take one side blindly), then run
64+
the same pre-push checks as step 6 (lint, boundary validation, and the conditional
65+
cleanup/db-migrate gates) before pushing with `--force-with-lease`, and verify the push
66+
landed the same way step 7 does. Skip steps 3–7 and go straight to step 8 to trigger a fresh
67+
review of the resolved code.
6468

6569
3. **If no review has run yet** (fresh PR, no Greptile/Cursor comments): they usually run
6670
automatically on PR open — confirm via `gh pr checks <n>` (look for `Cursor Bugbot` /

.cursor/commands/babysit.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,18 @@ round. Always check both conditions freshly after every push.
4949
stopping on a partial page would silently miss unresolved ones past the cutoff.
5050
If `mergeable` comes back `CONFLICTING`, go fix that first (step 2) before evaluating review
5151
state — a conflicting PR can't run CI, and this can happen mid-loop even on a PR that was
52-
clean at creation, since staging moves several times a day. Otherwise, if Greptile is 5/5 and
53-
every thread across all pages has `isResolved: true`, stop — report the outcome (see
54-
"Reporting" below) and skip the rest of this list.
52+
clean at creation, since staging moves several times a day. If `mergeable` is `UNKNOWN`
53+
(GitHub still computing it), don't stop and don't treat it as either state — just wait for
54+
the next round (step 9) and recheck then. Otherwise, if `mergeable` is `MERGEABLE`, Greptile
55+
is 5/5, and every thread across all pages has `isResolved: true`, stop — report the outcome
56+
(see "Reporting" below) and skip the rest of this list.
5557

5658
2. **If the PR has a merge conflict**, fix it: `git fetch origin staging`, `git rebase
57-
origin/staging`, resolve the conflicts for real (don't just take one side blindly), then push
58-
with `--force-with-lease`. Continue on to step 8 to trigger a fresh review of the resolved
59-
code.
59+
origin/staging`, resolve the conflicts for real (don't just take one side blindly), then run
60+
the same pre-push checks as step 6 (lint, boundary validation, and the conditional
61+
cleanup/db-migrate gates) before pushing with `--force-with-lease`, and verify the push
62+
landed the same way step 7 does. Skip steps 3–7 and go straight to step 8 to trigger a fresh
63+
review of the resolved code.
6064

6165
3. **If no review has run yet** (fresh PR, no Greptile/Cursor comments): they usually run
6266
automatically on PR open — confirm via `gh pr checks <n>` (look for `Cursor Bugbot` /

0 commit comments

Comments
 (0)