affaan-m/ECC · error

Issue # is not ready to publish: = `).join(', ')}

Error message

Issue #${issueNumber} is not ready to publish: ${validation.validations.map(entry => `${entry.check}=${entry.ok}`).join(', ')}

What it means

applyPublish refuses to publish an issue whose pre-flight validation (a dry-run applyValidate) reports any failing check. The error message enumerates every validation entry as check=true/false so the developer can see exactly which gates failed, e.g. acceptance-criteria=false, tasks-linked=false. This is a policy gate protecting the coordination workflow from publishing incomplete or inconsistent issues.

Solutions

  1. Run applyValidate (or applyPublish with dryRun) and fix each listed failing check on the issue
  2. Add the missing acceptance criteria, tasks, labels, or metadata the policy requires
  3. Re-run applyDecompose/applySync to bring the issue back in line with the policy
  4. Adjust policy config only if the check is genuinely not applicable to this issue

Example fix

// before
applyPublish(repo, 42, {}) // fails: acceptance-criteria=false
// after: fix the issue body, then verify
const v = applyValidate(repo, 42, { dryRun: true }, ctx);
if (!v.ok) fixIssuePerValidations(v.validations);
applyPublish(repo, 42, {})
Defensive patterns

Strategy: try-catch

Validate before calling

const validation = applyValidate(repo, issueNumber, { dryRun: true }, ctx);
if (!validation.ok) { console.error(validation.validations.filter(v => !v.ok).map(v => v.check)); return; }
applyPublish(repo, issueNumber, opts);

Try / catch

try { applyPublish(repo, n, opts); } catch (e) { if (String(e.message).includes('not ready to publish')) { const failed = e.message.split(': ')[1]; console.error(`fix failing checks: ${failed}`); } throw e; }

Prevention

When it happens

Trigger: Calling applyPublish on an issue that fails any applyValidate check: missing acceptance criteria, no linked tasks, wrong labels, bad state, stale coordination labels, etc. The failing checks are listed comma-separated in the message.

Common situations: Trying to publish a freshly decomposed issue before tasks were created and linked; editing an issue so it no longer matches the policy template; running publish in CI before earlier workflow steps completed; policy made stricter (new checks) after the issue was authored.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16). Data as JSON: /api/errors/f17225a29d0714a7. Report an issue: GitHub.

Appendix: source

Thrown at scripts/lib/github-coordination/actions.js:202

  return {
    ...summarizeStateForOutput(repo, trackedIssue, nextState, 'validate', policy),
    ok,
    validations,
    missingDependencies,
  };
}

function applyPublish(repo, issueNumber, options = {}, context = {}) {
  assertValidRepo(repo);
  assertValidIssueNumber(issueNumber);
  const policy = context.policy || loadPolicy(context.rootDir || process.cwd(), options.configPath);
  const issue = getIssue(repo, issueNumber, options);
  const state = getCoordinationState(issue, policy);
  const validation = applyValidate(repo, issueNumber, { ...options, dryRun: true }, context, issue);

  if (!validation.ok) {
    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',
    review: state.review === 'changes-requested' ? state.review : 'approved',
    projectState: 'done',
  }, policy);
  const trackedIssue = {
    ...issue,
    labels: desiredLabelsForState(nextState, policy),
  };

  if (!options.dryRun) {

View on GitHub (pinned to 8321021c54)