affaan-m/ECC · error · Error

Issue #${issueNumber} is not ready to publish: ${validation.

Error message

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

What it means

Thrown by applyPublish when applyValidate (run in dry-run) returns ok:false. Publishing an issue requires every validation check to pass; the message enumerates each check and its ok flag so the caller sees exactly which gates failed (e.g. dependencies-closed=false, validation=false). This runs before any label/state mutation so a half-published issue is avoided.

Source

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

  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 01e15490f0)

Solutions

  1. Read the check=list in the message and fix each check=false item: close dependencies, repair the body, satisfy validation rules.
  2. Run applyValidate directly (dryRun:true) to get the full validation.validations array with per-check messages before retrying publish.
  3. If a check is intentionally skippable, review the policy config for that check's required flag.
  4. Re-run applyPublish only after all checks report ok:true.

Example fix

// before
applyPublish(repo, issueNumber);

// after — pre-validate and show per-check detail
const v = applyValidate(repo, issueNumber, { dryRun: true }, context);
if (!v.ok) {
  for (const entry of v.validations) {
    if (!entry.ok) console.error(`FAIL ${entry.check}: ${entry.message || ''}`);
  }
  process.exit(1);
}
applyPublish(repo, issueNumber);
Defensive patterns

Strategy: validation

Validate before calling

const v = applyValidate(repo, issueNumber, { dryRun: true }, context);
if (!v.ok) {
  const failed = v.validations.filter(x => !x.ok).map(x => `${x.check}=${x.message||''}`);
  throw new Error(`Publish blocked: ${failed.join('; ')}`);
}

Type guard

function allChecksPass(validation) {
  return Boolean(validation && validation.ok === true && Array.isArray(validation.validations) && validation.validations.every(x => x.ok));
}

Try / catch

try {
  applyPublish(repo, issueNumber);
} catch (e) {
  if (/not ready to publish/.test(e.message)) { console.error(e.message); process.exit(1); }
  throw e;
}

Prevention

When it happens

Trigger: Dependencies (referenced issues) not all closed; the issue body is missing required sections; the coordination state JSON is malformed; validation checks fail for any reason encoded in applyValidate.

Common situations: Trying to publish an epic whose sub-issues are still open; body coordination block was hand-edited and broke; a validation rule was added/tightened in policy since last publish attempt.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/f17225a29d0714a7. Report an issue: GitHub.