Skip to content

test(components): serde round-trip coverage for every component variant and alias#26

Merged
LeadcodeDev merged 1 commit into
mainfrom
test/serde-round-trip
Jul 18, 2026
Merged

test(components): serde round-trip coverage for every component variant and alias#26
LeadcodeDev merged 1 commit into
mainfrom
test/serde-round-trip

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

Closes #10.

Three new tests in the component smoke module:

  • round-trip: deserialize → serialize → deserialize → serialize must be stable for every corpus entry
  • aliases: containerdiv and progress_barprogress must serialize to canonical tags
  • completeness: every type tag in the schemars-generated schema must have a corpus entry — this found 16 components missing from the corpus (image, video, gif, caption, connector, avatar, avatar_group, arrow, comparison, dot_map, line, lottie, mockup, notification, pill_nav, tooltip); adding them also enrolls them in the existing paint smoke tests

Also untracks .claude/dev-methodology.local.md (personal prefs committed by mistake in #25) and gitignores .claude/*.local.md.

Verify: cargo test --workspace → 130 passed · cargo fmt --check ✓ · clippy 0 warnings

Adds three guards against the schema-drift class of bug (the container
alias was silently lost by a bare rename to div):
- round-trip: canonical serialization must re-deserialize identically
- aliases: container->div, progress_bar->progress map to canonical tags
- completeness: every type tag in the generated JSON schema must have a
  minimal corpus entry (16 components were missing; added, which also
  enrolls them in the existing paint smoke tests)

Also untracks .claude/dev-methodology.local.md (personal prefs file
committed by mistake in #25).
@LeadcodeDev
LeadcodeDev merged commit f4055e1 into main Jul 18, 2026
3 checks passed
@LeadcodeDev
LeadcodeDev deleted the test/serde-round-trip branch July 18, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(components): serde round-trip coverage for every component variant and alias

1 participant