Skip to content

porch pending lists dead gates: pending records on completed/merged projects, and the same project once per worktree copy #1759

Closed

Description

@waleedkadous

Symptom

In a long-lived workspace (porch 3.3.4, ~1,750 project dirs under codev/projects/), porch pending reports 810 gates pending approval, the oldest from February. None are live asks. Two causes, both in pending() (dist/commands/porch/index.js):

  1. No liveness filter. A gate is listed whenever gates[name].status === 'pending' and requested_at is set. It ignores the project's phase and whether the protocol has finished. Older flows (and PRs merged by the builder after an out-of-band approval word) left pr: {status: pending} behind on projects that then advanced to verify/verified/completed, or that record a merged PR. In this workspace 352 of the 384 root-level status files with a pending gate also record a merged PR; phases among them: 182 pr, 95 review, 33 implement, 29 verify, 29 hypothesis, 5 verified.

  2. Dedupe by real path, not by project. The scan covers codev/projects plus every .builders/*/codev/projects. Each worktree holds its own copy of the committed status files, so one project is listed once per worktree (384 root records → 810 lines with six worktrees).

Expected

  • Skip a pending gate when the project has moved past the gate's phase (gate phase index < current phase index), when the protocol is complete (phase not in the protocol's phases, or a terminal phase such as verified), or when a merged PR is recorded.
  • Dedupe by project id, preferring the root codev/projects copy; list a worktree copy only when the root has no record (an unmerged lane).
  • Optionally a porch pending --all to show the raw view, and a one-line summary of how many stale records were hidden, so nothing is silently lost.

Approval stays human-only and named; this is a listing fix, not a way to clear gates.

Activity

  1. added a commit that references this issue on Oct 1, 2026
    cdcb0e5
  2. added a commit that references this issue on Oct 1, 2026
    49d8b07
  3. added a commit that references this issue on Oct 4, 2026
    5dc6f3d
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions