Skip to content

porch: SPIR verify-approval triggers phase-transition that resets all plan phases to pending (state loop) #1408

Description

@waleedkadous

What happened

On Spec 1280 (SPIR, strict mode), after the human-verified word was relayed and the builder approved the verify gate, porch emitted two commits 2 seconds apart:

  • 2c34337dchore(porch): 1280 verify-approval gate-approved — correct: flips verify-approval from pending to approved in status.yaml.
  • 50126695chore(porch): 1280 implement phase-transitionwrong: resets ALL 11 plan phases from complete back to pending (phase_0 to in_progress), and moves current_plan_phase back to phase_0_instrument.

porch status 1280 afterwards reports PHASE: implement / phase_0_instrument for a project whose implementation PR (#1362, the 1280 prompt rewrite) is merged and whose verify gate is approved. The state machine looped back to the start of implement instead of transitioning to complete.

Impact

  • The completion record is destroyed in status.yaml (all phases read pending).
  • The builder that hit this went silent instead of reporting — likely confused by the bogus state.
  • The records PR for 1280 must exclude the loop commit; as a result main will carry verify-approval: approved + build_complete: true but no protocol complete record, because porch never emitted one.

Where to look

Porch's transition logic for the verify-approval gate in SPIR: whatever handles gate approval appears to fall through into a fresh implement-phase initialization rather than protocol completion. Note build_complete: true and all phases complete were set before the approval, so the guard that should route to completion missed.

Environment

porch from codev v3.3.0 (Luxor, @next), observed 2026-08-09T01:18Z in the spir-1280 builder worktree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/porchArea: Porch state machine / protocol orchestration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions