finish: closes linked issues with a bare Closes #N and no closing comment #497

Open
opened 2026-09-15 21:07:40 +00:00 by hexajon · 0 comments
Owner

What happens

madt_finish never closes an issue itself. It writes Closes #N into the commit message and the PR body (internal/service/workflow/helpers.go:35 and :55, finish_commit.go:205, finish_remote.go:104). The forge then closes the issue on merge. The issue gets a "closed in PR" event, with no comment and no reason.

Manual close does require a reason. madt_issues action=close posts reason= as a closing comment. It warns on a bare close, or refuses it under close_requires_reason=require (internal/mcp/tools_issues_crud.go:279, :419, :488). finish skips that rule completely. No decision record explains the difference, and docs/architecture/finish-workflow.md only describes the close list going into the PR body.

It also collides with the ADR check. A decided record's linked issue must carry a comment that names the record. An issue closed by finish has no comment, so it fails unless the forge returns the commit reference as a comment. I have not tested that yet.

Ask

  • After the merge, finish closes each issue in its close set itself, with a closing comment. The comment carries the PR link, the merge commit, and the finish summary.
  • It follows close_requires_reason the same way manual close does.
  • It checks that each issue really closed, and reports any that did not.
  • When the branch adds or decides an ADR record, the closing comment names the record.
  • Test whether Forgejo and Gitea list a commit-keyword close in the issue comments endpoint, and record the result.
  • Update docs/architecture/finish-workflow.md.

Acceptance

  • Every issue that finish closes has a closing comment with the PR link and the merge commit.
  • close_requires_reason=require applies to finish closes.
  • An ADR decided and finished through madtea passes adr check.
## What happens `madt_finish` never closes an issue itself. It writes `Closes #N` into the commit message and the PR body (`internal/service/workflow/helpers.go:35` and `:55`, `finish_commit.go:205`, `finish_remote.go:104`). The forge then closes the issue on merge. The issue gets a "closed in PR" event, with no comment and no reason. Manual close does require a reason. `madt_issues action=close` posts `reason=` as a closing comment. It warns on a bare close, or refuses it under `close_requires_reason=require` (`internal/mcp/tools_issues_crud.go:279`, `:419`, `:488`). `finish` skips that rule completely. No decision record explains the difference, and `docs/architecture/finish-workflow.md` only describes the close list going into the PR body. It also collides with the ADR check. A decided record's linked issue must carry a comment that names the record. An issue closed by `finish` has no comment, so it fails unless the forge returns the commit reference as a comment. I have not tested that yet. ## Ask - After the merge, `finish` closes each issue in its close set itself, with a closing comment. The comment carries the PR link, the merge commit, and the `finish` summary. - It follows `close_requires_reason` the same way manual close does. - It checks that each issue really closed, and reports any that did not. - When the branch adds or decides an ADR record, the closing comment names the record. - Test whether Forgejo and Gitea list a commit-keyword close in the issue comments endpoint, and record the result. - Update `docs/architecture/finish-workflow.md`. ## Acceptance - Every issue that `finish` closes has a closing comment with the PR link and the merge commit. - `close_requires_reason=require` applies to `finish` closes. - An ADR decided and finished through madtea passes `adr check`.
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#497
No description provided.