Problem: Portfolio-queue items are flipped to in_progress with no owner/heartbeat and no expiry sweep — unlike sibling stores in the same package (the claim-ledger and worktree-allocator both already solve this exact problem for their own tables). A crashed or killed process leaves an item stuck in_progress forever with no automated recovery.
Area: AMS / Miner
Proposal: Add a lease/heartbeat/expiry mechanism to portfolio-queue matching the pattern already used by the claim-ledger's expiry sweep and the worktree-allocator's orphan reclaim.
Deliverables:
- A lease/heartbeat column and an expiry sweep for portfolio-queue, consistent with the two sibling stores that already have this.
Acceptance criteria:
Resources:
- The portfolio-queue module and its two sibling stores (claim-ledger expiry, worktree-allocator orphan reclaim) for the pattern to mirror.
Boundaries:
- Match the existing sibling pattern rather than inventing a new mechanism.
Problem: Portfolio-queue items are flipped to
in_progresswith no owner/heartbeat and no expiry sweep — unlike sibling stores in the same package (the claim-ledger and worktree-allocator both already solve this exact problem for their own tables). A crashed or killed process leaves an item stuckin_progressforever with no automated recovery.Area: AMS / Miner
Proposal: Add a lease/heartbeat/expiry mechanism to portfolio-queue matching the pattern already used by the claim-ledger's expiry sweep and the worktree-allocator's orphan reclaim.
Deliverables:
Acceptance criteria:
Resources:
Boundaries: