finish: refuse closes= and close_linked on an issue with an open dependency #821

Open
opened 2026-10-20 01:19:13 +00:00 by hexajon · 1 comment
Owner

madt_finish closes="N" and close_linked=true write a Closes #N line with no dependency check. When #N still depends on an open issue, the forge merges the PR, answers 200, and drops the close with no error. madtea then reports a clean merge, so the caller believes #N is closed while it stays open. The close-semantics probe in internal/testforge/closeprobe shows this on Forgejo and Gitea, at the baseline and latest pins.

The branch issue already gets the check: with an open dependency, finish writes Refs #N instead. The explicit paths skip it.

Decision: finish refuses before it merges when an issue in closes=, or a branch issue under close_linked=true, has an open dependency. The refusal names the issue and each open blocker, and says to finish the blocker first or drop the issue from the close list. No flag turns the refusal off.

close_linked stays. When the forge API is out of reach (ssh-only mode), the dependency check cannot run, and closes= and close_linked keep their current behavior there.

Acceptance, against throwaway Forgejo and Gitea servers:

  • closes= naming an issue with an open dependency refuses before any push, PR, or merge, and names the blocker.
  • close_linked=true on a branch issue with an open dependency refuses the same way.
  • closes= and close_linked=true on an issue with no open dependency still close it at merge.
  • The refusal text names no override.
`madt_finish closes="N"` and `close_linked=true` write a `Closes #N` line with no dependency check. When #N still depends on an open issue, the forge merges the PR, answers 200, and drops the close with no error. madtea then reports a clean merge, so the caller believes #N is closed while it stays open. The close-semantics probe in `internal/testforge/closeprobe` shows this on Forgejo and Gitea, at the baseline and latest pins. The branch issue already gets the check: with an open dependency, finish writes `Refs #N` instead. The explicit paths skip it. Decision: finish refuses before it merges when an issue in `closes=`, or a branch issue under `close_linked=true`, has an open dependency. The refusal names the issue and each open blocker, and says to finish the blocker first or drop the issue from the close list. No flag turns the refusal off. `close_linked` stays. When the forge API is out of reach (ssh-only mode), the dependency check cannot run, and `closes=` and `close_linked` keep their current behavior there. Acceptance, against throwaway Forgejo and Gitea servers: - `closes=` naming an issue with an open dependency refuses before any push, PR, or merge, and names the blocker. - `close_linked=true` on a branch issue with an open dependency refuses the same way. - `closes=` and `close_linked=true` on an issue with no open dependency still close it at merge. - The refusal text names no override.
Author
Owner

The design in this issue is replaced by #879: finish takes no close inputs, and refuses before the forge when the work cannot close. This issue stays open as context until #879 lands.

The design in this issue is replaced by #879: `finish` takes no close inputs, and refuses before the forge when the work cannot close. This issue stays open as context until #879 lands.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#821
No description provided.