Skip to content

feat(dev-loop): add one verified repair pass - #1070

Merged
Svector-anu merged 1 commit into
mainfrom
feat/dev-loop-bounded-repair-upstream
Sep 16, 2026
Merged

Svector-anu merged 1 commit into
mainfrom
feat/dev-loop-bounded-repair-upstream

Conversation

@Svector-anu

Copy link
Copy Markdown
Contributor

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
```

  • 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>@` 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.
  • `validate-owned-target` guard added to `scripts/dev-loop-pr.sh`: never dispatch dev-loop against a repo the authenticated operator doesn't have push access to.
  • `fetch_verified_body` helper added to `scripts/dev-loop-review.sh`: the repair context handed to the fix pass is provably the same review that authorized it, not whatever happens to be in the PR's review list by the time repair runs.
  • `max_dispatches` raised from 2 to 4 (feature, review, repair, re-review).

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

  • `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
  • CI - pending on this PR

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
@Svector-anu
Svector-anu merged commit 094c10d into main Sep 16, 2026
8 checks passed
@Svector-anu
Svector-anu deleted the feat/dev-loop-bounded-repair-upstream branch September 16, 2026 14:33
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.

1 participant