Skip to content

[finding] service-analytics carries its own copies of the comparand-type allow-list the #7872 door now single-sources — reconcile membership and message wording to the door #8186

Description

@huangyiirene

One-line statement

service-analytics carries its own copies of the comparand-type allow-list that #7872's shared door now single-sources for the SQL family — comparand-shape.ts lines ~116 and ~142 spell the identical string | number | bigint | boolean membership twice (plus Date/null arms), and its refusal messages hand-copy the "use a string, number, boolean, null, Date or binary value" sentence (comparand-shape.ts ~:456) that driver-sql / driver-turso now quote from ACCEPTED_FILTER_COMPARAND_TYPES_SENTENCE (@objectstack/spec/data).

Why filed instead of fixed in #7872's PR

The #7872 dispatch's declared file surface was packages/spec, the engine seam in packages/objectql, and exactly the two SQL-family allowlists the ruling named (sql-driver.ts, turso remote-transport.ts). The analytics twins are outside that surface, and they are not a mechanical swap: analytics has its own recorded undefined disposition (the where door normalises undefined to null rather than refusing — #5526 / #6386 territory), so reconciling its membership to the door needs its own look at whether that recorded difference survives.

What reconciliation would look like

Same shape as #7872's driver-sql half: keep comparand-shape.ts's envelopes and position logic, source the TYPE membership from isAcceptedFilterComparand and the message sentence from ACCEPTED_FILTER_COMPARAND_TYPES_SENTENCE, and record any deliberate local deltas (the undefined normalisation) at the use site the way driver-sql's undefined/binary arms now are.

Observation-class: the copies currently AGREE with the door byte-for-byte on membership — this is drift risk, not a live defect.

Found while implementing #7872 (the comparand-type door); the PR on that card carries the reconciliation pattern to copy.

Blocked-by: #7872


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