Skip to content

armgit / ECC

Public Imported from GitHub
0

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

fix: enforce policy.review.required gate in applyPublish

Victor Casado573ebe091890
diff --git a/scripts/lib/github-coordination/actions.js b/scripts/lib/github-coordination/actions.js
index 0682d8c38..4548c4ad1 100644
--- a/scripts/lib/github-coordination/actions.js
+++ b/scripts/lib/github-coordination/actions.js
@@ -183,6 +183,10 @@ function applyPublish(repo, issueNumber, options = {}, context = {}) {
throw new Error(`Issue #${issueNumber} is not ready to publish: ${validation.validations.map(entry => `${entry.check}=${entry.ok}`).join(', ')}`);
}
+ if (policy.review && policy.review.required && state.review !== 'approved') {
+ throw new Error(`Issue #${issueNumber} cannot be published: review approval required (current: ${state.review})`);
+ }
+
const nextState = buildIssueStateFromAction(issue, state, 'publish', {
status: 'published',
validation: 'passed',