Slice 3 — Rework path: pr-fixer lane + Forgejo triage workflow #4

Open
opened 2026-07-08 02:53:26 +08:00 by weiwen · 0 comments
Owner

Parent

weiwen/sandcastle#1

What to build

The rework path: close the loop so human-requested changes on a PR are picked up and addressed automatically. Builds on the write path (#3) — the pr-fixer operates on PRs the implementer/reviewer produced.

  • Genericize the pr-fixer prompt (drop --repo from all tea calls; push URL from {{FORGE_HOST}}/{{REPO}}; just fmt/just check → bare fmt/check).
  • Orchestrator pr-rework lane: PRs carrying ready-for-agent are routed to the pr-fixer (model models.prFixer), which reads the review feedback, addresses it, runs check, pushes, comments a summary, and relabels the PR ready-for-agentready-for-human as its terminal step. Reworks claim concurrency slots ahead of new issues, per the PRD's budget ordering.
  • Port the Forgejo triage workflow to nibble (.forgejo/workflows/), adapted from evie's reference — expected zero content changes since label names are identical. It applies ready-for-agent to a PR when a human submits a REQUEST_CHANGES review; this is the sole rework gate (CI status is not a trigger).

Acceptance criteria

  • Submitting a REQUEST_CHANGES review on an open nibble PR causes the triage workflow to add the ready-for-agent label to that PR.
  • A subsequent nix run .#sandcastle routes that PR to the pr-fixer, which pushes a fix, posts a summary comment, and relabels the PR ready-for-agentready-for-human.
  • check passes inside the sandbox before the fix is pushed; if iterations are exhausted with check still failing, the pr-fixer posts a summary comment and relabels to ready-for-human without pushing partial work (no churn).
  • The pr-fixer prompt contains no hardcoded repo slug or forge URL.
  • No regression: planner, implementer, and reviewer lanes from #2 and #3 still function.

Blocked by

## Parent weiwen/sandcastle#1 ## What to build The rework path: close the loop so human-requested changes on a PR are picked up and addressed automatically. Builds on the write path (#3) — the pr-fixer operates on PRs the implementer/reviewer produced. - Genericize the **pr-fixer** prompt (drop `--repo` from all `tea` calls; push URL from `{{FORGE_HOST}}`/`{{REPO}}`; `just fmt`/`just check` → bare `fmt`/`check`). - Orchestrator pr-rework lane: PRs carrying `ready-for-agent` are routed to the pr-fixer (model `models.prFixer`), which reads the review feedback, addresses it, runs `check`, pushes, comments a summary, and relabels the PR `ready-for-agent` → `ready-for-human` as its terminal step. Reworks claim concurrency slots ahead of new issues, per the PRD's budget ordering. - Port the Forgejo triage workflow to `nibble` (`.forgejo/workflows/`), adapted from evie's reference — expected zero content changes since label names are identical. It applies `ready-for-agent` to a PR when a human submits a `REQUEST_CHANGES` review; this is the sole rework gate (CI status is not a trigger). ## Acceptance criteria - [ ] Submitting a `REQUEST_CHANGES` review on an open `nibble` PR causes the triage workflow to add the `ready-for-agent` label to that PR. - [ ] A subsequent `nix run .#sandcastle` routes that PR to the pr-fixer, which pushes a fix, posts a summary comment, and relabels the PR `ready-for-agent` → `ready-for-human`. - [ ] `check` passes inside the sandbox before the fix is pushed; if iterations are exhausted with `check` still failing, the pr-fixer posts a summary comment and relabels to `ready-for-human` without pushing partial work (no churn). - [ ] The pr-fixer prompt contains no hardcoded repo slug or forge URL. - [ ] No regression: planner, implementer, and reviewer lanes from #2 and #3 still function. ## Blocked by - weiwen/sandcastle#3
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
weiwen/sandcastle#4
No description provided.