feat(ai-qa): close issues on delivery PASS; cleanup PR head branches - #58
Merged
Merged
Conversation
ai-qa is post-merge hygiene, not a second review. Policy lives in tested ai-qa/lib/cleanup.js (same extraction reason as recompute.js). - Merged delivery PASS closes linked issues and deletes the head branch - FAIL leaves issues open (reopens if GitHub already auto-closed) and keeps the branch - PR closed without merge deletes the head (GitHub never does) - issues.closed reopens premature closes unless this action closed them - Never delete default/fork/in-use refs; contents:write via GITHUB_TOKEN Co-authored-by: Hicham Zinalabdin <hichamza@users.noreply.github.com>
Hicham Zinalabdin (hichamza)
marked this pull request as ready for review
September 1, 2026 17:12
Hicham Zinalabdin (hichamza)
requested review from
Hussam Aldarwish (eduly-haldarwish)
and removed request for
a team
September 1, 2026 17:12
Hicham Zinalabdin (hichamza)
deleted the
hz/ai-qa-issue-pr-hygiene-e361
branch
September 1, 2026 17:24
✅ ai-qa: PASSMerge commit
Posted by |
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.
Why
ai-qawas a post-merge agentic review that treated GitHub’s merge as done. Merge is not delivery: GitHub auto-closes linked issues at merge time, auto-deletes heads only on merge (never on close-without-merge), and neither waits for deploy health.This makes
ai-qaown done at two surfaces, matchingfinishing-a-development-branch(verify success, then clean up only what we own).What changed
Issue-level
issues.closed, reopen if the issue was closed before delivery (linked merged PR without✓ /ai-qa), unless this action closed it orstate_reasonisnot_planned.PR-level
GITHUB_TOKEN(contents: write), not the App token.Policy lives in tested
ai-qa/lib/cleanup.js. Unit CI now also runsai-qa/lib/**/*.test.js.Caller workflows should add:
And disable Settings → General → Issues → Auto-close issues with merged linked pull requests.
Out of scope
The optional Claude review is unchanged (still color on the report). No tag/deployment deletion.
✅ ai-qa: PASS
Deploy health: healthy · findings P0 0 · P1 0 · P2 0 · P3 0
Last updated by ai-qa · QA run