Uh oh!
There was an error while loading. Please reload this page.
test(filter-parity): re-anchor the two filter-operator parity guards on pivots vocabulary growth cannot cancel (#3641) - #4100
Merged
Conversation
…so vocabulary growth cannot cancel the guards (#3641) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Qqyix2QcnpUC9XeYVDzx3
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
yinlianghui
marked this pull request as ready for review
August 10, 2026 09:42
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Fixes#3641
Test-only.
mapOperatorandFILTER_OPERATOR_ALIASESare byte for byte as they are onmain— verified withgit diff --quiet origin/mainon both production files.Premise re-measured before implementing
Re-measured against the workspace's resolved
@objectstack/spec@17.0.0-rc.5, since the vocabularies could have moved again since the card was filed. They had not:So the header claim "8 of the 19 canonical view operators are absent from the AST set" is measured at 0 of 19, and both guards were satisfiable by doing nothing.
VALID_AST_OPERATORSis derived upstream fromAST_OPERATOR_MAP, and it grew until it spelled every canonical view operator verbatim —beforeandafteramong them, which is the exact pair whose missing bridge entries caused the silent full-table read these files were written for (objectstack#3948).What changed
packages/plugin-list/src/__tests__/filter-operator-ast-parity.test.ts— the spine is nowEXPECTED_AST_TARGET, one row per canonical view operator naming the exact spellingmapOperatormust emit. Each row is justified by naming the switch arm that produces it, read offListView.tsxrather than captured from output (a capture would fossilise a bug if one existed). Two rows are pinned as identity (is_empty/is_not_empty) because they fall throughdefault: return op; that is only safe while the AST gate accepts those spellings, so it is asserted rather than assumed — and asserting a fixed pair of literals can only go red, never be cancelled by growth.A totality ratchet fails in both directions when the pinned rows and the spec vocabulary stop lining up: a spec addition lands red instead of as quiet slack (the growth direction this card is about), and so does a retirement (#3628 / #3601, the mirror image). The legacy-alias sweep is re-anchored on the same table with no second hand-written list — an alias the spec folds to a canonical operator must reach the wire as whatever that canonical operator does.
packages/data-objectstack/src/filter-operator-ast-parity.test.ts— the coverage sweep no longer mirrors production's?? optail. That tail is correct in production and stays there; reproducing it in the assertion is what cancelled it, because the value it falls back to is the raw view spelling and those are all AST-valid now. The sweep asserts the mapping row exists, resolving exactly asnormalizeFilterOperatordoes minus that tail.Header notes — the stale count is replaced by what the guarantee now rests on. No count of the overlap is stated anywhere in either file, deliberately: a hand-written number beside a vocabulary that moves is what rotted here in the first place.
The membership and
isFilterAST()sweeps are kept as a secondary check, per the card's scope note. They still name why a wrong target matters; they are just no longer what gives the files their teeth. Nothing was retired.Reverse verification
Both degradations were applied in-worktree and reverted; the direction was predicted before running.
1.
mapOperatordegraded to identity — 16 failed / 44 passed. The 14 non-identity pin rows went red,beforeandafteramong them:Both membership-based sweeps (
%s maps to an AST-valid operatorand theisFilterASTgate) stayed green under the identity function — the card's claim demonstrated empirically rather than by inspection.2. One
FILTER_OPERATOR_ALIASESrow deleted —starts_withchosen deliberately overbefore, which the dedicated date-comparison test already pins, so the proof is unconfounded. New assertion: red with exactly["starts_with"]. Then, with the same row still deleted, the old?? opassertion body was temporarily restored: 5 passed (5), fully green. That is the blindness proven directly rather than argued.Restored state re-verified: production files identical to
origin/main, both suites green.Upstream probe (out of scope, reported not acted on)
The card asks whether
before/afteractually compile to WHERE clauses, or whether this is another silent full-table. Verdict: they compile. Not a silent full-table, so no objectstack-side card is warranted.@objectstack/driver-sql@17.0.0-rc.5was pulled from npm and inspected. The driver no longer compiles the array form at all —parseFilterAST()lowers it at the engine and protocol doors (objectstack#5158), and a filter array reaching the driver anyway is refused with a 400 rather than skipped. Measuring the lowering directly on the workspace spec:and the driver's own compiler,
package/dist/index.mjs:4709:End to end:
beforebecomes$ltbecomes a real<predicate. This confirms by runtime measurement what the triage comment read statically, and it does not make the objectui bridge redundant — the adapter still emits the array form, and an unmapped operator is still a broken query.One consequence worth recording: the driver's 400 refusal means the historical "no WHERE clause, no error, every row returned" framing may no longer describe today's cost of a missing row. What the protocol door does with an array the AST gate rejects is not measurable from this repo, so both file headers now state that openly and leave it open rather than asserting either outcome — the point being that both are a broken query.
Verification
All vitest runs are from the repo root with repo-root paths (objectui#3378).
Changeset
check-changeset-presence.mjsarbitrated and it does not treat test-only as exempt by default — it flagged both files and demanded a declaration. Its sanctioned pass for "this releases nothing" is a changeset with an EMPTY frontmatter, which is what.changeset/filter-operator-parity-discrimination-3641.mdcarries; the gate then reportsEvery one of them has an EMPTY frontmatter — declared as releasing nothing, which is the explicit exemption and a complete answer to this gate.No
skip-changesetlabel was applied: perscripts/__tests__/ci-cd-pipeline-doc.test.ts:184(objectui#3724) that label and its workflow "never [were] real" in this repo.Generated by Claude Code