Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c4d24d4
[jwies/review-dispatch-gate] review: block review submission when the…
jwbron Jul 21, 2026
7cc1fc2
[jwies/review-dispatch-gate] review: harden the gate's fail-open orde…
jwbron Jul 21, 2026
19f87ec
[jwies/review-dispatch-gate] review: protect the sentinel/pre-gate wr…
jwbron Jul 21, 2026
588356b
[jwies/review-dispatch-gate] review: pin keep-list survivors, Step 6 …
jwbron Jul 21, 2026
f95d3f2
[jwies/review-pre-agent-staging] review: move the staging layer into …
jwbron Jul 21, 2026
c0573f0
[jwies/review-pre-agent-staging] review: fix the added-lines hash for…
jwbron Jul 21, 2026
6bdfb95
[jwies/review-pre-agent-staging] review: tighten ghGet retry semantic…
jwbron Jul 21, 2026
63930fd
[jwies/review-stamp-carrier] review: re-review fingerprint falls back…
jwbron Jul 22, 2026
8942b86
[jwies/review-dispatch-gate-local] Merge branch 'jwies/review-stamp-c…
jwbron Jul 22, 2026
c6e43a8
[jwies/review-dispatch-gate-local] review: shared lenient sub-agent J…
jwbron Jul 22, 2026
f737f84
[jwies/review-pre-agent-staging-local] Merge branch 'jwies/review-dis…
jwbron Jul 22, 2026
f5aae5c
[jwies/review-pre-agent-staging-local] review: the staged plan artifa…
jwbron Jul 22, 2026
5735a0e
[jwies/review-pre-agent-staging-local] review: retry the secondary-ra…
jwbron Jul 22, 2026
bdbc612
[jwies/autofix-v1] autofix: opt-in, one-shot fixing of the PR reviewe…
jwbron Jul 28, 2026
11c4a11
[jwies/autofix-v1] autofix: add /autofix as a peer arming surface alo…
jwbron Jul 28, 2026
0182485
[jwies/autofix-v1] autofix: fix the two faults the first live trial r…
jwbron Jul 28, 2026
887fcc8
[jwies/autofix-v1] autofix: work around gh-aw's unbounded PR-branch f…
jwbron Jul 28, 2026
a4e778e
[jwies/autofix-v1] autofix: move to Opus 5; settle the tagOpt questio…
jwbron Jul 28, 2026
73a35fa
[jwies/autofix-v1] autofix: self-contained commit messages, exception…
jwbron Jul 28, 2026
77b7de7
[jwies/autofix-v1] autofix: stage deterministically in a pre-agent step
jwbron Jul 28, 2026
ce00455
[jwies/autofix-v1] autofix: fix the currency guard failing open; one …
jwbron Jul 28, 2026
d7f684b
[jwies/autofix-v1] autofix: reuse the stack's diff builder; close the…
jwbron Jul 28, 2026
33ec833
[jwies/autofix-v1] autofix: price Opus 5 for the proxy; match bot log…
jwbron Jul 29, 2026
dd06f8c
[jwies/autofix-v1] autofix: pin the firewall to the version that hono…
jwbron Jul 29, 2026
1a61004
[jwies/autofix-v1] autofix: hold at Opus 4.8; the Opus 5 pricing fall…
jwbron Jul 29, 2026
5890044
[jwies/autofix-v1] autofix: correct the Opus 5 note; the cause is une…
jwbron Jul 29, 2026
95ca721
[jwies/review-pre-agent-staging] review: don't tell the orchestrator …
jwbron Jul 29, 2026
ca109de
[jwies/autofix-v1] Merge branch 'jwies/review-pre-agent-staging' into…
jwbron Jul 29, 2026
a8f80b4
[jwies/review-dispatch-gate] Merge remote-tracking branch 'origin/mai…
jwbron Jul 29, 2026
e3a22e5
[jwies/review-pre-agent-staging] Merge branch 'jwies/review-dispatch-…
jwbron Jul 29, 2026
68c90bb
[jwies/autofix-v1] Merge branch 'jwies/review-pre-agent-staging' into…
jwbron Jul 29, 2026
9037a9b
[jwies/autofix-v1] autofix: actually implement the guards the command…
jwbron Jul 29, 2026
2369cf6
[jwies/autofix-v1] autofix: lead the description with the command, no…
jwbron Jul 29, 2026
57618a5
Merge branch 'main' into jwies/autofix-v1
jwbron Jul 30, 2026
a0c17ac
[jwies/autofix-v1] autofix: `skip-ai-review` no longer disarms autofix
jwbron Jul 30, 2026
7816541
autofix: fail closed when the thread fetch fails
jwbron Jul 30, 2026
7aed595
[jwies/autofix-v1] autofix: the re-review is best-effort verification…
jwbron Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .changeset/autofix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"autofix": minor
---

