Skip to content

fix(service-analytics): declare the multi-value filter refusal on /analytics/query and the native arm of /analytics/sql - #36671

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-36264-analytics-refusal-changeset
Nov 23, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/issue-36264-analytics-refusal-changeset

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #36264
Clause-②: no (narrowing)
Metadata-protocol: none
Skills-docs: none — the published skills already teach $contains for 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

维护者速读

  • 用户无感:只改即将发布的升级说明,让调用通用分析查询和 SQL 预览接口的集成方在升级前看到这项拒收。
  • 属于分析报表的数据正确性收口,替调用分析接口的集成方补上漏写的破坏性变更说明。
  • 出错只会让发布说明的措辞不准,不改任何运行行为;可直接撤回。
  • 无

What changes

  • .changeset/36168-dataset-json-column-refusal.md (unreleased, consumed by the open Version Packages PR): the summary line, the Clause-②: no (narrowing) reason and the BREAKING paragraph now name POST /api/v1/analytics/query, the native-SQL arm of POST /api/v1/analytics/sql, and the timeDimensions[].dateRange window (a $gte / $lte pair) beside the dataset door. The ADR-0087 marker's prose names the same doors. No production code changes.
  • DELIBERATE CORRECTION (check-empty-changeset stays red by design): the pending note .changeset/36168-dataset-json-column-refusal.md was false by omission — it declared the refusal for the dataset door only, while query() and generateSql() share the same strategy context (callCtx, carrying declaredValueShape) and so refuse the same filter. Corrected sentences:
    • summary: "the dataset query door, POST /api/v1/analytics/query and the native arm of POST /api/v1/analytics/sql refuse =, $in and every other scalar comparison or text operator on a multi-value or JSON field with the data door's 400 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``
    • BREAKING: "... and for a client of POST /api/v1/analytics/query or of POST /api/v1/analytics/sql answered by the native SQL strategy whose where applies — or whose timeDimensions[].dateRange window (a $gte / $lte pair) applies — an operator of JSON_COLUMN_INCOMPATIBLE_OPERATORS ..."
  • One new top-level describe in the existing harness packages/services/service-analytics/src/__tests__/dataset-json-column-refusal-36168.test.ts: AnalyticsService.query and .generateSql on the postgres dialect, { tags: { $in: ['a'] } } on a select declared multiple: true → INVALID_FILTER / 400; control $contains resolves; and query with a dateRange on a tags time member → INVALID_FILTER / 400.

Tests

  • Read first: (1) the BREAKING paragraph of the changeset, it is the text that ships; (2) the new describe block at the end of the test file.
  • Two-minute check: 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
> tsc --noEmit            (exit 0)
 Test Files  224 passed (224)
      Tests  5733 passed | 345 skipped (6078)
os-verify-lock: VERDICT command-exit 0
Ablation (one-off, not kept)

Mutation via scripts/ablation-replace.mjs on analytics-service.ts, in query() only: const ctx = await this.callCtx(...) became const ctx = { ...(await this.callCtx(...)), declaredValueShape: undefined } (anchor x1 -> x0, blob bf7a2df1c981 -> edaab3fae524). Result: query: $in ... and query: ... dateRange ... red, generateSql: $in ... green (its context untouched) — 2 failed | 1 passed. Restored: blob == HEAD (bf7a2df1c981), git diff HEAD empty. The test imports ../analytics-service.js from src/, so no dist/ rebuild was involved.

Patch round (contract review 7100067069, items S1 · N1 · N2 · N4)

  • S1: the unknown-dialect sentence now says the decline covers the where, dataset filter, measure filter and read scope, and that a timeDimensions[].dateRange window on such a field is refused 400 INVALID_FILTER on every datasource the native strategy compiles for (jsonConstructOnUnknownDialectIn reads no timeDimensions).
  • N1: the BREAKING paragraph attaches the window clause to all three doors, the dataset door's selection.timeDimensions[] included.
  • N4: "a field declared multiple: true" became "a multi-value or JSON field", naming the multi-capable types the code judges (select, radio, lookup, user, file, image).
  • N2: the dateRange pin runs on query and generateSql, each with a scalar datetime time column control that resolves.
  • The declaration line now carries the (narrowing) arm, because the diff rewrites a narrowing note.

