story-kit: create 142_bug_quality_gates_run_after_fast_forward_to_master_instead_of_before

This commit is contained in:
Dave
2026-02-24 13:31:31 +00:00
parent fabf2789b4
commit a62fe82b54

View File

@@ -22,8 +22,9 @@ The `merge_agent_work` function in `server/src/agents.rs` runs quality gates AFT
1. `run_squash_merge()` creates merge-queue branch + temp worktree
2. Squash merge + conflict resolution in temp worktree
3. **Run quality gates in the merge-queue worktree BEFORE fast-forward**
4. If gates fail: tear down temp worktree + branch, leave master untouched, report failure
5. If gates pass: fast-forward master, clean up
4. If gates fail: report failure back to mergemaster with the temp worktree still intact, so mergemaster can attempt fixes there (up to 2 attempts per story 135's prompt)
5. If gates still fail after mergemaster's retry attempts: tear down temp worktree + branch, leave master untouched, report to human
6. If gates pass: fast-forward master, clean up
### Key Files
- `server/src/agents.rs` line 1013: `merge_agent_work()` — orchestrator