Commit 8c7d9d2
committed
fix(pi): correct Babysit check, budget, and push-guard accuracy
Correctness:
- The `.github/` push refusal compared raw `git diff --name-only` output,
which git C-quotes for non-ASCII paths. `.github/workflows/évil.yml`
arrived as `".github/workflows/\303\251vil.yml"` — leading quote included
— so neither `.github` nor `.github/` matched and the file pushed. Both
name-listing diffs now pin `core.quotePath=false`; Create PR's does too so
`changedFiles` reports real names.
- `CANCELLED` and `STALE` were counted as non-failing conclusions, so a
cancelled required check produced `checksGreen: true` and `stopReason:
'clean'` on a PR branch protection still blocks. Both now fall through to
failing, matching every other unknown conclusion.
- The per-round check bound counted optional checks, so a repo with a wide
optional matrix ended the run at `bounds_exceeded` before a single review
thread was addressed. Only required-check overflow is fatal now; the rest
trims, required checks first, and reports what was left out. This also
makes the prompt's existing slice reachable.
- A re-review request that posted nothing still re-armed `requestedAt` with
`landed: false`, leaving the loop waiting on a review nobody had asked
for — burning the remaining lifetime on a billed idle sandbox before
reporting `awaiting_review` on a clean PR. The previous request now stands.
- Prompt bounds threw where every other bound in the file trims, ending a
busy PR's run on round one after the PR and its review comments were
already posted. They now drop trailing entries and note the omission.
- `babysitMode` used a strict boolean compare; a `switch` input arriving as
the string 'true' silently opened a draft PR and skipped Babysit while the
editor showed it enabled. Matches `wait-handler`'s coercion now.
- The fork check compared head against the block's typed owner/repo, so a
renamed repository — which GitHub serves through a 301 while reporting the
canonical name — was reported as a fork. Compares head against base now.
- Each round's diff is capped like Create PR's. The cumulative guard measures
the net change, so a round that reverts an earlier addition passed it while
contributing a full-size diff.
- Reviewer mentions must start with `@`. Each entry becomes its own issue
comment re-posted every round, so a comma inside one left prose on the PR.
Efficiency:
- Thread and check reads per poll now run together; neither consumes the
other's result and both are paginating loops.
- `babysitReviewLandedSince` takes the `latestReview` the caller already
fetched instead of re-listing the PR for it.
- Actions log reads fan out in small batches rather than one at a time.
Cleanup:
- `BabysitFinalizeError` was a twin of `BabysitGitHubError`; folded together.
- Replaced the hand-inlined copies of `threadsAreClean`.
- Dropped `MEMORY_MODES`, a duplicate of `AUTHORING_MODES`, and the
`parsePiMode` tombstone for a mode that never shipped.
Adds regression tests for the quoted `.github` path, cancelled/stale required
checks, and the renamed-repository snapshot.1 parent 810844c commit 8c7d9d2
11 files changed
Lines changed: 415 additions & 200 deletions
File tree
- apps/sim
- blocks/blocks
- executor/handlers/pi
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 78 | | |
83 | 79 | | |
84 | 80 | | |
| |||
467 | 463 | | |
468 | 464 | | |
469 | 465 | | |
470 | | - | |
| 466 | + | |
471 | 467 | | |
472 | 468 | | |
473 | 469 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
629 | 655 | | |
630 | 656 | | |
631 | 657 | | |
| |||
0 commit comments