feat(spec): the relative-token axis completes the temporal conformance matrix (ADR-0053 D-A3.2) - #4125
Closed
os-zhuang wants to merge 1 commit into
Closed
feat(spec): the relative-token axis completes the temporal conformance matrix (ADR-0053 D-A3.2)#4125os-zhuang wants to merge 1 commit into
os-zhuang wants to merge 1 commit into
Conversation
…e matrix (ADR-0053 D-A3.2)
The last axis D-A3 asked for. `TEMPORAL_CASES` takes already-resolved
comparands — the layer the four incidents happened at. These carry the
filter AS AUTHORED, placeholders intact (`{ at: { $lte: '{today}' } }`)
plus a pinned reference instant, and each consumer resolves them through
`resolveFilterTokens` exactly as the ObjectQL engine does before calling
a driver.
That asserts a property neither half could alone: `{today}` resolving to
the right calendar day is covered in core, a bare day as an upper bound
meaning the whole day is covered by the resolved cases, and the
COMPOSITION was never asserted anywhere — while being precisely the
filter the default dashboard emits, the one #3777 was reported against.
`{current_month_end}` is in the table for the same reason: the issue
named it as the case where an author's "last day of the month" intent
had no layer translating it.
Run by the four backends downstream of resolution — driver-sql (and,
via the live-dialect CI job, real Postgres and MySQL), driver-memory,
driver-mongodb against a real MongoDB, and the analytics preview.
formula's matchesFilterCondition is excluded on ARCHITECTURE, not for
lack of coverage, and the suite says so rather than leaving a silent
hole: an RLS `check` is a CEL expression compiled by compileCelToFilter,
where a relative date is the function today() evaluated at compile time.
A {token} string cannot reach it — resolveFilterTokens runs on the read
path (engine.ts) and the write-side check does not go through it.
Verified in plugin-security rather than assumed.
driver-sql 18 / driver-memory 212 / driver-mongodb 125 /
service-analytics 347 / formula 286 / spec 6987, all green. API-surface
snapshot regenerated for the two new exports.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EkL3RGJrzjLEGURsLxfS2f
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckThis PR changes 1 package(s): 106 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
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.
Superseded by #4109 — closing without merging.
#4109 landed the same relative-token axis while this was in review, and its version is strictly richer: 7 consumers vs 5 here (it adds
driver-sqlite-wasmand the NativeSQL strategy), 16 cases, both thetokenFilteranddateRangespellings, awriterFormaxis for genuinely mixed writer populations, a pre-epoch row, and a legacy-storage sweep. Everything this PR asserts, #4109 asserts too.Parallel work — nothing wrong with #4109; this branch simply lost the race and re-implementing on top of it would add nothing.
One piece is being carried forward separately. #4109's
formulasuite consumesTEMPORAL_CASESbut says nothing about why it does not run the token axis, which reads as an omission rather than the architectural fact it is: an RLScheckis a CEL expression compiled bycompileCelToFilter, where a relative date is the functiontoday()evaluated at compile time, andresolveFilterTokensruns only on the ObjectQL read path (verified:plugin-securitynever calls it). Without that noted in the suite, the next person to look will either "fix" a non-gap or quietly assume coverage that cannot exist. A follow-up PR adds just that comment.