fjx pm close re-surfaces finalized issues #5

Closed
opened 2026-05-14 08:13:29 +00:00 by erik · 3 comments
Owner

When fjx pm close is run on closed_candidates from fjx pm tick, the command returns success but those same issues reappear in the next PM tick.

The current model is a bit klunky in that an issue can be closed but still need finalizing by the PM. First, consider some creative options such as:

  1. Do not have PR's auto-close issues: instead of "Closes #N" say "Refs #N"
  2. A new label (eg agent/finalize)
  3. Have fjx be smarter by looking at checkpoints
  4. ???

Option 1 is nice in that we will no longer this weird "closed but not finalized" state, closed will simply mean closed & finalized. Option 2 is not good since we want to keep agent labels to a minimum. Option 3 is not good, feels more like a band-aid instead of a proper fix.

When fjx pm close is run on closed_candidates from fjx pm tick, the command returns success but those same issues reappear in the next PM tick. The current model is a bit klunky in that an issue can be closed but still need finalizing by the PM. First, consider some creative options such as: 1. Do not have PR's auto-close issues: instead of "Closes #N" say "Refs #N" 2. A new label (eg `agent/finalize`) 3. Have fjx be smarter by looking at checkpoints 4. ??? Option 1 is nice in that we will no longer this weird "closed but not finalized" state, closed will simply mean closed & finalized. Option 2 is not good since we want to keep agent labels to a minimum. Option 3 is not good, feels more like a band-aid instead of a proper fix.
Member

Brief — Developer

Phase: simple. Read wiki/workflow/prompts/dev-simple.md for the cycle protocol.

<!-- pm:brief:dev --> # Brief — Developer **Phase:** simple. Read `wiki/workflow/prompts/dev-simple.md` for the cycle protocol.
Member

Ledger for: agent-pm

Status: watching @ 2026-05-14T09:16:19.903Z
Briefs:

  • dev @ 2026-05-14T08:37:21Z
  • test: absent
  • build: absent

Activity

(none)

<!-- agent-pm:ledger --> ## Ledger for: agent-pm Status: watching @ 2026-05-14T09:16:19.903Z Briefs: - [dev](#issuecomment-932) @ 2026-05-14T08:37:21Z - test: absent - build: absent ### Activity _(none)_
Member

Ledger for: agent-dev

Status: review @ 2026-05-14T10:30:34.322Z


Tasks

  • Switch PR convention to Refs #N (docs: src/doc/forgejo/pr.md, src/doc/forgejo/issue.md, src/doc/scenarios.md; prompts: src/prompts/dev-investigate.md; pm roles doc).
  • linkedIssueFromBody / closesPattern now accept Refs in addition to Closes/Fixes/Resolves (legacy PRs still work).
  • ForgejoClient.setIssueState(id, "closed") added; fjx pm close calls it after writing the closed ledger (idempotent).
  • collectCandidates (and pm sweep's closed loop) now skip closed issues whose PM ledger already has Status: closed — the actual fix for the re-surface bug.
  • Tests updated/added: linkedIssueFromBody accepts Refs; sweep filters out finalized closed ledgers. 92 tests pass.
  • just validate clean.

Notes

  • Approach: Option 1 from the issue body. The cleanest fix is to take auto-close off the PR-merge path so "closed" can only mean "closed & finalized". The sweep filter is a belt-and-suspenders measure for human-closed issues.
<!-- agent-dev:ledger --> ## Ledger for: agent-dev Status: review @ 2026-05-14T10:30:34.322Z --- ### Tasks - [x] Switch PR convention to `Refs #N` (docs: `src/doc/forgejo/pr.md`, `src/doc/forgejo/issue.md`, `src/doc/scenarios.md`; prompts: `src/prompts/dev-investigate.md`; pm roles doc). - [x] `linkedIssueFromBody` / `closesPattern` now accept `Refs` in addition to `Closes`/`Fixes`/`Resolves` (legacy PRs still work). - [x] `ForgejoClient.setIssueState(id, "closed")` added; `fjx pm close` calls it after writing the closed ledger (idempotent). - [x] `collectCandidates` (and `pm sweep`'s closed loop) now skip closed issues whose PM ledger already has `Status: closed` — the actual fix for the re-surface bug. - [x] Tests updated/added: `linkedIssueFromBody` accepts `Refs`; sweep filters out finalized closed ledgers. 92 tests pass. - [x] `just validate` clean. ### Notes - Approach: Option 1 from the issue body. The cleanest fix is to take auto-close off the PR-merge path so "closed" can only mean "closed & finalized". The sweep filter is a belt-and-suspenders measure for human-closed issues.
agent-dev removed their assignment 2026-05-14 10:31:18 +00:00
erik closed this issue 2026-05-14 10:33:38 +00:00
Sign in to join this conversation.
No description provided.