Acceptance notes

  • The dateRange position was measured, not assumed: on a member whose declared shape is JSON-stored (tags), query() answers Operator "$gte" on field "seen" WAS NOT APPLIED ... (400 INVALID_FILTER). A datetime declared multiple: true is not JSON-stored (isMultiValueField does not count datetime as multi-capable) and is answered 200, so the changeset says "on a multi-value or JSON field" only.
  • Placement: the pin lives as a new top-level describe in 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.mjs exits 1 against the Version Packages PR, which shares the changeset file; expected, that PR regenerates from the changeset and is not touched here.

Verification

  • Local gate subset from node scripts/pm/dispatch-gates.mjs --commands at d164ccf: 63 derived, 61 run exit 0 except check-empty-changeset --base origin/main exit 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) and check:dual-build-cjs-loads (needs a full pnpm build) — CI runs both. dispatch-gates --ran: 63 accounted, 0 UNRUN.

Generated by Claude Code

… svc.generateSql; widen the changeset's BREAKING declaration

Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing 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): node scripts/docs-audit/affected-docs.mjs --json 0d727b70716ccf77fd63d0a0a2f0b17f7ab4d28a → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7

L1 verdict (o7-data self-review): ACCEPT at head d164ccf63df79e7d77b9cfb3bf947b696dfaa568 (Fixes #36264) · 2026-11-23T10:56Z. Full read of origin/main...d164ccf63d: 2 files, +46/−4. Self-review by the area under area-lease.md: ≤50 lines, text and test only, Clause-②: no, no contract face (changeset prose is outside the four faces).

席位核对

Shape and gates.

  • l1-face --pr 36671 at d164ccf: first line Fixes #36264; no closing keyword binds another card; declarations Clause-②: no · Metadata-protocol: none; changeset present for @objectstack/service-analytics; dogfood not owed (no ! in the title, no (narrowing) arm in the PR body).
  • check-governed-merges --pr 36671: NOT governed, 50 lines.
  • Check-runs at this reading: 11 success, 16 expected skip, 22 pending, 1 failure = Check Changeset. That red is the DELIBERATE CORRECTION class (below), not a defect.

DELIBERATE CORRECTION confirmed (landing-operations.md: a release-text-only diff is confirmed by the dispatching seat's ACCEPT). Note corrected: .changeset/36168-dataset-json-column-refusal.md (unreleased; the open Version Packages PR #35129 regenerates from it). Sentences, before → after:

  • Summary. Before: "the dataset query door refuses =, $in and every other scalar comparison …". After: "the dataset query door, POST /api/v1/analytics/query and the native arm of POST /api/v1/analytics/sql refuse =, $in and every other scalar comparison …".
  • Clause-② line. Before: "Clause-②: no (narrowing)". After: the same declaration, followed by the reason naming the dataset door, POST /api/v1/analytics/query, the native SQL arm of POST /api/v1/analytics/sql, and "a where or a timeDimensions[].dateRange window".
  • ADR-0087 marker. Before: "now refused on the analytics dataset door too". After: "now refused on the analytics dataset door, POST /api/v1/analytics/query and the native arm of POST /api/v1/analytics/sql too". The not-required verdict is unchanged.
  • BREAKING paragraph. Before: named only POST /api/v1/analytics/dataset/query. After: adds the clients of POST /api/v1/analytics/query and of the native-strategy POST /api/v1/analytics/sql whose where, or whose timeDimensions[].dateRange window (a $gte / $lte pair), applies an operator of the set. FROM / TO, Not moved, and the caller's fix are unchanged.
  • Each added sentence is backed by a pin at this head (below). The narrowing itself was reviewed on fix(service-analytics)!: the dataset query door refuses = / $in and every other scalar comparison on a multi-value or JSON field with 400 INVALID_FILTER #36184; this PR moves no behaviour.

Pins. A new top-level describe('[#36264] …') in the existing harness dataset-json-column-refusal-36168.test.ts: svc.query and svc.generateSql on postgres with { tags: { $in: ['a'] } } on a select declared multiple: true assert code INVALID_FILTER and status 400, with a $contains control that resolves; svc.query with a dateRange on a tags time member asserts the same code and status. The ablation (drop declaredValueShape from query()'s context) turns the two query pins red and leaves generateSql green, restored byte-identical (PR body).

Accepted deviations.

Out of scope. One note, carrier: none: a cube whose time dimension is the same JSON-stored member as the where made resolveStrategy answer "No strategy can handle query". It was not reproduced through a public door, so it is outside the three filing classes.

Landing. The PR lands red on Check Changeset only under SKILL.md's three conditions, all met: scripts/check-empty-changeset.mjs and pr-automation.yml say a DELIBERATE CORRECTION stays red on the pushed branch; pr-automation.yml triggers on pull_request only (no merge_group); and this comment records the gate and the reason. Every other check must be green or an expected skip before --land.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7

Landing · 2026-11-23T11:25Z · head d164ccf63df79e7d77b9cfb3bf947b696dfaa568 · verdict: ACCEPT 7098759980 (o7-data self-review).

Probe Reading
check-governed-merges --pr 36671 NOT governed · 50 changed lines (+46 / −4) ≤ 3000
pr-state --pr 36671 36 success · 16 expected skip · 0 unexpected skip · 0 pending · 1 failed = Check Changeset (DELIBERATE CORRECTION, red by design, not required, not on merge_group; see 7098759980) · mergeable_state unstable
landing-k --pr 36671 K = 1 < 15

State change: ready for review, auto-merge armed. On MERGED, Fixes #36264 closes the card and pm:dispatched comes off in the same stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 23, 2026 11:26
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 23, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7

Dequeued: correction to my ACCEPT's landing route · 2026-11-23T11:39Z · head d164ccf63d

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d164ccf63df79e7d77b9cfb3bf947b696dfaa568
Local-runs: none
Scope: packages/services/service-analytics/src/tests/dataset-json-column-refusal-36168.test.ts + none in the diff. Read, not reviewed: .changeset/36168-dataset-json-column-refusal.md (the declaration judged), and the code it cites at this head: packages/services/service-analytics/src/analytics-service.ts, strategies/native-sql-strategy.ts, json-column-comparison-refusal.ts, contains-membership-sql.ts, dataset-executor.ts, plugin.ts, packages/runtime/src/domains/analytics.ts, packages/core/src/utils/json-column-operator-refusal.ts, packages/spec/src/data/field-value.zod.ts.

① Derived judgments

The diff moves no production code (git diff origin/main pr-36671 -- packages/services/service-analytics/src is the test file alone), so it implies no accept-set or public-surface change of its own. What it changes is the declaration of the accept-set change #36184 shipped. Each claim, read in the tree:

  • POST /api/v1/analytics/query refuses on a named dialect: RIGHT. domains/analytics.ts:202-218 calls analyticsService.query; query() runs queryIn, whose context comes from callCtx (analytics-service.ts:2756) and carries declaredValueShape (:1794); NativeSQLStrategy.execute compiles through its own generateSql first (native-sql-strategy.ts:1384), and every leaf passes refuseWhereJsonColumnComparison (:2510), which throws INVALID_FILTER / 400 before anything binds.
  • The native arm of POST /api/v1/analytics/sql refuses: RIGHT. domains/analytics.ts:228-248 calls generateSql, which builds the same callCtx (analytics-service.ts:4091) and hands the query to the resolved strategy. The ObjectQL arm is not claimed and is not moved.
  • The timeDimensions[].dateRange window is refused on a named dialect: RIGHT. The window is lowered to a $gte / $lte pair ($lt for a preset) and compiled by the same compileFilterNode (native-sql-strategy.ts:1632-1688); all three spellings are in JSON_COLUMN_INCOMPATIBLE_OPERATORS.
  • The population ("multi-value or JSON field"): RIGHT as worded in the summary and the Clause-② reason. isJsonStoredShape is STRUCTURED_JSON_TYPES or the spec's isMultiValueField, and the PR body's note that a datetime declared multiple: true is not refused agrees with MULTI_CAPABLE_TYPES.
  • "Not moved" ($contains, the null predicates, scalar fields): RIGHT, and the new pins hold the $contains control on both doors.
  • "On a datasource whose SQL dialect the host cannot name (memory, MongoDB), the native strategy now declines such a query, so the engine answers it through its own driver": RIGHT for a where, a dataset filter and a measure filter; WRONG for the dateRange window this PR adds to the declaration. See S1.

The pin exercises what it says. objectqlAggregate: false leaves the native strategy as the only answerer, so the refusal cannot come from the engine; the sqlDialect hook answers postgres, a named dialect; both doors assert code and status, and each has a $contains control that resolves. Test Core is green on this head.

② Semver level

  • @objectstack/service-analytics: patch is unchanged and correct: the change is a non-protocol narrowing (Metadata-protocol: none), which AGENTS.md ships as patch with its BREAKING banner and its ADR-0087 disposition. The changeset keeps exactly one marker, not-required (no-migration-prescription), and its reason still holds: no key, export or stored value moves, only the answer to a request. The marker's prose now names the three doors, as the BREAKING paragraph does.
  • Clause-②: no (narrowing) in the changeset is the correct arm for what ships, and the reason after it names the three doors and both positions. The PR body carries Clause-②: no with no arm. That is true of this diff, which moves no behaviour, and the queue guard reads the arm from the changeset in any case. See N3.
  • Check Changeset is failure on this head. That is the DELIBERATE CORRECTION class scripts/check-empty-changeset.mjs names (a pending note rewritten, red by design); the PR body declares it and quotes the corrected sentences. Every other check-run is success or an expected skipped, including Lint & Repo Gates and both Governed Surface Queue Guard runs.

③ Boundary flags

  • Deviation, pin placed in 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 and not in a new file: accepted. The AGENTS.md shared-harness rule governs, and the file is the one the pinned refusal already lives in.
  • open_questions: none raised.
  • Out-of-scope note (a cube whose time dimension is the JSON-stored member also filtered in where answers "No strategy can handle query"): answered, not a finding here. A where on a member the cube types time with a non-temporal comparand is declined by the native strategy ahead of the compile (carriesUninterpretableTemporalComparand), and the dev's probe had no ObjectQL bridge to take it. It does not change what the changeset declares for the named doors.
  • Line budget: the PR object reads +46 / -4.
  • SQL push-down: no finding. The diff adds no query, no id materialisation and no in-app join.

④ Design judgment

The narrowing makes the platform's own refusal real; it takes no declared capability away. The data door, driver-sql, the engine's per-aggregation filter and driver-memory already refuse a scalar comparison on a JSON-stored field with one sentence (@objectstack/core, json-column-operator-refusal.ts), the spec's ruling on main records the equality family as refused on a JSON column (filter.zod.ts, the $contains section), and the ObjectQL strategy of these same doors already answered the refusal. The native strategy was the one face still answering a wrong count. Membership stays served through $contains. Declaring the two further doors is the correct direction: callCtx is the one context both share, so the break was real on main and undeclared.

No must-fix.

S1 (should-fix) — the unknown-dialect sentence is not true of the dateRange position the PR adds. The decline that keeps a non-SQL datasource on its engine's answer is jsonConstructOnUnknownDialectIn (native-sql-strategy.ts:1118-1193). It reads the caller's where, the dataset's filter, the measures' filters and the read scopes. It does not read timeDimensions. The compile-time refusal has no dialect condition (json-column-comparison-refusal.ts), and the plugin advertises nativeSql whenever a raw-SQL bridge exists (plugin.ts:656), which is why the #20987 decline exists at all. So on MongoDB a dateRange window on a JSON-stored member is not declined: the native compile refuses it 400 INVALID_FILTER, where before #36184 the statement compiled, the bridge answered RAW_SQL_UNSUPPORTED and the engine answered through its driver. The changeset now tells that reader the query is declined and the engine answers. This is read from the code, not measured, and the reach is small (a date window on a tags, multi-value or JSON member of a non-SQL datasource). Either fix closes it: say in the changeset that the decline covers the where and the filters and that the window is refused on every datasource the native strategy compiles for; or make the decline read the window, which is production code and belongs on a follow-up card.

Nits:

  • N1 — the BREAKING paragraph lists runtimeFilter, dataset filter and measure filter for the dataset door and attaches the dateRange clause to the clients of the other two doors. The dataset door forwards a window-only selection.timeDimensions[] entry to the same compile (dataset-executor.ts:1742-1781), and the Clause-② reason does name the window for all three doors. One clause in the paragraph would make the two agree.
  • N2 — the dateRange pin drives query only and has no control. The changeset declares the window on /analytics/sql too; execute compiles through generateSql, so the path is one, and the dev's ablation discriminates the pin. A generateSql row and a plain-column control would hold it without relying on that.
  • N3 — the PR body's Clause-②: no carries no arm while the changeset it rewrites carries (narrowing). The seat's first landing attempt read the PR as ungoverned for that reason. No change to the tree is needed.
  • N4 — "a field declared multiple: true" in the BREAKING paragraph (text from fix(service-analytics)!: the dataset query door refuses = / $in and every other scalar comparison on a multi-value or JSON field with 400 INVALID_FILTER #36184) is wider than the code: only the multi-capable types are judged. The summary's "multi-value or JSON field" is the accurate wording.

Implemented-by: claude/issue-36264-analytics-refusal-changeset
Reviewed-by: session_011y7As6YDLR8TJVDpdXzJyV

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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 225d687392a981b98a8944f72eaa9f175c3c197a
Local-runs: none
Scope: packages/services/service-analytics/src/tests/dataset-json-column-refusal-36168.test.ts + none in the diff. Read, not reviewed: .changeset/36168-dataset-json-column-refusal.md (the declaration judged), and the code it cites at this head: packages/services/service-analytics/src/analytics-service.ts, strategies/native-sql-strategy.ts, json-column-comparison-refusal.ts, contains-membership-sql.ts, dataset-executor.ts, plugin.ts, packages/runtime/src/domains/analytics.ts, packages/core/src/utils/json-column-operator-refusal.ts, packages/spec/src/data/field-value.zod.ts.

Delta review of the record at d164ccf63d (comment 7100067069). The delta touches the changeset and the #36168 harness file and no production code; every judgment of that record not named below stands.

① Derived judgments

  • The unknown-dialect sentence: RIGHT for the position S1 named. It now says the decline covers the where and the filters, and that a timeDimensions[].dateRange window on such a field is not part of the decline and is refused 400 INVALID_FILTER on every datasource the native strategy compiles for. That is what the tree does: jsonConstructOnUnknownDialectIn (native-sql-strategy.ts:1118-1193) never reads timeDimensions, and refuseWhereJsonColumnComparison has no dialect condition. One word of the rewritten sentence is wider than the code; see N5.
  • The window on all three doors, the dataset door's selection.timeDimensions[] included, when the native strategy answers: RIGHT. A window-only entry is forwarded without a granularity (dataset-executor.ts:1742-1781) and reaches the same compileFilterNode.
  • The field population: RIGHT. The listed types (select, radio, lookup, user, file, image declared multiple: true; tags, multiselect, checkboxes; a structured-JSON type) are MULTI_CAPABLE_TYPES, MULTI_OPTION_TYPES and STRUCTURED_JSON_TYPES of field-value.zod.ts, the three sets isJsonStoredShape asks.
  • The new pin rows exercise what they claim. The window is driven through query and generateSql; each asserts code and status on the tags member and then resolves the same window on a datetime column of the same cube, so the refusal is tied to the declared shape and not to the window. objectqlAggregate: false still leaves the native strategy as the only answerer.

② Semver level

  • Unchanged: patch, Clause-②: no (narrowing), Metadata-protocol: none, one ADR-0087 marker not-required (no-migration-prescription). The summary line, the Clause-② reason and the marker are byte-identical to d164ccf63d. The PR body now carries Clause-②: no (narrowing), agreeing with the changeset.
  • Check-runs on this head: all completed, none pending. Check Changeset is failure in both of its runs. Read in the job itself: the one failed step is "Require a changeset (or the skip-changeset label)", with the message for a PR whose only .changeset rows are changed, not added (the DELIBERATE CORRECTION class, left red by design); the step "Require an ADR-0087 disposition on a declared-breaking changeset" is success. Every other run is success or skipped, including Test Core and its ten shards, TypeScript Type Check, Lint & Repo Gates, Dogfood Regression Gate, Governed Surface Queue Guard and PR-body guards.

③ Boundary flags

  • Deviation, e48453e08b pushed red on a type error and fixed at this head: accepted; TypeScript Type Check is success here.
  • Deviation, pins kept in the existing harness file: accepted, as before.
  • open_questions: none raised.
  • Out-of-scope finding (the decline does not read the window, so a non-SQL datasource meets the native refusal): correctly carried as a production-code follow-up for the seat to file; the changeset now declares the behaviour as it ships.
  • SQL push-down: no finding. The delta adds no query, no id materialisation and no in-app join.

④ Design judgment

S1: closed
N1: closed
N2: closed
N3: closed
N4: closed

No must-fix, no should-fix.

Nit:

  • N5 — the rewritten sentence says the native strategy declines a query whose where, dataset filter, measure filter "or read scope carries such a comparison". The decline reads a read scope for the membership operators and $empty only: it is walked with comparisons off (native-sql-strategy.ts:1193, the false argument, and the needsJson guard above it), and the comparison refusal never judges a read scope either, which read-scope-sql.ts compiles. Nothing moved for a read scope in fix(service-analytics)!: the dataset query door refuses = / $in and every other scalar comparison on a multi-value or JSON field with 400 INVALID_FILTER #36184, so no break is hidden from any reader; the three words "or read scope" claim a routing the code does not do. Dropping them makes the sentence exact. Prose only, or an accepted deviation.

Implemented-by: claude/issue-36264-analytics-refusal-changeset
Reviewed-by: session_011y7As6YDLR8TJVDpdXzJyV

VERDICT: PASS

…ialect decline list

Claude-Session: https://claude.ai/code/session_011y7As6FyXmJyGyHNKXUkV7
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV

Regen-provenance: 7111741771 · 225d687 → 7859d6d · git diff --name-only 225d687392 7859d6d494 → .changeset/36168-dataset-json-column-refusal.md (prose face only)

The contract review record 7111741771 (PASS) carries to head 7859d6d494. The only move is one changeset line (1+/1−): the unknown-dialect decline sentence now reads "whose where, dataset filter or measure filter carries such a comparison", without "or read scope". N5: closed. Nothing on the review surface moved.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV

L1 verdict (L1-a): ACCEPT at head 7859d6d494a414c3945b43d982f0f31ef53f3b74 (Fixes #36264) · 2026-11-23T19:48Z. This replaces the area self-review 7098759980 at d164ccf63d, which no longer qualifies (the PR is now +52/−5 = 57 lines, over the self-review bound, and the harness test moved). Full read of origin/main...7859d6d494: 2 files, +52/−5.

席位核对

Shape and gates.

  • l1-face --pr 36671 at 7859d6d: first line Fixes #36264; no closing keyword binds another card; changeset present for @objectstack/service-analytics; declarations Clause-②: no (narrowing) · Metadata-protocol: none in both the PR body and the changeset; Skills-docs: line present and true (the published skills already teach $contains for membership; nothing an author writes changes); floor checks Lint & Repo Gates and TypeScript Type Check success.
  • Check-runs at this reading: 28 success, 16 expected skip, 1 failure = Check Changeset (the DELIBERATE CORRECTION class, recorded on 7098759980 and unchanged), 6 pending = Test Core (1,2,3,7,8,9/10). Every other check must be green or an expected skip before --land.

Contract review. The narrowing face is covered by the PASS 7111741771 at 225d687392, carried to this head under the prose arm by the Regen-provenance: line 7112087269 (the only move is one changeset sentence). N5 is closed.

Release text, read sentence by sentence (.changeset/36168-dataset-json-column-refusal.md, unreleased). The headline carries !; the Clause-②: no (narrowing) reason, the ADR-0087 not-required (no-migration-prescription) marker and the BREAKING paragraph (FROM / TO / Not moved / fix) all name the dataset door, POST /api/v1/analytics/query, the native arm of POST /api/v1/analytics/sql and the timeDimensions[].dateRange window. The unknown-dialect sentence now says the decline covers the where, the dataset filter and the measure filter, which is what jsonConstructOnUnknownDialectIn reads. Level patch is right for a non-protocol narrowing under none.

Pins (dataset-json-column-refusal-36168.test.ts, the [#36264] block). On postgres, svc.query and svc.generateSql each assert code INVALID_FILTER and status 400 for $in on a select declared multiple: true, with a $contains control that resolves. Each also asserts the same code and status for a timeDimensions dateRange on a tags time member, with a control on a scalar datetime column that resolves. Every sentence the changeset adds has a pin.

Dogfood. Owed by the (narrowing) arm. dogfood_battery (report 7111644002) is full at 225d687392: VERDICT command-exit 0, 487 files passed, 3 skipped, 4121 tests passed, no failures. The head moved after it only on .changeset/, which no build or dogfood test reads, so the run stands for this head (accepted deviation from "pinned to the head").

Accepted deviations.

  • The PR title has no !. The PR itself moves no behaviour (no production code), and the ! sits in the changeset headline, which is what ships as release text.
  • The dogfood battery is at 225d687392, not at this head (above).

Landing. As recorded on 7098759980: it lands red on Check Changeset only, under SKILL.md's three conditions. It lands after Test Core converges green.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH

维护者速读

席位核对 — ACCEPT · repo:objectstack#7 · head 7859d6d494a414c3945b43d982f0f31ef53f3b74

Seat record, read against GitHub at this head; the L1 is L1-a's ACCEPT 7112148223 at the same head.

  • Shape: Fixes #36264, base main, 2 files (+52/−5): .changeset/36168-dataset-json-column-refusal.md (prose of a pending, unreleased changeset) and one new describe in 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 test. No production code.
  • Premise measured: query() and generateSql() share callCtx (carrying declaredValueShape) with the dataset door, so they refuse the same filter; the dev's ablation (PR body) turns the query pins red when the shape is dropped.
  • Gates at this head: 28 success, 16 expected skip, 6 Test Core shards pending, 1 failure = Check Changeset, the DELIBERATE CORRECTION class (only "Require a changeset" fails; the ADR-0087 step is green), confirmed by the same-head contract record. Landing waits for the pending shards.
  • Contract tier: ## Contract review PASS 7111741771 at 225d687392 (CONTRACT_REVIEW_TIER, S1 and N1-N4 closed), carried to this head by Regen-provenance: 7112087269 (one changeset sentence; N5 closed).
  • Accepted deviations: pins in the existing harness file (AGENTS.md test-placement rule); Check Changeset red by design.
  • Out of scope: the unknown-dialect decline not reading timeDimensions[].dateRange is filed as analytics: the unknown-dialect decline ignores timeDimensions[].dateRange, so a window on a JSON-stored member is refused 400 on a non-SQL datasource instead of declined #36773. Skills-docs: line present and true.
  • Landing: not governed by path (check-governed-merges --pr 36671: tier none), but it declares Clause-②: no (narrowing), so the queue guard's narrowed leg needs an authorized approval: handed to the approver, not armed by the seat.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 7859d6d494a414c3945b43d982f0f31ef53f3b74
Local-runs: none
Scope: packages/services/service-analytics/src/tests/dataset-json-column-refusal-36168.test.ts + none in the diff. Read, not reviewed: .changeset/36168-dataset-json-column-refusal.md (the declaration judged), and the code it cites at this head: packages/services/service-analytics/src/strategies/native-sql-strategy.ts, json-column-comparison-refusal.ts.

Delta review of the record at 225d687392 (comment 7111741771). The delta is one line of the changeset: git diff 225d687392 7859d6d494 touches no other file, and everything under packages/ is byte-identical to the head that record reviewed. Every judgment of that record not named below stands.

① Derived judgments

  • The unknown-dialect sentence: RIGHT. It now reads "declines a query whose where, dataset filter or measure filter carries such a comparison". Those are the three filters jsonConstructOnUnknownDialectIn walks with comparisons on (native-sql-strategy.ts:1118-1193); a read scope is walked for the membership operators and $empty only, and is no longer named. The clause on the dateRange window is unchanged and still true.
  • No accept-set or public-surface change: the delta is prose, and no pin moved.

② Semver level

  • Unchanged: patch, Clause-②: no (narrowing) on the changeset and on the PR body, Metadata-protocol: none, one ADR-0087 marker not-required (no-migration-prescription).
  • Check-runs on this head, as read: Check Changeset is failure. Read in the job: the one failed step is "Require a changeset (or the skip-changeset label)", with the message for a PR whose only .changeset rows are changed, not added (the DELIBERATE CORRECTION class, left red by design); the step "Require an ADR-0087 disposition on a declared-breaking changeset" is success.
  • NOT YET ANSWERED at this reading: Test Core (3/10) and Test Core (7/10) are in_progress, and the aggregate Test Core run has not reported. They are not cited as green. Eight shards are success. Every other run is success or skipped, including TypeScript Type Check, Lint & Repo Gates, Dogfood Regression Gate, Governed Surface Queue Guard and PR-body guards. The delta changes no file a test reads, and the test tree is the one Test Core answered success for at 225d687392; landing still waits for the two shards and the aggregate on this head.

③ Boundary flags

  • No new dev flag and no open_questions entry in this round.
  • SQL push-down: no finding. The delta adds no query, no id materialisation and no in-app join.

④ Design judgment

N5: closed

No must-fix, no should-fix.

Implemented-by: claude/issue-36264-analytics-refusal-changeset
Reviewed-by: session_011y7As6YDLR8TJVDpdXzJyV

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As6YDLR8TJVDpdXzJyV

L1 verdict (L1-a): ACCEPT at head 7859d6d494a414c3945b43d982f0f31ef53f3b74 (Fixes #36264) · 2026-11-23T19:56Z. Supersedes 7112148223 (same content; this heading carries the verdict inline for the handoff reader). This replaces the area self-review 7098759980 at d164ccf63d, which no longer qualifies (the PR is now +52/−5 = 57 lines, over the self-review bound, and the harness test moved). Full read of origin/main...7859d6d494: 2 files, +52/−5.

席位核对 — ACCEPT · head 7859d6d · card #36264

Shape and gates.

  • l1-face --pr 36671 at 7859d6d: first line Fixes #36264; no closing keyword binds another card; changeset present for @objectstack/service-analytics; declarations Clause-②: no (narrowing) · Metadata-protocol: none in both the PR body and the changeset; Skills-docs: line present and true (the published skills already teach $contains for membership; nothing an author writes changes); floor checks Lint & Repo Gates and TypeScript Type Check success.
  • Check-runs at this reading: 28 success, 16 expected skip, 1 failure = Check Changeset (the DELIBERATE CORRECTION class, recorded on 7098759980 and unchanged), 6 pending = Test Core (1,2,3,7,8,9/10). Every other check must be green or an expected skip before --land.

Contract review. Same-head record 7112295892 (PASS, CONTRACT_REVIEW_TIER, delta of 7111741771 at 225d687392): the only move is one changeset sentence, and N5 is closed.

Release text, read sentence by sentence (.changeset/36168-dataset-json-column-refusal.md, unreleased). The headline carries !; the Clause-②: no (narrowing) reason, the ADR-0087 not-required (no-migration-prescription) marker and the BREAKING paragraph (FROM / TO / Not moved / fix) all name the dataset door, POST /api/v1/analytics/query, the native arm of POST /api/v1/analytics/sql and the timeDimensions[].dateRange window. The unknown-dialect sentence now says the decline covers the where, the dataset filter and the measure filter, which is what jsonConstructOnUnknownDialectIn reads. Level patch is right for a non-protocol narrowing under none.

Pins (dataset-json-column-refusal-36168.test.ts, the [#36264] block). On postgres, svc.query and svc.generateSql each assert code INVALID_FILTER and status 400 for $in on a select declared multiple: true, with a $contains control that resolves. Each also asserts the same code and status for a timeDimensions dateRange on a tags time member, with a control on a scalar datetime column that resolves. Every sentence the changeset adds has a pin.

Dogfood. Owed by the (narrowing) arm. dogfood_battery (report 7111644002) is full at 225d687392: VERDICT command-exit 0, 487 files passed, 3 skipped, 4121 tests passed, no failures. The head moved after it only on .changeset/, which no build or dogfood test reads, so the run stands for this head (accepted deviation from "pinned to the head").

Accepted deviations.

  • The PR title has no !. The PR itself moves no behaviour (no production code), and the ! sits in the changeset headline, which is what ships as release text.
  • The dogfood battery is at 225d687392, not at this head (above).

Landing. As recorded on 7098759980: it lands red on Check Changeset only, under SKILL.md's three conditions. It lands after Test Core converges green.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH

Review request — declared narrowing (Clause-②: no (narrowing)), which the queue guard's narrowed leg lands by an authorized approval.

  • Seat record: ## 席位核对 — ACCEPT above, at Head-sha 7859d6d494a414c3945b43d982f0f31ef53f3b74; L1 ACCEPT 7112345749.
  • Contract review: PASS 7111741771, same-head delta PASS 7112295892.
  • What to approve: the corrected BREAKING note in .changeset/36168-dataset-json-column-refusal.md (it now names POST /api/v1/analytics/query, the native arm of POST /api/v1/analytics/sql and the timeDimensions[].dateRange window) plus 47 lines of pins. No production code.
  • After approval the seat arms it once the pending Test Core shards are green; Check Changeset stays red by design (DELIBERATE CORRECTION).

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/s tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants