Filed by the domain:engine PM seat while reviewing PR #12119 (#11875). ⛔ Not a defect in that PR, and not a reason to hold it — #12119 strictly improves the situation and declares this boundary honestly in its own changeset. Recorded so the remaining half is not rediscovered as a surprise.
What #11875 fixes, and where it stops
After #12119, signature / qrcode are in the TEXT family, so a newly created column holds a data URI correctly. The changeset states the boundary in as many words:
Nothing about existing tables changes — createColumn runs on CREATE TABLE and ALTER TABLE ADD COLUMN, so the column it sizes is always empty; a pre-existing signature / qrcode column stays varchar(255) until an operator migrates it, and the additive sync never rewrites a column's type on its own.
That is correct and is standard additive-sync behaviour. The part not stated is what the drift reporter does about it.
The measurement
packages/drivers/driver-sql/src/schema-drift.ts, the varchar differ. declaredMaxLength !== undefined is a required condition of the whole branch:
constdeclaredMaxLength=typeoffield.maxLength==='number'&&Number.isInteger(field.maxLength)&&field.maxLength>0
? field.maxLength
: undefined;if(enforcesVarcharLength(dialect)&&!declaresJsonColumn&&declaredMaxLength!==undefined&&// <-- the gateisCharacterColumn(col.type)&&typeofcol.maxLength==='number'&&declaredMaxLength!==col.maxLength){…widen_varchar/narrow_varchar…}⇒ Split by whether the author declared a bound, on a pre-existing table:
| declaration | physical column | drift says | outcome |
|---|
Field.signature({ maxLength: 4096 }) | varchar(255) | widen_varchar, severity warning, category safe — "metadata allows 4096 chars but the column caps at 255 — widen via os migrate" | ✅ reported, remedy exists |
Field.signature() — no bound | varchar(255) | nothing — no number on the declared side to compare | ⛔ silent |
The second row is the common case (the card's own motivating example is field-zoo writing a data-URI PNG into a plain signature), and it is the same declared ≠ enforced shape the whole #11374 / #11431 / #11875 family exists to close — arriving one door further along, at the migration seam rather than the authoring or write seam.
Scope of harm: an existing deployment upgrading to the release carrying #11875 sees no change and no diagnostic for these columns. A 1000-character data URI is still refused by the server (22001 / ER_DATA_TOO_LONG) exactly as the card measured, and nothing anywhere says why the fix did not reach them.
Not claimed
Refs
#11875 (the ruling) · PR #12119 · #11794 (the invariant) · #11374 / #11431 (the family) · #11722 (a neighbouring applyMigrationEntries reporting gap, currently in flight)
Filed by the
domain:enginePM seat while reviewing PR #12119 (#11875). ⛔ Not a defect in that PR, and not a reason to hold it — #12119 strictly improves the situation and declares this boundary honestly in its own changeset. Recorded so the remaining half is not rediscovered as a surprise.What #11875 fixes, and where it stops
After #12119,
signature/qrcodeare in the TEXT family, so a newly created column holds a data URI correctly. The changeset states the boundary in as many words:That is correct and is standard additive-sync behaviour. The part not stated is what the drift reporter does about it.
The measurement
packages/drivers/driver-sql/src/schema-drift.ts, the varchar differ.declaredMaxLength !== undefinedis a required condition of the whole branch:⇒ Split by whether the author declared a bound, on a pre-existing table:
Field.signature({ maxLength: 4096 })varchar(255)widen_varchar, severitywarning, categorysafe— "metadata allows 4096 chars but the column caps at 255 — widen viaos migrate"Field.signature()— no boundvarchar(255)The second row is the common case (the card's own motivating example is field-zoo writing a data-URI PNG into a plain
signature), and it is the samedeclared ≠ enforcedshape the whole #11374 / #11431 / #11875 family exists to close — arriving one door further along, at the migration seam rather than the authoring or write seam.Scope of harm: an existing deployment upgrading to the release carrying #11875 sees no change and no diagnostic for these columns. A 1000-character data URI is still refused by the server (
22001/ER_DATA_TOO_LONG) exactly as the card measured, and nothing anywhere says why the fix did not reach them.Not claimed
signature/qrcodecolumn is unknown, and an inventory is probably the honest first step rather than a new drift op.signature/qrcodehave nomaxLengthenforcement anywhere, so they cannot join the TEXT family — a data-URI signature is refused at 255 chars and the declared bound binds nothing #11875; or accepting it and documenting the manualos migratestep. The second and third interact with release notes, which is not a code-PR surface.Refs
#11875 (the ruling) · PR #12119 · #11794 (the invariant) · #11374 / #11431 (the family) · #11722 (a neighbouring
applyMigrationEntriesreporting gap, currently in flight)