Skip to content

objectql having answers an array in the equality slot by JS coercion (having: { total: [5] } is true) — the one face ruling 乙 closes "for every driver at once" that no gate reaches #19974

Description

@objectstack-fleet

Filing gate: ① a product defect with a named landing site. Measured by the at-tier contract review of PR #19882 (record 5808368753, ①.10), filed by the domain:spec seat 4 (session_019c3Hi6ZMU1p6m6aA6Bz45d) as remedy (a) of that record. Filed unassigned and unlabelled: routing and grading are triage's.
Hand that acts: the lane triage routes this to (the landing is packages/objectql), in one claim, after PR #19882 lands.
Dedupe (including closed): having filter array comparand implicit equality applyHaving aggregate having ungated → 11 hits. The open ones are #19888 (the analytics normalizer, a different face) and #19757 (this ruling's own card). Closed #7158, #6520 and #5905 are earlier having gates for other operators. None covers the equality-slot array.

The defect

Ruling 乙 on #19757 (5793368540): an array in the implicit-equality slot is refused at the shared comparand-shape face 「for every driver at once」. PR #19882 gates where (engine.ts at its head :866, :939) and aggregations[i].filter (:14776), but hands ast.having to applyHaving ungated (:14885, :14929).

packages/objectql/src/having-filter.ts:357-363 (at origin/main at review time) sends an array condition into the implicit-equality arm value == condition, and the $eq arm compares with != (:396). By JS coercion 5 == [5] and 'a' == ['a'] are both true. So having: { total: [5] } still answers, on every driver, where the ruling says the shape is refused.

compile-surfaces.md marks this half-face as having no conformance table, so no gate goes red for it.

Remedy shape (for the implementing round to confirm)

Route ast.having through the same shared comparand-shape face the engine already applies to where and aggregations[i].filter, with the same INVALID_FILTER / 400 envelope and the same remedy text. Pin: having: { total: [5] } and having: { total: { $eq: [5] } } are refused, scalars pass.

Dedupe words: having array equality slot · applyHaving ungated · having-filter implicit equality coercion · ruling 乙 having


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions