Repository navigation
[Bugfix #685] Require Closes/Fixes keyword in PR prompts - #687
Merged
waleedkadous merged 2 commits intoApr 20, 2026
Merged
Conversation
Protocols other than BUGFIX did not tell builders to include a GitHub close-keyword in the final PR body. Shannon hit this on PR #796 (SPIR spec 786): PR merged but the driving issue stayed open. Add a standard close-keyword directive to the PR-creating prompts for SPIR, ASPIR, AIR, BUGFIX (partial-fix exception), maintain, and experiment, keeping codev-skeleton in sync. AIR's "Implements #N" now uses "Closes #N" so GitHub auto-closes on merge. Add the partial-fix exception wording so builders don't blindly add Closes on a phase PR. Regression test (bugfix-685-close-keyword.test.ts) verifies each protocol prompt documents the keyword, the exception, and the auto-close rationale, and that codev-skeleton mirrors codev/.
Codex review flagged that `{{issue.number}}` inside the AIR and BUGFIX
PR body templates is not substituted by porch's phase prompt renderer —
it only substitutes bare `{{word}}` tokens, not dotted paths. A builder
that copies the template verbatim would commit the literal string
`Fixes #{{issue.number}}` to the PR body, which GitHub will not recognise
as a close keyword.
Switch the PR body templates for AIR and BUGFIX to `<N>` placeholders
with an inline comment reminding the builder to substitute the real
issue number. Matches the pattern already used in SPIR/ASPIR/maintain
prompts. Add an explicit "do not leave `{{...}}` template tags" note to
the directive text.
Extend the regression test to assert no `{{issue...}}` tokens remain
inside any PR body template (the text between `<<'EOF'` and `EOF`).
Title and notification lines outside the body are intentionally not
covered — that's pre-existing text out of scope for #685.
Contributor
Author
|
Excellent work — thanks for the careful fix. The Codex catch about Also appreciate catching that AIR had Approved. Please merge with |
waleedkadous
deleted the
builder/bugfix-685-builder-prompts-should-require
branch
April 20, 2026 13:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builder prompts for SPIR, ASPIR, AIR, maintain, and experiment did not tell
builders to include a GitHub close-keyword (
Closes #N/Fixes #N) in thefinal PR body, so merged PRs did not auto-close their driving issues. Shannon
hit this on PR #796 (SPIR spec 786): PR merged, issue stayed open, manual
close required.
Fixes #685
Root Cause
Of the six protocols with PR-creating prompts, only BUGFIX (
prompts/pr.md)already required
Fixes #{{issue.number}}in the PR body template. The otherfive produced PR bodies with no close-keyword at all, or in AIR's case a
non-recognized
Implements #Nline.Fix
Added a standard close-keyword directive to each PR-creating prompt, with the
partial-fix exception spelled out so builders don't blindly close an issue
when the PR only addresses one phase of a multi-PR effort:
codev/protocols/spir/prompts/review.mdcodev/protocols/aspir/prompts/review.mdcodev/protocols/air/prompts/pr.mdcodev/protocols/bugfix/prompts/pr.mdcodev/protocols/maintain/prompts/review.mdcodev/protocols/experiment/builder-prompt.mdcodev-skeleton/protocols/mirrored for each edit.Changes:
Closes #<N>placeholder next to the summaryand a directive block explaining why it matters and when to substitute
Refs #<N>/Part of #<N>for partial fixes.Closes #{{issue.number}}instead ofImplements #{{issue.number}}(the latter is not a recognized GitHub close keyword).
Fixes #N).triggered by a tracking issue.
where an experiment produces a PR that should close an issue.
Out of scope (deferred as separate work per the issue):
allowing
pr-readyto advance.Test Plan
packages/codev/src/__tests__/bugfix-685-close-keyword.test.tscodev/prompts + 6codev-skeleton/mirrorsCloses #/Fixes #(
Refs #/Part of #)bugfix-pr-prompt.test.tsstill passesporch check bugfix-685— build + tests pass