feat(dev-loop): add one verified repair pass - #1070
Merged
Merged
Conversation
Ported from a downstream fork, where this has been running in production since 2026-09-04 (dogfooded successfully as recently as today against a real PR - verified fix, PASS review, clean merge). Closes the gap this repo's own dev-loop chain has: it verifies a feature PR and its review receipt, but if review comes back actionable, the chain just stops there with nothing to fix it - a human has to intervene even for something the review already diagnosed precisely. Adds one bounded repair pass to the loop: feature -> verify PR/checks -> review -> [actionable?] -> repair -> verify repaired checks -> re-review -> record The repair dispatch is authorized only by a fresh review receipt bound to the PR's exact current head SHA (scripts/dev-loop-review.sh verify), so a stale or forged "the review said to fix this" claim can't trigger it. skills/feature/SKILL.md's new repair:<owner/repo#N>@<sha> selector fails closed on any mismatch: wrong SHA, missing receipt, no actionable finding. One repair pass only - re-review after the fix has to come back clean or the chain fails, it never loops indefinitely trying to self-heal. Also adds a `validate-owned-target` guard to scripts/dev-loop-pr.sh (never dispatch dev-loop against a repo the authenticated operator doesn't have push access to) and a SHA-verified fetch_verified_body helper to scripts/dev-loop-review.sh, so the repair context handed to the fix pass is provably the same review that authorized it, not whatever the PR's review list happens to contain by the time repair runs. max_dispatches raised from 2 to 4 (feature, review, repair, re-review). eyebrowlock.json and catalog/*.json regenerated against current main; feature/SKILL.md's content hash is the only real drift, no capability expansion (verified with eyebrow verify --ci: exit 0). Test plan: - test_dev_loop_repair.sh (new): gate logic, PR-open/SHA-bound checks - test_dev_loop_handoff.sh: validate-owned-target coverage added - test_dev_loop_review.sh: fetch_verified_body coverage added - test_chain_runner.sh: 5/5 passed, no regression - All four suites run clean on this branch
3 tasks
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.
Summary
Ported from a downstream fork, where this has been running in production since 2026-09-04 (dogfooded successfully as recently as today against a real PR: verified fix, PASS review, clean merge). Closes a gap this repo's own dev-loop chain has: it verifies a feature PR and its review receipt, but if review comes back actionable, the chain just stops there with nothing to fix it. A human has to intervene even for something the review already diagnosed precisely.
What this adds
One bounded repair pass to the loop:
```
feature -> verify PR/checks -> review -> [actionable?] -> repair -> verify repaired checks -> re-review -> record
```
Generated files
`eyebrowlock.json` and `catalog/*.json` regenerated against current main. `feature/SKILL.md`'s content hash is the only real drift; no capability expansion (verified with `eyebrow verify --ci`: exit 0).
Test plan