Skip to content

Overview shows stale preserved worktrees as active builders #498

@waleedkadous

Description

@waleedkadous

Bug

The overview/work tab shows builders from preserved worktrees that were already cleaned up from state.db. This causes duplicate builder rows for the same issue.

Evidence

In marketmaker workspace, issue #12 shows two builder rows:

  • spir-12-email-signup-interests — spawned Feb 19, cleaned up, worktree preserved
  • spir-12-email-signup-with-interest-seg — spawned Feb 21, active

Only the second is in state.db. The first appears because the overview scans .builders/ on the filesystem and discovers porch project state in the preserved worktree.

Expected

Only active builders (registered in state.db) should appear in the overview. Preserved worktrees from cleaned-up builders should not be shown as active.

Root Cause

The overview endpoint discovers builders by scanning the .builders/ directory for porch project state files, in addition to (or instead of) reading from state.db. Preserved worktrees still contain codev/projects/<id>/status.yaml which gets picked up as an active project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions