fix(spec): rating/vector builders emit live props; promote flat dimensions#1976
Merged
Conversation
…nsions` The Field.rating / Field.vector builders emitted properties the spec-liveness ledger classifies as dead (silent runtime no-ops), so every field authored through them tripped the `liveness-dead-property` author lint: - Field.rating(n) emitted `maxRating`; the rating renderer reads the flat `max` (RatingField.tsx:13). Builder now emits `max`. - Field.vector(n) emitted a nested `vectorConfig` block; the renderer reads the flat `dimensions` sibling (VectorField.tsx:11) and nothing consumes vectorConfig (no vector-index DDL). Builder now emits flat `dimensions`. `dimensions` is promoted to a declared, LIVE top-level FieldSchema property and classified in the liveness ledger. It was previously valid only nested inside vectorConfig, so a hand-authored flat `dimensions` was silently stripped during compile (Zod drops unknown keys) — the renderer then saw no dimensionality. This retroactively makes the app-showcase fix (#1973) actually carry its value into the artifact, verified: f_vector.dimensions=1536, f_rating.max=5. maxRating and vectorConfig remain accepted by the schema (still dead + authorWarn) for back-compat, so hand-authored usages still warn rather than type-error. Verification: liveness gate green (field 53 classified, all classified), field.test.ts 115/115 pass, showcase compile exit 0 with zero liveness-dead-property warnings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 89 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #1973. That PR fixed the showcase's authored dead props; this fixes the
Fieldbuilders that emit them, so any app usingField.rating/Field.vectoris clean — not just the showcase.The
Field.rating(n)/Field.vector(n)builders emitted properties the spec-liveness ledger classifies as dead (silent runtime no-ops), tripping theliveness-dead-propertyauthor lint:Field.rating(n)maxRatingmaxRatingField.tsx:13→field.maxField.vector(n)vectorConfigblockdimensionsVectorField.tsx:11→field.dimensionsThe latent bug this also fixes
dimensionswas only valid nested insidevectorConfig— it was not a declared top-levelFieldSchemaproperty. So a hand-authored flatdimensions(including the one #1973 just merged into the showcase) was silently stripped during compile (Zod drops unknown keys), leaving the renderer with no dimensionality.This PR promotes
dimensionsto a declared,livetop-level schema property and classifies it in the liveness ledger. Verified against the showcase artifact:f_vector.dimensions = 1536now survives (previously absent),f_rating.max = 5.Back-compat
maxRatingandvectorConfigremain accepted by the schema (stilldead+authorWarn), so existing hand-authored usages keep getting the advisory warning rather than a type error.Verification
field53 classified (all classified), no stale evidencefield.test.ts: 115/115 passcompile: exit 0, zeroliveness-dead-propertywarnings,f_vector.dimensions=1536present in artifact🤖 Generated with Claude Code