Repository navigation
Description
Problem
porch done, run on a reviewed (build_verify) phase whose build is already marked complete, requests the phase's human gate as soon as one review file exists for each reviewer. It never reads the verdicts. So a builder reaches the human gate after one review round in which every reviewer said REQUEST_CHANGES, and the re-review loop in porch next never runs.
Observed 2026-11-26, codev 3.3.8, SPIR specify, strict mode:
- reviews:
…-specify-iter1-codex.txtREQUEST_CHANGES,…-specify-iter1-claude.txtREQUEST_CHANGES; - the builder fixed the spec and ran
porch done; - porch committed
chore(porch): <id> spec-approval gate-requested;status.yamlshowsiteration: 1,build_complete: true, the gate pending with arequested_at, and noforce_advancedrecord and no history; - the fixes were never re-reviewed.
On the same day, another builder on the same issue text called porch next after each round instead. Porch took it through three rounds to the ceiling. Which command the builder happens to run decides whether the review loop exists.
Root cause
packages/codev/src/commands/porch/index.ts, done():
- for a
build_verifyphase withbuild_completealready true, the only verification is that a file matching<id>-<phase>-iter*-<model>.txtexists for each lane ("VERIFICATION REQUIRED" otherwise). Any iteration's file satisfies it, and its verdict is not parsed; - it then auto-requests the gate.
The verdict logic (all approve → advance; any REQUEST_CHANGES → rebuttal, re-iterate, ceiling) lives only in next.ts handleBuildVerify.
By reading the code, not by running it: for a build_verify phase without a gate that is not the phased implement phase (ASPIR's specify and plan), the same call falls through to advanceProtocolPhase, so it would advance the protocol phase with reviewers at REQUEST_CHANGES. Please confirm or refute this with a test as part of the fix.
Fix (prescribed)
One place decides on verdicts. In done(), a build_verify phase in normal consultation mode whose build is already complete does not request a gate and does not advance. It prints that verification is decided by porch next <id> and exits non-zero without changing state, as it already does for an unfinished plan phase. handleBuildVerify in next.ts stays the only code that requests a gate or advances after a review.
Unchanged: once phases (BUGFIX and AIR pr), the none and parent consultation modes, and the first porch done that marks the build complete.
Check the strict-mode prompts and the porch skill in both trees for any text that tells a builder to run porch done after its reviews, and correct it to porch next.
Testing
done()on a gatedbuild_verifyphase with all lanes at REQUEST_CHANGES: no gate requested, state unchanged, the message namesporch next.- The same on an ungated
build_verifyphase (ASPIRspecify): the phase does not advance. porch nexton the same states still behaves as today (rebuttal task, re-iteration, ceiling).- BUGFIX and AIR
porch donestill auto-request theprgate.
Activity