feat(infra): add CONSULTANT_CLOSEOUT re-open gate #438#441
feat(infra): add CONSULTANT_CLOSEOUT re-open gate #438#441
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b90b418d7a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const hasCloseout = comments.some(c => | ||
| typeof c.body === 'string' && c.body.includes('CONSULTANT_CLOSEOUT') | ||
| ); |
There was a problem hiding this comment.
Exclude gate-generated comments from closeout detection
The closeout check currently treats any comment containing CONSULTANT_CLOSEOUT as valid, but this workflow itself posts a violation comment containing that same token when it reopens an issue. That means the first invalid close adds a matching comment, and the next close attempt will pass even if no real consultant closeout was posted. This creates a persistent bypass after one failure; the check should match a stricter artifact (for example a heading/signature pattern and/or trusted author) instead of a raw substring.
Useful? React with 👍 / 👎.
| if (labels.includes('type:epic')) { | ||
| core.info('Epic issue — closeout gate exempt (CONSULTANT_CLOSEOUT on epic itself)'); | ||
| return; |
There was a problem hiding this comment.
Enforce closeout gate for epic issues
This early return exempts all type:epic issues from the closeout gate, allowing epics to be closed without any consultant closeout evidence. That conflicts with the repo’s epic governance rule requiring a CONSULTANT_CLOSEOUT comment before epic closure (instructions/epic-governance.instructions.md, Epic Close Conditions), so the exemption creates an enforcement hole specifically for epics.
Useful? React with 👍 / 👎.
Summary
.github/workflows/closeout-gate.ymltriggered onissues: [closed]CONSULTANT_CLOSEOUTstringnot_plannedcloses (cancelled issues) andtype:epicissuesTest plan
not_plannedissue → verify it stays closednpm run lintpasses (77 lines, under 100-line limit)Closes #438
🤖 Generated with Claude Code