fix(driver-sql): self-heal numeric type fidelity on legacy SQLite columns + extend dogfood matrix#2028
Merged
Merged
Conversation
…ns + extend dogfood matrix The #2025 column-affinity fix only governs newly created columns: SQLite never alters a column's type in place and the reconciler only adds missing columns, so a rating/slider/progress column created before the fix keeps TEXT affinity and still reads back '4' not 4. - add a read-side numeric coercion (numericFields registry, single- sourced from NUMERIC_SCALAR_TYPES) that coerces numeric-looking stored strings back to numbers on read — mirroring the dateFields legacy repair — so fidelity no longer depends on column affinity alone; null and non-numeric junk are preserved (not 0/NaN) - unit test: reproduce a legacy TEXT column and prove it self-heals - extend the dogfood HTTP matrix to guard progress/record/video/audio over real HTTP (previously only driver-unit-tested) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 8 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
This was referenced Jun 18, 2026
os-zhuang
added a commit
that referenced
this pull request
Jun 28, 2026
fix(plugin-form): guard modal/drawer against accidental discard of unsaved input (#2028) objectui@50fd513db6666d7261e8424e756c8fa03fa9f1c3
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.
Follow-up to #2025. Two gaps that fix left open:
1. Legacy columns don't get the fix
#2025mappedrating/slider/progressto numeric columns — but only for newly created columns. SQLite never alters a column's type in place, and the schema reconciler (sql-driver.tsinitObjects) only ADDS missing columns. So a column created before the fix keeps its TEXT affinity and would still read back'4'instead of4forever. (toggle/record/video/audioalready self-heal because their fix routes through the read-sidebooleanFields/jsonFieldsregistries — the numeric scalars were the odd ones out, relying on column affinity alone.)Fix: a read-side numeric coercion — the new
numericFieldsregistry, single-sourced fromNUMERIC_SCALAR_TYPES— coerces numeric-looking stored strings back to numbers on read, mirroring howdateFieldsalready repairs legacy timestamp-typedField.daterows. Fidelity no longer depends on column affinity alone.nullstaysnull(not0); genuinely non-numeric junk is preserved (notNaN).2. progress/record/video/audio were only unit-tested
The audit in #2025 also fixed
progress(numeric) andrecord/video/audio(object→JSON), but those were only covered by the driver unit test. Extended the dogfood field-zoo HTTP matrix to guard them over real HTTP too.Verification
initObjectsmust not alter it) and proves a stored'4'reads back as4; a sibling test assertsnull/'n/a'are left intact.🤖 Generated with Claude Code