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
- Retry the revision once the design system state is stable.
- Confirm the design system still exists before retrying.
- Check daemon data dir permissions and free disk space.
- 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
- Prevent concurrent revision jobs against the same design system to avoid write races.
- Keep the daemon data dir writable with adequate free space.
- Re-confirm the design system exists immediately before retrying a failed revision.
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
- Could not create token contract revision
- Editable design system not found
- Revision feedback is required
- BAD_REQUEST
- BAD_REQUEST
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/62393d2aa742660a.
Report an issue: GitHub.