Filing gate: ① a defect with a named landing site: packages/objectql/src/engine.ts lowerWhereFilterArray, the seam every caller-supplied where passes through on find, findOne, count, aggregate, update and delete. Finding class (a).
The domain:engine execution seat 1 (session_01Bvd69VPa6puiNzzPUroDBx) filed this from its #20099 dev's out-of-scope findings (os-dev-report on #20099, PR #20117). The seat re-read the seam on origin/main. The runtime readings are the dev's. ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.
What happens
Measured by the #20099 dev on driver-memory and driver-sqlite-wasm, with 2 rows:
engine.find('order', { where: 'amount > 100' }) returns both rows. A number or a Map as where does the same. The caller's filter is dropped and the read is unfiltered, and nothing is raised.
engine.find('order', { where: [1, 2, 3] }) is refused, but with code and status undefined. The wire door answers INVALID_FILTER / 400 for the same input.
lowerWhereFilterArray lowers an array that is a FilterArray and runs the object-form doors on everything else. A non-object where is neither, so each door steps around it and the value reaches the driver, which ignores it.
Unmeasured, and the reason for the card's urgency: update and delete call the same seam before they decide between the by-id and the multi-row path (engine.ts, the [#5158] comments). Whether a string where on a multi-row update / delete rewrites or removes every row the caller can reach has not been run. #4346 (closed) was that shape for the filter alias. The taker measures the write verbs first.
Suggested shape (⛔ not a ruling)
- At the top of
lowerWhereFilterArray, refuse a where that is neither undefined, a plain filter object, nor a FilterArray. Use INVALID_FILTER / 400 in the ADR-0112 envelope, with the same words the wire door uses.
- Give the non-filter-array branch the same envelope.
- Pin every verb that calls the seam (
find, findOne, count, aggregate, update, delete) with a string, a number, a Map and a non-filter array, and assert code, status and that no driver call is made.
Filing-gate answers
Dedupe words: engine where string unfiltered · where non-object scalar dropped · lowerWhereFilterArray non-node · where array not a filter envelope
Filing gate: ① a defect with a named landing site:
packages/objectql/src/engine.tslowerWhereFilterArray, the seam every caller-suppliedwherepasses through onfind,findOne,count,aggregate,updateanddelete. Finding class (a).The
domain:engineexecution seat 1 (session_01Bvd69VPa6puiNzzPUroDBx) filed this from its #20099 dev's out-of-scope findings (os-dev-reporton #20099, PR #20117). The seat re-read the seam onorigin/main. The runtime readings are the dev's. ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.What happens
Measured by the #20099 dev on
driver-memoryanddriver-sqlite-wasm, with 2 rows:engine.find('order', { where: 'amount > 100' })returns both rows. A number or aMapaswheredoes the same. The caller's filter is dropped and the read is unfiltered, and nothing is raised.engine.find('order', { where: [1, 2, 3] })is refused, but withcodeandstatusundefined. The wire door answersINVALID_FILTER/ 400 for the same input.lowerWhereFilterArraylowers an array that is a FilterArray and runs the object-form doors on everything else. A non-objectwhereis neither, so each door steps around it and the value reaches the driver, which ignores it.Unmeasured, and the reason for the card's urgency:
updateanddeletecall the same seam before they decide between the by-id and the multi-row path (engine.ts, the[#5158]comments). Whether a stringwhereon a multi-rowupdate/deleterewrites or removes every row the caller can reach has not been run. #4346 (closed) was that shape for thefilteralias. The taker measures the write verbs first.Suggested shape (⛔ not a ruling)
lowerWhereFilterArray, refuse awherethat is neitherundefined, a plain filter object, nor a FilterArray. UseINVALID_FILTER/ 400 in the ADR-0112 envelope, with the same words the wire door uses.find,findOne,count,aggregate,update,delete) with a string, a number, aMapand a non-filter array, and assert code, status and that no driver call is made.Filing-gate answers
havingdoes not take the rest ofwhere's filter doors: a$fieldreference is never resolved, the comparand-TYPE door does not run, FilterArray sugar answers no group, and its own refusals fire only on a non-empty grouped set #20099 dev on reads.domain:engine, the owner ofpackages/objectql).closedincluded:engine where string number scalar dropped returns every row unfiltered lowerWhereFilterArray non-object where→ 9 hits, all read. [P1]filterfolds towhereinengine.findonly —findOne/count/update/deletesilently match EVERY row, and the hook docs teach the broken call #4346 (closed) is thefilteralias matching every row onfindOne/count/update/delete, the nearest shape, but not a non-objectwhere. Data query: an unknown field insidewhere/$filteranswers 200/0 instead of400 INVALID_FIELD— the bare-key door disagrees (#4134's uncovered sibling) #7534, The FILTER axis has no unmaterializable verdict: awhereon a virtual formula field returns 0 rows silently, while sort and search refuse the same field with a 400 #8296, service-analytics 的where门把undefined值的键整个丢掉 —— 单键 where 退化成「无过滤器」,方向是加宽(#6125 五面表漏记的第六、七种读法) #6386 and analytics filter-normalizer:未映射的算子被静默丢弃 → 查询放宽到全表($between 已修,还剩四个) #4128 are other silent-widening doors.Mapwhere.Dedupe words:
engine where string unfiltered·where non-object scalar dropped·lowerWhereFilterArray non-node·where array not a filter envelope