You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 71f205d
Browse filesBrowse the repository at this point in the historyBrowse files
* fix(driver-mongodb): reduce empty $and/$or/$not to their boolean identity, refusing non-nodes first (#5239)
`translateFilter` passed combinator arrays through verbatim, and MongoDB
answers an empty one with neither TRUE nor FALSE but a third behaviour: it
refuses the query (`$and/$or/$nor must be a nonempty array`). So `{$and: []}`
and `{$or: []}` reached find/count/updateMany/deleteMany as a server error
carrying no ADR-0112 code, while driver-sql (#5134), driver-memory and formula
all answered them as identities.
Replaced with the same STRUCTURAL three-valued reduction: reduce the whole tree
to true/false/clause first, then emit. Empty `$and` becomes TRUE (no condition);
empty `$or` becomes FALSE and emits a real zero-row condition
(`{_id: {$in: []}}`) — emitting nothing would be `{}`, which find/updateMany/
deleteMany read as EVERY document, the opposite answer. Every `$and`/`$or`
array emitted is therefore guaranteed non-empty.
Shape rejection lands in the same change and runs BEFORE any identity: measured
on main, `{$or: [new Date()]}` translated to `{$or: [{}]}` (every document) and
`{$or: 'x'}` / `{$not: null}` translated to `{}` (every document). updateMany
and deleteMany translate the same `where`, where that is data loss rather than a
wrong row count. Non-nodes now raise INVALID_FILTER / 400 naming the position;
the gate judges by PROTOTYPE, since Date/RegExp/class instances satisfy
`typeof x === 'object'` while enumerating empty.
spec is documentation only: FilterConditionSchema's contract TSDoc now states
the NULL-safe `$not` semantics ruled in #5146, and filter-logic-conformance.ts
records the measured matrix for the three ruled-but-not-yet-enrolled case
families. The four FILTER_LOGIC_CASES rows #5239 asks for are deliberately NOT
added: read-scope-sql and the analytics filter-normalizer, both enrolled
backends, refuse empty combinators fail-closed by design and pinned test, which
contradicts the identity ruling — escalated as #5322.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ErbEDVAg1No9gdg1pgDAGB
* docs(spec): 同步轮散文校订 —— 对 main@cdfbee2f0 实测后落笔 (#5239)
本 PR 的 spec 半边是契约文档,机械合并会把 base 时代的论断带上 main;
逐条对当前 origin/main 实测后校订:
- FilterConditionSchema 的 NULL-safe $not 合规段:read-scope-sql 已由
#5326 对齐(#5297 关闭)、filter-normalizer 已由 #5335 对齐(#5325
关闭),七个面全部一致 —— 「尚未合规、指向 #5297」改写为已闭合的事实。
- 「Deliberately NOT declared here」:空组合子单位元由「两立场对峙、
上交 #5322」改为「#5322 已拍板取单位元,实施在 #5365(排在本 PR 之后
合入);main 上两个 analytics 编译器今天仍拒收,故本 PR 仍不在此声明,
声明随 #5365 翻正」;{ field: {} } 由「无后端设闸」改为「#5327 已闸
四家,driver-mongodb 是唯一还在作答的后端(#5376)」。
- filter-logic-conformance.ts 族 2/3 状态行同步重测:族 2 的后端阻塞
已清零,唯余 fixture 工作;族 3 的四家闸门已落,阻塞改为表形扩展 +
mongodb(#5376)。族 1 段落一字未动 —— 由 #5365 在其同步轮删除,
已约定分工。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ErbEDVAg1No9gdg1pgDAGB
* chore(spec): gen:schema 前移 authorable-surface 锚点至合并后的 merge-base (cdfbee2)
合并 origin/main 后重建时由 gen:schema 写出(先 commit merge 再跑生成,
#5370 的锚点倒退陷阱按序避开):baseRev 28ad90e → cdfbee2,随锚点带入
#5312 的 api/ApiEndpoint 键面。check:generated 9/9 up to date,
check:authorable-surface 绿。非手改。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ErbEDVAg1No9gdg1pgDAGB
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments