You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
porch approve run from workspace root mis-resolves the project into an UNRELATED builder worktree, then auto-commits AND auto-pushes onto that builder's published branch #1593
What happened (2026-09-03, shannon workspace, receipts below)
Architect ran porch approve 4679 verify-approval --a-human-explicitly-approved-this from the workspace root (the documented flow — codev/roles/architect.md shows porch approve as a root-level architect command). The 4679 project's porch state exists in the root checkout AND — because porch state is committed and the project's PRs merged to ci — in every builder worktree created after those merges (8 copies on disk).
porch resolved the project into .builders/bugfix-3229 — an unrelated builder worktree owned by a different architect (its mtime was the most recent; resolution appears to scan worktrees rather than prefer cwd) — and then:
wrote the approval into that worktree's codev/projects/4679-*/status.yaml,
auto-pushed them to origin/builder/bugfix-3229 — a published branch of a live builder in a different lane.
Meanwhile the CLI printed '🎉 PROTOCOL COMPLETE' with no indication of WHICH worktree/branch it had acted on. The real project's worktree (.builders/spir-4679) still showed the gate pending; its builder was blocked at porch done with GATE REQUIRED. Recovery required hand-locating the stray write (find … status.yaml by mtime), re-running approve from inside the correct worktree via a subshell cd, and asking the other architect to git revert the 3 pushed commits (published branch — no rebase).
Contrast case
porch approve 4755 plan-approval from the same root cwd resolved correctly — that project's state exists in exactly ONE worktree. The bug needs multiple worktrees carrying the same project dir, which is the normal steady state for any project whose porch state has merged to the default branch while other builders exist.
Why this is severe
Cross-lane state corruption: an approval for project A lands as pushed commits on unrelated project B's published branch; if B's PR merges, bogus protocol-complete state for A enters the default branch through the wrong lineage.
The gate the human actually approved stays UNRECORDED — the builder stays blocked while the CLI reports success.
Silent: no output names the resolved worktree/branch.
Suggested fixes (any subset)
Deterministic resolution: prefer cwd's project registry; if cwd is the workspace root, resolve to the worktree whose branch matches the project (builder/<protocol>-<id>), never by scan order/mtime.
Refuse ambiguity: if multiple candidate worktrees hold the project and cwd doesn't disambiguate, error listing them (like consult's 'Multiple projects found') instead of picking one.
Print the target: every porch write names the worktree + branch it acted on.
Never auto-push onto a branch whose name doesn't match the project being acted on.
Verification receipt from the affected lane's architect (app, shannon workspace): independently confirmed all three stray commits on builder/bugfix-3229 touch ONLY codev/projects/4679-voice-unified-playback-of-agen/status.yaml (git show --stat on each). Remediation in progress on their side: git revert newest-first (published branch, no rebase), plus a pre-merge check that the affected PR's diff carries no 4679-* paths.
Activity
amrmelsayed commentedon Sep 3, 2026
Verification receipt from the affected lane's architect (app, shannon workspace): independently confirmed all three stray commits on
builder/bugfix-3229touch ONLYcodev/projects/4679-voice-unified-playback-of-agen/status.yaml(git show --staton each). Remediation in progress on their side:git revertnewest-first (published branch, no rebase), plus a pre-merge check that the affected PR's diff carries no4679-*paths.