[Bug]: GENERATION_FAILED (fp: 1d75a7ea)
Description
Design verification failed for App.jsx. The repair limit was reached after 3 done() error rounds. The workspace files have been kept, but the design is not ready. Fix the errors and retry. radius: Unknown Google DESIGN.md top-level field "radius" shadows: Unknown Google DESIGN.md top-level field "shadows" typography.fontFamily: Typography token must be an object, e.g. { fontFamily: "system-ui", fontSize: "16px" }; put descriptive prose in the Markdown body typography.screenTitle.letterSpacing: Expected a dimension with px, em, or rem unit typography.sectionTitle.letterSpacing: Expected a dimension with px, em, or rem unit typography.body.letterSpacing: Expected a dimension with px, em, or rem unit typography.label.letterSpacing: Expected a dimension with px, em, or rem unit typography.caption.letterSpacing: Expected a dimension with px, em, or rem unit
Steps to reproduce
Design verification failed for App.jsx. The repair limit was reached after 3 done() error rounds. The workspace files have been kept, but the design is not ready. Fix the errors and retry. radius: Unknown Google DESIGN.md top-level field "radius" shadows: Unknown Google DESIGN.md top-level field "shadows" typography.fontFamily: Typography token must be an object, e.g. { fontFamily: "system-ui", fontSize: "16px" }; put descriptive prose in the Markdown body typography.screenTitle.letterSpacing: Expected a dimension with px, em, or rem unit typography.sectionTitle.letterSpacing: Expected a dimension with px, em, or rem unit typography.body.letterSpacing: Expected a dimension with px, em, or rem unit typography.label.letterSpacing: Expected a dimension with px, em, or rem unit typography.caption.letterSpacing: Expected a dimension with px, em, or rem unit
Expected behavior
Design verification failed for App.jsx. The repair limit was reached after 3 done() error rounds. The workspace files have been kept, but the design is not ready. Fix the errors and retry. radius: Unknown Google DESIGN.md top-level field "radius" shadows: Unknown Google DESIGN.md top-level field "shadows" typography.fontFamily: Typography token must be an object, e.g. { fontFamily: "system-ui", fontSize: "16px" }; put descriptive prose in the Markdown body typography.screenTitle.letterSpacing: Expected a dimension with px, em, or rem unit typography.sectionTitle.letterSpacing: Expected a dimension with px, em, or rem unit typography.body.letterSpacing: Expected a dimension with px, em, or rem unit typography.label.letterSpacing: Expected a dimension with px, em, or rem unit typography.caption.letterSpacing: Expected a dimension with px, em, or rem unit
Actual behavior
Error invoking remote method 'codesign:v1:generate': CodesignError: Design verification failed for App.jsx. The repair limit was reached after 3 done() error rounds. The workspace files have been kept, but the design is not ready. Fix the errors and retry. radius: Unknown Google DESIGN.md top-level field "radius" shadows: Unknown Google DESIGN.md top-level field "shadows" typography.fontFamily: Typography token must be an object, e.g. { fontFamily: "system-ui", fontSize: "16px" }; put descriptive prose in the Markdown body typography.screenTitle.letterSpacing: Expected a dimension with px, em, or rem unit typography.sectionTitle.letterSpacing: Expected a dimension with px, em, or rem unit typography.body.letterSpacing: Expected a dimension with px, em, or rem unit typography.label.letterSpacing: Expected a dimension with px, em, or rem unit typography.caption.letterSpacing: Expected a dimension with px, em, or rem unit
open-codesign version
0.2.2
Platform
Windows
OS version
Windows 11 (10.0.26200)
Model provider (if relevant)
OpenAI
Error code
GENERATION_FAILED
Diagnostics bundle
Bundle saved locally at ~\Downloads\open-codesign-diagnostics-2026-10-02T02-51-35.zip. Attach it to this issue after submitting.
Logs
runId: 'muqcv3ja-ywt52v',
generationId: 'muqcv3ja-ywt52v',
tool: 'done',
isError: false,
status: 'done'
}
[2026-10-02 10:50:06.176] [info] (main:ipc) agent.turn_end {
runId: 'muqcv3ja-ywt52v',
generationId: 'muqcv3ja-ywt52v',
deltas: 0,
tools: 1
}
[2026-10-02 10:50:06.176] [info] (main:ipc) agent.end { runId: 'muqcv3ja-ywt52v', generationId: 'muqcv3ja-ywt52v' }
[2026-10-02 10:50:06.177] [info] (main:ipc) [generate] step=send_request.ok {
runId: 'muqcv3ja-ywt52v',
generationId: 'muqcv3ja-ywt52v',
provider: 'custom-deepseek-v4-pro-2ex8',
modelId: 'deepseek-flash',
ms: 596837
}
[2026-10-02 10:50:06.177] [error] (main:ipc) [generate] step=verify.fail {
runId: 'muqcv3ja-ywt52v',
generationId: 'muqcv3ja-ywt52v',
provider: 'custom-deepseek-v4-pro-2ex8',
modelId: 'deepseek-flash',
path: 'App.jsx',
errorCount: 17,
repairLimitReached: true
}
[2026-10-02 10:50:06.178] [error] (main:ipc) generate.fail {
runId: 'muqcv3ja-ywt52v',
generationId: 'muqcv3ja-ywt52v',
ms: 599056,
provider: 'custom-deepseek-v4-pro-2ex8',
modelId: 'deepseek-flash',
baseUrl: '[url omitted]',
message: 'Design verification failed for App.jsx.\n' +
'The repair limit was reached after 3 done() error rounds.\n' +
'The workspace files have been kept, but the design is not ready. Fix the errors and retry.\n' +
'radius: Unknown Google DESIGN.md top-level field "radius"\n' +
'shadows: Unknown Google DESIGN.md top-level field "shadows"\n' +
'typography.fontFamily: Typography token must be an object, e.g. { fontFamily: "system-ui", fontSize: "16px" }; put descriptive prose in the Markdown body\n' +
'typography.screenTitle.letterSpacing: Expected a dimension with px, em, or rem unit\n' +
'typography.sectionTitle.letterSpacing: Expected a dimension with px, em, or rem unit\n' +
'typography.body.letterSpacing: Expected a dimension with px, em, or rem unit\n' +
'typography.label.letterSpacing: Expected a dimension with px, em, or rem unit\n' +
'typography.caption.letterSpacing: Expected a dimension with px, em, or rem unit',
code: 'GENERATION_INCOMPLETE'
}
[2026-10-02 10:50:07.368] [error] (renderer:console) [store] applyGenerateError {"generationId":"muqcv3ja-ywt52v","designId":"4cda4b42-f859-4612-bfdb-eba9daa0df94","message":"Error invoking remote method 'codesign:v1:generate': CodesignError: Design verification failed for App.jsx.\nThe repair limit was reached after 3 done() error rounds.\nThe workspace files have been kept, but the design is not ready. Fix the errors and retry.\nradius: Unknown Google DESIGN.md top-level field \"radius\"\nshadows: Unknown Google DESIGN.md top-level field \"shadows\"\ntypography.fontFamily: Typography token must be an object, e.g. { fontFamily: \"system-ui\", fontSize: \"16px\" }; put descriptive prose in the Markdown body\ntypography.screenTitle.letterSpacing: Expected a dimension with px, em, or rem unit\ntypography.sectionTitle.letterSpacing: Expected a dimension with px, em, or rem unit\ntypography.body.letterSpacing: Expected a dimension with px, em, or rem unit\ntypography.label.letterSpacing: Expected a dimension with px, em, or rem unit\ntypography.caption.letterSpacing: Expected a dimension with px, em, or rem unit"} {}
Thanks for the thorough report — the logs and the validator output are very useful.
What is actually failing: This is a DESIGN.md schema-validation failure, not an App.jsx syntax or runtime error. The agent loop reached done(), verification re-parsed the workspace, and the design-system file failed validation, so the run was surfaced as GENERATION_FAILED / logged as GENERATION_INCOMPLETE after the 3 repair rounds were exhausted (repairLimitReached: true, errorCount: 17 in your log). The workspace was intentionally kept, which is why the files are still there to retry.
DESIGN.md is the design-system artifact in the v0.2 workspace model — see AGENTS.md:11 — and it is validated against a stricter schema than plain Markdown, which is what the model tripped over.
The errors fall into two groups:
- Unsupported top-level fields.
radiusandshadowsare rejected as “Unknown Google DESIGN.md top-level field”. Only a fixed set of top-level token groups is accepted; anything else needs to move into the Markdown body instead of being declared as a top-level key. - Typography token shape.
typography.fontFamilymust be an object (the validator’s own example is{ fontFamily: "system-ui", fontSize: "16px" }), not a plain string.- Every
typography.*.letterSpacingvalue must carry a unit (px,em, orrem). Unitless values are rejected.
Why the run hard-failed: the loop repaired three times without converging. Your provider is the custom OpenAI-compatible endpoint custom-deepseek-v4-pro-2ex8 with model deepseek-flash, and the same invalid DESIGN.md shape came back each round, so this looks like a model-output-conformance issue rather than a transient transport error.
Suggested workaround: open the kept workspace, edit DESIGN.md so it conforms —
- remove
radiusandshadowsas top-level keys (describe them in the body or fold them into a supported token group), - convert
typography.fontFamilyinto an object, - add
px/em/remto eachletterSpacing—
then re-run generation/verification. I can’t confirm the exact validator implementation line from the public checkout in this context, so treat the above as the behavior implied by the error text rather than a cited code path.
Need more info:
- The generated
DESIGN.mdcontent, or the diagnostics bundle you saved (open-codesign-diagnostics-2026-10-02T02-51-35.zip) — it will show the exact failing tokens. - Does the same prompt succeed with a first-party provider/model, or does it only reproduce with
deepseek-flash? - Has any run with this workspace/prompt ever reached
donesuccessfully, or does it always fail verification?
Open-CoDesign Bot
Thanks for the detailed log. I looked at packages/shared/src/design-md.ts and I think most of the errors listed here come from two checks that are stricter than they need to be for generated output:
-
Dimension parsing (
validateDimension, regex^-?\d+(?:\.\d+)?(px|em|rem)$). The fiveletterSpacingerrors are probably one of these:letterSpacing: 0is parsed by YAML as the number0, so it fails even though it is a very common value..02em/-.02em(no leading zero) is valid CSS but is rejected by the regex.- Unitless values like
0.5are rejected too. The spec definesletterSpacingas a Dimension, so I'm less sure these should pass.
-
Unknown top-level keys (around line 334) are errors. Models tend to add
radius(meaningrounded) andshadows. Each one costs a repair round, and after 3 rounds the whole generation fails, even whenApp.jsxitself may be fine.
What I'd propose:
- Accept
0(number or string) and leading-dot decimals for Dimension fields. Optionally accept unitless numbers forletterSpacingwith a warning. - Downgrade unknown top-level keys to
warning, as f2a9dbb did for unknown component properties. Forradius, the message could point torounded. - Keep real structural problems as errors, e.g.
typography.fontFamilygiven as a string instead of a token object, malformed YAML, duplicate sections.
Before I open a PR, which level of strictness would you prefer? Would you rather stay close to the spec (only 0 and .5em, unknown keys become warnings), or be more lenient (unitless numbers accepted too)? I'm happy to keep it small: design-md.ts plus tests.