Skip to content

feat(infra): add CONSULTANT_CLOSEOUT re-open gate #438#441

Open
chf3198 wants to merge 1 commit intomainfrom
feat/438-closeout-gate
Open

feat(infra): add CONSULTANT_CLOSEOUT re-open gate #438#441
chf3198 wants to merge 1 commit intomainfrom
feat/438-closeout-gate

Conversation

@chf3198
Copy link
Copy Markdown
Owner

@chf3198 chf3198 commented Apr 24, 2026

Summary

  • Adds .github/workflows/closeout-gate.yml triggered on issues: [closed]
  • Paginates all comments; checks for CONSULTANT_CLOSEOUT string
  • Re-opens issue and posts governance violation comment if missing
  • Exempts: not_planned closes (cancelled issues) and type:epic issues

Test plan

  • Close a test issue without CONSULTANT_CLOSEOUT → verify it re-opens and posts violation comment
  • Close a not_planned issue → verify it stays closed
  • Close an issue with valid CONSULTANT_CLOSEOUT → verify it stays closed
  • npm run lint passes (77 lines, under 100-line limit)

Closes #438

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 24, 2026 16:12
@chf3198 chf3198 had a problem deploying to collaborator-gate April 24, 2026 16:12 — with GitHub Actions Failure
@github-actions
Copy link
Copy Markdown

Messages
📖

Danger: ticket-first, branch, and title checks complete. Failures block merge; warnings are advisory.

Generated by 🚫 dangerJS against b90b418

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +43 to +45
const hasCloseout = comments.some(c =>
typeof c.body === 'string' && c.body.includes('CONSULTANT_CLOSEOUT')
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +32 to +34
if (labels.includes('type:epic')) {
core.info('Epic issue — closeout gate exempt (CONSULTANT_CLOSEOUT on epic itself)');
return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CONSULTANT_CLOSEOUT re-open gate on issue close

2 participants