Skip to content

porch done reports phase advance but status.yaml write silently skipped (persistence flake) #1251

Description

@waleedkadous

Observed

During bugfix-1077 (builder worktree, BUGFIX protocol), the builder's first porch done on the investigate phase printed ADVANCING TO: fix — but status.yaml was never written (mtime unchanged from porch init). Re-running porch done later succeeded and wrote state normally.

Why it matters

The success banner and the persisted state disagreed. If the builder had crashed or the terminal been recycled between the two runs, porch would have resumed from investigate while the builder believed it was in fix — a silent state divergence in the exact place the state machine is supposed to be the source of truth.

Repro status

Not reproduced on demand — single occurrence, reported by the bugfix-1077 builder on 2026-07-25 (~12:00–13:00Z window, Codev main at/near c8d8be7). Worth an audit of the porch done write path for:

  • an early-return or swallowed exception between the transition computation (which prints the banner) and the YAML write
  • write-then-rename ordering (is the banner printed before the persist is confirmed?)
  • anything (lock, EBUSY, concurrent reader) that could no-op the write without surfacing an error

Source

First-hand builder report (bugfix-1077, PR #1250 session). No logs beyond the mtime observation were captured.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/porchArea: Porch state machine / protocol orchestrationbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions