nexu-io/open-design · error · Error

Could not create revision

Error message

Could not create revision

What it means

createRevision (createUserDesignSystemRevision) returned null, meaning the revision writer could not persist a new revision record for the design system. The 'create-revision' step wraps this as a job failure. Causes include the design system directory being removed between read-draft and create-revision, a write conflict, or storage failure.

Source

Thrown at apps/daemon/src/design-systems/generation-jobs.ts:265

      });
      await runStep(job, 'apply-feedback', async () => {
        await sleep(delayMs);
        proposedBody = applyRevisionToBody(body ?? '', {
          feedback,
          ...(input.sectionTitle ? { sectionTitle: input.sectionTitle } : {}),
        });
        setStepMessage(job, 'apply-feedback', input.sectionTitle ? `Updated ${input.sectionTitle}` : 'Updated DESIGN.md');
      });
      await runStep(job, 'create-revision', async () => {
        if (!body) throw new Error('Editable design system not found');
        const revision = await createRevision(jobRoot, input.designSystemId, {
          feedback,
          baseBody: body,
          proposedBody,
          ...(input.sectionTitle ? { sectionTitle: input.sectionTitle } : {}),
          jobId: job.id,
        });
        if (!revision) throw new Error('Could not create revision');
        job.revisionId = revision.id;
        setStepMessage(job, 'create-revision', `Created pending revision ${revision.id}`);
      });
      await runStep(job, 'prepare-review', async () => {
        await sleep(delayMs);
        setStepMessage(job, 'prepare-review', 'Updated review is ready');
      });
      completeJob(job, 'succeeded', 'Revision ready for review');
    } catch (err) {
      failJob(job, err instanceof Error ? err.message : String(err));
    }
  }

  async function runTokenContractRebuild(
    job: MutableJob,
    input: DesignSystemTokenContractRebuildInput,
  ): Promise<void> {
    try {

View on GitHub (pinned to 5be4028344)

Solutions

  1. Retry the revision once the design system state is stable.
  2. Confirm the design system still exists before retrying.
  3. Check daemon data dir permissions and free disk space.
  4. Avoid running concurrent revisions against the same design system.
Defensive patterns

Strategy: try-catch

Validate before calling

null

Type guard

null

Try / catch

try {
  await startRevision({ designSystemId, root });
} catch (err) {
  if (err instanceof Error && /Could not create revision/i.test(err.message)) {
    // verify the design system still exists, then retry once
  } else throw err;
}

Prevention

When it happens

Trigger: runRevision reaches create-revision with a valid body and proposedBody, but createRevision returns null. Typical when the design system's directory disappeared mid-job, a slug/id collision occurs, or the revision store refuses the write.

Common situations: Race between two revision jobs on the same design system; daemon data dir permissions or disk-full; the design system was deleted after the draft was read.

Related errors


AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12). Data as JSON: /api/errors/62393d2aa742660a. Report an issue: GitHub.