Add the `autofix` workflow: opt-in, one-shot fixing of the PR reviewer's own feedback.

Arm a PR with an `autofix: blocking` / `autofix: nits` label or an `/autofix [scope]` comment; the run fixes the reviewer's open threads in that scope, pushes one commit, replies in each thread, and removes the label. Both arming surfaces are peers resolving through one shared token vocabulary, and the trigger decides which is read, so a stale label cannot widen an explicit command.

Everything except the code edit is deterministic. `lib/stage.ts` runs as a pre-agent step and fetches the inputs before the agent starts; `lib/plan.ts` then resolves scope, checks review currency, builds the work list, and renders the commit trailer. The plan is final: the prompt may execute it or stop, never widen it.

Guards fail closed. Currency is checked per file so one unrelated push doesn't refuse the whole run; unparseable labels, outdated anchors, threads a human opened, an unreadable diff, and a head that moves mid-run are all excluded. Refusal is reserved for a PR with no review at all, and for a thread fetch that fails: GitHub reports GraphQL rate limits and node-access failures as HTTP 200 with an `errors` array, so staging treats any `errors` entry or an unparseable body as fatal rather than as "this PR has no threads", which would clear the arming label while the findings it was armed for stayed open.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note (non-blocking): this changeset now documents the fail-closed thread-fetch refusal, but workflows/autofix/README.md (~lines 108–112) wasn't synced to match.

The README's refusal contract still says every refusal "clears any label that armed it" and frames a PR with no review as the only currency state that refuses. This commit's new refusal deliberately does the opposite — staging throws before the plan runs, so the arming label is intentionally retained for retry — and the README's "What it refuses to do" list omits the path entirely. Worth a one-paragraph README update so the prose doesn't contradict the shipped behavior.


The reviewer's `skip-ai-review` label does not disarm autofix. It stops the reviewer's next run without withdrawing a review already posted, so a labelled PR can still carry current findings, and an explicit `autofix:` label or `/autofix` from someone with write access is the authorisation to act on them. A PR with no review is still refused, by the guard that checks for one.

The push uses `KHAN_ACTIONS_BOT_TOKEN`, because GitHub creates no workflow runs for `GITHUB_TOKEN`-triggered events, and the re-review of the autofix commit is the intended verification a fix gets. That verification is best-effort rather than guaranteed: the chain from the push to a posted review has several links, whether a break is visible depends on how the consumer triggers its reviewer, and the human re-arming loop is the accepted backstop for v1. The run's summary comment says so on every push. Ships with a documented workaround for gh-aw's unbounded PR-branch fetch, which is otherwise fatal on large monorepos.
1,910 changes: 1,910 additions & 0 deletions .github/workflows/autofix.lock.yml

Large diffs are not rendered by default.

660 changes: 660 additions & 0 deletions .github/workflows/autofix.md

Large diffs are not rendered by default.

372 changes: 372 additions & 0 deletions workflows/autofix/README.md

Large diffs are not rendered by default.

660 changes: 660 additions & 0 deletions workflows/autofix/autofix.md

Large diffs are not rendered by default.

Loading
Loading