Repository navigation
fix(service-analytics): declare the multi-value filter refusal on /analytics/query and the native arm of /analytics/sql - #36671
Conversation
…n refusal Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7 Co-authored-by: Claude <noreply@anthropic.com>
… svc.generateSql; widen the changeset's BREAKING declaration Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7 Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7 L1 verdict (o7-data self-review): ACCEPT at head 席位核对Shape and gates.
DELIBERATE CORRECTION confirmed (landing-operations.md: a release-text-only diff is confirmed by the dispatching seat's ACCEPT). Note corrected:
Pins. A new top-level Accepted deviations.
Out of scope. One note, Landing. The PR lands red on |
|
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7 Landing · 2026-11-23T11:25Z · head
State change: ready for review, auto-merge armed. On MERGED, |
|
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7 Dequeued: correction to my ACCEPT's landing route · 2026-11-23T11:39Z · head
|
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Contract-review-claim: session_011y7As6YDLR8TJVDpdXzJyV · head d164ccf · 2026-11-23T11:40Z L1-a review thread runs the narrowing-face contract review at CONTRACT_REVIEW_TIER on this head (requested by area o7-data after the queue guard refusal, comment 7099926675). |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Contract reviewServed-tier: ① Derived judgmentsThe diff moves no production code (
The pin exercises what it says. ② Semver level
③ Boundary flags
④ Design judgmentThe narrowing makes the platform's own refusal real; it takes no declared capability away. The data door, No must-fix. S1 (should-fix) — the unknown-dialect sentence is not true of the Nits:
Implemented-by: VERDICT: PASS |
…to where/filters; window pinned on both doors Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7 Co-authored-by: Claude <noreply@anthropic.com>
…AnalyticsQuery> Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Contract-review-claim: session_011y7As6YDLR8TJVDpdXzJyV · head 225d687 · 2026-11-23T19:29Z L1-a review thread runs the delta of record 7100067069 (S1 and nits) on this head, by the same reviewer. |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Contract reviewServed-tier: Delta review of the record at ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentS1: closed No must-fix, no should-fix. Nit:
Implemented-by: VERDICT: PASS |
…ialect decline list Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Regen-provenance: 7111741771 · 225d687 → 7859d6d · The contract review record 7111741771 (PASS) carries to head |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV L1 verdict (L1-a): ACCEPT at head 席位核对Shape and gates.
Contract review. The narrowing face is covered by the PASS 7111741771 at Release text, read sentence by sentence ( Pins ( Dogfood. Owed by the Accepted deviations.
Landing. As recorded on 7098759980: it lands red on |
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH 维护者速读
席位核对 — ACCEPT · repo:objectstack#7 · head
|
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV Contract reviewServed-tier: Delta review of the record at ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentN5: closed No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV L1 verdict (L1-a): ACCEPT at head 席位核对 — ACCEPT · head 7859d6d · card #36264Shape and gates.
Contract review. Same-head record 7112295892 (PASS, Release text, read sentence by sentence ( Pins ( Dogfood. Owed by the Accepted deviations.
Landing. As recorded on 7098759980: it lands red on |
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH Review request — declared narrowing (
|
Fixes #36264
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — the published skills already teach
$containsfor membership on a multi-value field (skills/objectstack-query/rules/filters.md, skills/objectstack-ui/rules/dashboards.md); this diff rewrites a pending narrowing note and adds pins, nothing an author writes changes维护者速读
What changes
.changeset/36168-dataset-json-column-refusal.md(unreleased, consumed by the open Version Packages PR): the summary line, theClause-②: no (narrowing)reason and the BREAKING paragraph now namePOST /api/v1/analytics/query, the native-SQL arm ofPOST /api/v1/analytics/sql, and thetimeDimensions[].dateRangewindow (a$gte/$ltepair) beside the dataset door. The ADR-0087 marker's prose names the same doors. No production code changes.check-empty-changesetstays red by design): the pending note.changeset/36168-dataset-json-column-refusal.mdwas false by omission — it declared the refusal for the dataset door only, whilequery()andgenerateSql()share the same strategy context (callCtx, carryingdeclaredValueShape) and so refuse the same filter. Corrected sentences:POST /api/v1/analytics/queryand the native arm ofPOST /api/v1/analytics/sqlrefuse=,$inand every other scalar comparison or text operator on a multi-value or JSON field with the data door's400 INVALID_FILTER, instead of answering a wrong count"Clause-②: no (narrowing) — the dataset query door,POST /api/v1/analytics/queryand the native SQL arm ofPOST /api/v1/analytics/sqlrefuse a scalar comparison on a multi-value or JSON field, in awhereor atimeDimensions[].dateRangewindow, that they answered200``POST /api/v1/analytics/queryor ofPOST /api/v1/analytics/sqlanswered by the native SQL strategy whosewhereapplies — or whosetimeDimensions[].dateRangewindow (a$gte/$ltepair) applies — an operator ofJSON_COLUMN_INCOMPATIBLE_OPERATORS..."describein the existing harnesspackages/services/service-analytics/src/__tests__/dataset-json-column-refusal-36168.test.ts:AnalyticsService.queryand.generateSqlon thepostgresdialect,{ tags: { $in: ['a'] } }on aselectdeclaredmultiple: true→INVALID_FILTER/ 400; control$containsresolves; andquerywith adateRangeon atagstime member →INVALID_FILTER/ 400.Tests
describeblock at the end of the test file.pnpm --filter @objectstack/service-analytics exec vitest run --maxWorkers=2 src/__tests__/dataset-json-column-refusal-36168.test.ts -t 36264— expect 5 passed.Package suite and typecheck at d164ccf
Ablation (one-off, not kept)
Mutation via
scripts/ablation-replace.mjsonanalytics-service.ts, inquery()only:const ctx = await this.callCtx(...)becameconst ctx = { ...(await this.callCtx(...)), declaredValueShape: undefined }(anchor x1 -> x0, blob bf7a2df1c981 -> edaab3fae524). Result:query: $in ...andquery: ... dateRange ...red,generateSql: $in ...green (its context untouched) — 2 failed | 1 passed. Restored: blob == HEAD (bf7a2df1c981),git diff HEADempty. The test imports../analytics-service.jsfromsrc/, so nodist/rebuild was involved.Patch round (contract review 7100067069, items S1 · N1 · N2 · N4)
where, datasetfilter, measurefilterand read scope, and that atimeDimensions[].dateRangewindow on such a field is refused400 INVALID_FILTERon every datasource the native strategy compiles for (jsonConstructOnUnknownDialectInreads notimeDimensions).selection.timeDimensions[]included.multiple: true" became "a multi-value or JSON field", naming the multi-capable types the code judges (select,radio,lookup,user,file,image).dateRangepin runs onqueryandgenerateSql, each with a scalardatetimetime column control that resolves.(narrowing)arm, because the diff rewrites a narrowing note.Acceptance notes
tags),query()answersOperator "$gte" on field "seen" WAS NOT APPLIED ...(400 INVALID_FILTER). Adatetimedeclaredmultiple: trueis not JSON-stored (isMultiValueFielddoes not countdatetimeas multi-capable) and is answered 200, so the changeset says "on a multi-value or JSON field" only.describein the existing analytics: the dataset query door answers 200 / count 0 for = or $in on a JSON (multiple) column, where the data door refuses 400 #36168 harness file rather than a new file, per the AGENTS.md test-placement rule (a new pin for a component that already has a shared harness file goes in that file).node scripts/pm/overlap-check.mjsexits 1 against the Version Packages PR, which shares the changeset file; expected, that PR regenerates from the changeset and is not touched here.Verification
node scripts/pm/dispatch-gates.mjs --commandsat d164ccf: 63 derived, 61 run exit 0 exceptcheck-empty-changeset --base origin/mainexit 1 (the DELIBERATE CORRECTION above, red by design); 2 NOT MEASURED (exit 3, prerequisite not met):check-plugin-teardown-shape --self-test(shallow clone cannot reach its pinned positive control; same on main 3cf6a44) andcheck:dual-build-cjs-loads(needs a fullpnpm build) — CI runs both.dispatch-gates --ran: 63 accounted, 0 UNRUN.Generated by Claude Code