Skip to content

examples/ferriskey-presentation.json does not pass rustmotion validate (pre-existing on main) #157

Description

@LeadcodeDev

A shipped example fails the validation CLAUDE.md declares mandatory.

$ rustmotion validate -f examples/ferriskey-presentation.json
Geometry: 1 violation(s)
ERROR: gradient_text (wrap=false but text too wide)
  view: 0, scene: 4
  path: views[0].scenes[4].children[1].children[1].children[0].children[0]
  bbox: [290, 509] -> [690, 631]   (viewport: 1920x1080)
  axis: x
  hint: gradient_text natural width is 404px but only 400px available

This is not an audit-chantier regression

Established, not assumed:

  • The failure reproduces identically — same 404px figure — at c229ec0, before round 3.
  • git log main..c229ec0 over the measurement path (intrinsic.rs, renderer/text.rs, gradient_text.rs, renderer/fonts.rs) is empty: the measuring code is identical to main.
  • Same for the validator (commands/geometry.rs) and for the example file itself.

The overflow therefore exists on main and predates the whole chantier.

Why it still matters

404px against 400px available — a 1% overflow. The content is almost certainly fine to the eye. But:

  1. CLAUDE.md makes it a mandatory rule that every scenario passes validate before being shown. A repository example that fails contradicts the rule the repository teaches.
  2. A shipped example is a reference that generators copy. This one shows them a white-space: nowrap inside a box 4px too narrow.

Directions

In order of preference:

  1. Fix the example — widen the box by a few pixels, or drop the font-size slightly. It is a gradient_text with white-space: nowrap in a 400px box; making it conform is trivial and makes the example exemplary.
  2. While there, check that the natural width measured by GradientTextIntrinsic matches the pixels actually painted. A 1% discrepancy on a single line could also be a measurement defect — in which case the real bug is not in the example. Settle that before editing the JSON, or the symptom gets masked.

Verification

rustmotion validate -f examples/*.json should pass on all 8. Today: 7 of 8.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions