finish: no close inputs; refuse before the forge when the work cannot close #879

Closed
opened 2026-10-23 04:04:08 +00:00 by hexajon · 0 comments
Owner

finish means the work is done. Today three inputs let a caller merge work and still leave its issue open, or close an issue with no dependency check:

  • no_close merges and writes only Refs #N.
  • close_linked skips the dependency check.
  • closes= closes listed issues with no dependency check.

With no input at all, a branch whose issue has an open dependency still merges with Refs #N, and a branch with no issue merges with no close line. When a close fails at the forge, the forge still merges and drops the close, so the caller believes the issue is closed.

Decision (hexajon, 2026-10-22): finish takes no close inputs, and refuses before the forge when the work cannot close.

  • no_close, close_linked, and closes= are removed on the CLI and MCP, with no alias.
  • title, summary, files, no_commit, and branch stay.
  • The work's issue is the number in the branch name (issue-N-...).
  • finish refuses before any push, PR, or merge when the branch name has no issue number, when issue #N does not exist or is already closed, when #N has an open dependency, or when the forge cannot be read.
  • Otherwise madtea writes Closes #N and the forge closes #N at merge. The same rule holds in a repo outside the start folder.
  • Work on part of an epic goes on a branch for its own child issue.

This replaces the designs in #827 (hold the issue with madtea/held and merge) and #821 (keep close_linked, and keep closes= in ssh-only mode). The record is docs/decisions/0061-finish-takes-no-close-inputs.md. docs/decisions/0007 and docs/decisions/0058 name the removed inputs and need an edit.

This is a breaking change. The release notes must say so.

Acceptance criteria

  • no_close, close_linked, and closes are absent from the tool schema and the CLI flags; passing one is an unknown-argument error.
  • A branch with no issue number refuses before any push, PR, or merge.
  • A branch whose issue does not exist, or is closed, refuses the same way.
  • A branch whose issue has an open dependency refuses the same way, and names each open dependency.
  • finish refuses when the forge cannot be read.
  • A branch whose issue has no open dependency merges, and the issue is closed after the merge.
  • The same checks run for a finish into a repo outside the start folder.
  • Tests run against throwaway Forgejo and Gitea servers, at the baseline and latest pins.
  • docs/decisions/0007 and docs/decisions/0058 no longer name the removed inputs.
`finish` means the work is done. Today three inputs let a caller merge work and still leave its issue open, or close an issue with no dependency check: - `no_close` merges and writes only `Refs #N`. - `close_linked` skips the dependency check. - `closes=` closes listed issues with no dependency check. With no input at all, a branch whose issue has an open dependency still merges with `Refs #N`, and a branch with no issue merges with no close line. When a close fails at the forge, the forge still merges and drops the close, so the caller believes the issue is closed. Decision (hexajon, 2026-10-22): `finish` takes no close inputs, and refuses before the forge when the work cannot close. - `no_close`, `close_linked`, and `closes=` are removed on the CLI and MCP, with no alias. - `title`, `summary`, `files`, `no_commit`, and `branch` stay. - The work's issue is the number in the branch name (`issue-N-...`). - `finish` refuses before any push, PR, or merge when the branch name has no issue number, when issue #N does not exist or is already closed, when #N has an open dependency, or when the forge cannot be read. - Otherwise madtea writes `Closes #N` and the forge closes #N at merge. The same rule holds in a repo outside the start folder. - Work on part of an epic goes on a branch for its own child issue. This replaces the designs in #827 (hold the issue with `madtea/held` and merge) and #821 (keep `close_linked`, and keep `closes=` in ssh-only mode). The record is docs/decisions/0061-finish-takes-no-close-inputs.md. docs/decisions/0007 and docs/decisions/0058 name the removed inputs and need an edit. This is a breaking change. The release notes must say so. ## Acceptance criteria - [ ] `no_close`, `close_linked`, and `closes` are absent from the tool schema and the CLI flags; passing one is an unknown-argument error. - [ ] A branch with no issue number refuses before any push, PR, or merge. - [ ] A branch whose issue does not exist, or is closed, refuses the same way. - [ ] A branch whose issue has an open dependency refuses the same way, and names each open dependency. - [ ] `finish` refuses when the forge cannot be read. - [ ] A branch whose issue has no open dependency merges, and the issue is closed after the merge. - [ ] The same checks run for a finish into a repo outside the start folder. - [ ] Tests run against throwaway Forgejo and Gitea servers, at the baseline and latest pins. - [ ] docs/decisions/0007 and docs/decisions/0058 no longer name the removed inputs.
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.

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