Skip to content

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

Open

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:

  • 2c34337d — chore(porch): 1280 verify-approval gate-approved — correct: flips verify-approval from pending to approved in status.yaml.
  • 50126695 — chore(porch): 1280 implement phase-transition — wrong: 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.

Activity

  1. added
    area/porch
    on Aug 11, 2026
  2. waleedkadous commented on Aug 12, 2026

    @waleedkadous
    ContributorAuthor

    Evidence pointer: the loop commit itself (50126695 — the phase-reset described above) is preserved on the remote branch builder/1280-rewrite, kept alive deliberately for repro/inspection. Delete that branch once this is fixed. The three legitimate records from the same branch shipped to main via PR #1409; local worktree and branches are cleaned up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/porch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions