Repository navigation
docs(design): predicate compilation convergence — design and cost account - #20732
Merged
objectstack-fleet[bot] merged 3 commits intoSep 29, 2026
Merged
Conversation
Claude-Session: https://claude.ai/code/session_01DEvba2nBuD4tWzfq8r8NFY Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DEvba2nBuD4tWzfq8r8NFY Co-authored-by: Claude <noreply@anthropic.com>
…x, shape A and cost account Claude-Session: https://claude.ai/code/session_01DEvba2nBuD4tWzfq8r8NFY Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Sep 29, 2026
objectstack-fleet
Bot
deleted the
claude/issue-5930-predicate-convergence-design
branch
September 29, 2026 23:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #5930. This PR lands the investigation's deliverable. The build decision (the document's §6, D1–D7) goes to the maintainer on #5930 after it merges, so merging must not close the card.
Clause-②: no
This PR is the investigation's whole deliverable:
docs/design/predicate-compilation-convergence.md. It is a design and a cost account for shape A (a shared semantic tree, with compilers that own only their dialect), measured on3711e0b763.⛔ It is not a build. The diff adds one document and edits no source, test, schema, gate or skill file. The document proposes; the build decision is the maintainer's.
What the document measures
FilterConditioninto SQL, a query document or a boolean. The card counted 5 plus a half.TursoDriver.toRemoteFilter, a lowering pass in front of the remote transport;driver-memoryfaces: the query path, a reference matcher with no production caller, and the cube face;driver-mongodb;filterhalf ofhaving.$emptyruling took 4 cards, 4 PRs and 13 dev rounds, and edited 13 distinct face files.where$ltebare day on a declareddatetimefield drops the rest of that day —comparandsForconverts to storage form before the whole-day rule runs #20661) took 2 cards, 2 PRs and 3 rounds, and edited 10 distinct face files.2026-02-30) is rolled over as a datetime comparand and is a 500 on PostgreSQL as a date comparand, and a non-ISO datetime comparand is read in the host zone #20549 with core temporal rule: atimecomparand spelled with an extended-ISO year (+010000-01-01T10:00:00Z) is compared as text on memory and SQLite:$gtanswers 3 of 3 rows,$lt0, where the same wall clock as a 2026 instant answers 2 / 1 #20480) is enforced at the engine seam. It took 1 PR and 1 round, and edited 0 face files.3711e0b763, 22 commits edited 3 or more face files. By subject, 18 of them are filter semantics.undefined比较数被发射器读作 null、却被守卫/校验读作「值」—— turso local 抛裸 knex 错、remote 静默答 IS NULL(实测,origin/main) #6050 re-check. At the faces' own entry points, four faces still answer anundefinedcomparand, each in its own way, anddriver-mongodbpasses it through. Every production path I traced refuses it at a shared door, except thedriver-memorycube face, which runs no door.FilterCondition→FilterConditionlowering, and run it at the seams that already run the doors.$between, the whole-day bound and the NULL-polarity guards. Per-face deletions follow.Verification
node scripts/pm/dispatch-gates.mjs --commandsonc814d60164derived 12 families, and--ranreconciled them: 12 run, 0 NOT MEASURED, every exit code recorded. All 12 exit 0.check:doc-formula-expressionsfirst answered PREREQUISITE NOT MET (exit 3), because@objectstack/lintwas not built. After the build it exits 0.docs/design/ships in no package, so this PR carries none and takes theskip-changesetlabel.Acceptance notes
The census found these candidate defects. The dev report handed them to the seat, and nothing is filed from this PR itself. The seat filed items 1 and 2 as bare findings; items 3–5 stay notes.
compileScopedFilterToSqlapplies no whole-day upper bound and binds temporal comparands exactly as written (section 2.5, item 1). Filed as [finding] service-analytics read scope: compileScopedFilterToSql applies no whole-day upper bound and binds a temporal comparand as written, so an RLS $lte on a bare day drops the rest of that day in NativeSQL analytics #20733.MemoryAnalyticsServiceruns neither shared comparand door, so{d: undefined}reads as{d: null}(section 2.5, item 2). Filed as [finding] driver-memory analytics: MemoryAnalyticsService runs neither shared comparand door, so a cube where {d: undefined} answers the null rows instead of a 400 #20734.$containsfolds case (section 2.5, item 3).memory-matcher.tsmatch()has no production caller (section 2.5, item 4)..claude/skills/pm-dispatch/references/compile-surfaces.mdhas drifted from the code it lists (section 5, option C).Generated by Claude Code