Skip to content

measure: how each driver answers the six non-JSON comparand types (#7872 restart condition b) #7956

Description

@huangyiirene

What this card is

A measurement, not a fix. Its whole deliverable is a table plus a judgement about what the table means. No behaviour changes, no refusal is added, no schema is touched.

It exists because triage named this measurement as restart condition (b) on #7872 (comment 5263919935), in those words: 「the still-unmeasured four-driver divergence matrix (crash/refuse/silent-empty on the six comparands), which now answers "how much silent divergence exists under the unenforced schema" and would feed either outcome.」

"Either outcome" is the point: the drivers seat measured (#7872 comment 5261540941) that comparand-type policy is per-driver by construction — every driver calls parseFilterAST, which casts object-form filters through unvalidated, and NormalizedFilterSchema (which does carry type policy for $gt/$between/$contains) has zero consumers outside packages/spec. Whether the spec seat builds a door (#6017, declaration 5261543992) or declines it, the same question has to be answered first: how far apart are the five drivers today? If they already agree, a door is codifying consensus. If they disagree, the divergence is itself the argument.

The measurement

Six comparand types, from #7872's measured table on driver-memory:

BigInt(100) · () => 1 · Symbol('x') · new Map() · a class instance · undefined

For each, on each driver, in a scalar comparison ({qty: {$eq: <value>}} is the shape #7872 used; extend to a second operator only if it changes the answer). Record which of these happens:

Five drivers: driver-memory, driver-sql, driver-sqlite-wasm, driver-turso, driver-mongodb. Include driver-memory rather than copying #7872's numbers — re-measuring it on current main confirms or corrects the card that started this.

Environment constraints — declare what you could not reach

Known before you start, from the drivers seat's operating notes:

  • mongodb-memory-server's binary download is blocked by the proxy (403) in this environment. driver-mongodb has to be measured server-free at the translation layer (what the filter lowers to, and whether the lowering throws) rather than by executing against a real mongod. That is a real answer to a slightly different question — say so explicitly in the row rather than implying an execution result.
  • driver-sql (better-sqlite3, :memory:) and driver-sqlite-wasm run in-process.
  • driver-turso has local / replica / remote transports that do not behave alike (TursoDriver remote 面根本不生成自增号:RemoteTransport.create 自建 INSERT,auto_number 只是个 TEXT 列 #6944 is the precedent: the remote transport bypasses paths the other two take). Measure what you can reach without a real Turso endpoint and say which transports the result covers.

A row you could not measure is a legitimate result. Write "not reachable in this environment, because X" — do not infer it from a sibling driver and do not leave it blank.

Deliverable

A report on this card and a copy of the matrix as a comment on #7872, since that is the card whose restart condition this satisfies. Plus a short judgement: is the divergence material? Name the worst cell and say why it is the worst — "five drivers answer the same wrong thing" and "five drivers answer five different things" have opposite implications for whether a shared door is worth building.

Explicitly out of scope

Refs

#7872 (the finding and restart condition b) · #6017 (5261543992, the cross-seat declaration) · #7596 (why $eq/$in are deliberately z.any()) · #5240 (the silent-empty shape) · #5499 (the investment freeze and its scope)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions