Skip to content

#11627 population re-measured after the A half: three additional members of the >768/unboundable keyed-text class (resource_id 1024, sys_verification [value], sys_account [issuer+account_id]) #11701

Description

@huangyiirene

Parent card #11627 says its final population is decided by #11374's A PR ("the A PR decides the exact remaining population this card must cover; re-verify the four cases against that ref"). Measured against that PR's head (368f162254, PR #11699, live MySQL 8.0.46): the four ruled cases still stand, and three more members of the same class exist that the parent's list does not name.

The three additions (all measured, none speculative)

  1. sys_oauth_client_resource.resource_id — declares maxLength: 1024 (landed, FK to sys_oauth_resource.identifier which is one of the four ruled cases), keyed by the declared non-unique index [resource_id]. 1024 > 768 ⇒ column stays TEXT and the index fails ER_BLOB_KEY_WITHOUT_LENGTH on MySQL. Same class, same fix family as the parent's sys_oauth_resource.identifier; a shadow-key or the parent's chosen mechanism must cover the referencing column too or the object keeps failing sync.

  2. sys_verification[value] indexvalue is unboundable, not just >768: better-auth's oauth-provider stores OIDC authorization-code payloads there as a JSON blob (the field's own index comment in sys-verification.object.ts documents this, and upstream better-auth 1.7.1 declares the field unindexed and unbounded). driver-sql: the platform-objects schema does not sync onto MySQL — unbounded string fields become TEXT, which MySQL refuses to index #11374's A half deliberately left it undeclared under the ruling's escape clause, so its ObjectStack-declared non-unique [value] index can never exist on MySQL via a bound. Two candidate dispositions for this card to weigh: hash-shadow key (the parent's route), or measuring whether anything actually queries by value — upstream keys verification lookups on identifier, so the index may be removable; that liveness measurement has not been made and should be, before adding a shadow column.

  3. sys_account[issuer, account_id] UNIQUE — new member created by the A half itself: issuer now declares maxLength: 2048, transitively from the landed sys_sso_provider.issuer contract (2048) whose values (iss claim / registered issuer URL) are written verbatim into the column, so no keyable (≤768) bound is defensible. The composite unique that better-auth 1.7 resolves account identity by therefore still cannot exist on MySQL and needs the parent's hash-shadow treatment. (The provider-scoped [provider_id, account_id] UNIQUE does exist physically after the A half — 255+256 chars = 2044 bytes, under the 3072-byte ceiling.)

Post-A measurement (context for re-verification)

MySQL 8.0.46, all 44 platform objects: 8/44 still fail sync — sys_metadata + the 3 ruled maxLength: 1024 columns (parent's four), plus the three members above, plus sys_import_job.created_by (unbounded, in #11374's remaining A scope — not this card's). Postgres 16.13 control: 0/44.

Filed unassigned by the #11374 route-A dev for the parent card's triage; not to be dispatched independently of the parent's sequencing (parent is pm:blocked behind #11374).

Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions