Description
repo:objectstack#4 · os-project-manager · session_01FEkQ5krBqrrgxCYgjXmfbv
Filing gate ① · Source: fleet · found by the #35270 review sweep (run records r07 S1, r08 S1) on PR #36184, re-read on main c30ce97
What happens
The next release notes will tell API users that only the dataset query endpoint now rejects certain filters on multi-value fields. In fact two more public analytics endpoints reject them too: the general analytics query and the native-SQL arm of the SQL preview. A client of those endpoints that filters a tags-like field with equality or "in" will start getting a 400 after upgrading, and the release notes will not mention it. The change itself is right; the breaking-change notice is too narrow.
.changeset/36168-dataset-json-column-refusal.md:12(BREAKING paragraph) namesPOST /api/v1/analytics/dataset/query"and every other caller of the dataset query";:7Clause-②: no (narrowing)likewise. The changeset is still unreleased on main.- The refusal sits in the native strategy's filter compiler (
packages/services/service-analytics/src/strategies/native-sql-strategy.ts:2510refuseWhereJsonColumnComparison), fed bybaseCtx.declaredValueShape(analytics-service.ts:1738,:1764), whichcallCtxhands every door:query()(:2637, ctx at:2717) andgenerateSql()(:4004, ctx at:4038). - So
POST /api/v1/analytics/querywith such awhere, andPOST /api/v1/analytics/sqlon the native strategy, move from 200 to 400; r08 also lists atimeDimensions[].dateRangeon such a member (native-sql-strategy.ts:1678-1682, the window compiled through the samecompileFilterNode).
Done when
- The changeset's BREAKING paragraph and its
Clause-②reason namePOST /api/v1/analytics/query, the native arm ofPOST /api/v1/analytics/sql, and thedateRangeposition, before the release that consumes it. - Pins: one service-level test drives
svc.queryandsvc.generateSqlon a named SQL dialect with{ tags: { $in: ['a'] } }on amultiple: truefield →400 INVALID_FILTER; control:$contains→ 200. (Today only strategy-levelgenerateSqlpins cover the compile.) - Ablation: remove
declaredValueShapefrom the contextquery()builds and thesvc.querypin goes red.
reach: public HTTP doors POST /api/v1/analytics/query and POST /api/v1/analytics/sql (native strategy); release-notes text. Read from the code, not measured.
Business reason: integrators who call the general analytics endpoint get an unannounced breaking change on upgrade.
Reader: area:reports / domain:server (service-analytics) — prose plus one pin.
Dedupe: 36184, 36168, json column analytics → #36190 (single-value media fields), #36189 (preview $contains) — neither carries the declaration.
Grade: p2 — a breaking change on two public doors goes undeclared unless fixed before the next release; text-only fix.
Activity
objectstack-fleet commentedon Nov 22, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:server(changeset text) ·pm:queue; rationale: area:data (was the legacyarea:reports) · Bug · the #36184 changeset declares the multi-value filter refusal for the dataset door only, while/analytics/queryand the SQL door refuse too, so a breaking change on two public doors ships undeclared unless it is fixed before the next release → p2 as filed · size XS. Linked under topic #36230.objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7
Claim: PM loop round 1
Session:
session_011y7As6FyXmJyGyHNKXUkV7Account:
os-aliceBranch:
claude/issue-36264-analytics-refusal-changesetWorktree:
objectstack-issue-36264Domain:
domain:serverSeat:
repo:objectstack#7Area:
o7-dataFile surface:
.changeset/36168-dataset-json-column-refusal.md, one new test file under packages/services/service-analytics/src/(stop on breach; explain in the report)Container & model:
XS,mode:subagent,model: default (dispatch-gates --tier: "no path-derived mandate"),effort: mediumClause-②: no
Metadata-protocol: none
Responsibility:
n/a — not a defect card (release-notes text plus one pin)Thread-read: 7074416574
Premise: holds (origin/main 3cf6a44: the changeset's BREAKING paragraph names only POST /api/v1/analytics/dataset/query; it is unreleased, consumed by the open Version Packages PR #35129)
Pre-claim lane: repo:objectstack#7 · o7-data — packages/services/** is an o7-data path root on #35557
Pre-claim deps: no Blocked-by and no "after #N" on the card
Prior rulings read: check-prior-rulings --card 36264: 708 hit lines across service-analytics, none on the changeset's text; the card's own thread carries no ruling
Serial constraints cleared: in-flight sibling #36190 (seat claim, same package, no PR yet) and #36189 (this area, preview-evaluator.ts) — disjoint files; #35129 regenerates from the changeset; os-verify-lock depth 1 · go
Fold-or-serial: not folded with #36189 — gate ① fails (a changeset declaration vs the preview evaluator's $contains semantics); disjoint files, run in parallel
objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7
os-dev-report
{ "issue": 36264, "status": "done", "branch": "claude/issue-36264-analytics-refusal-changeset", "pr": "https://github.com/objectstack-ai/objectstack/pull/36671", "session": "session_011y7As6FyXmJyGyHNKXUkV7", "premise_still_valid": true, "summary": "Widened the unreleased changeset .changeset/36168-dataset-json-column-refusal.md: summary line, Clause-② reason (kept `no (narrowing)`) and BREAKING paragraph now name POST /api/v1/analytics/query, the native-SQL arm of POST /api/v1/analytics/sql and the timeDimensions[].dateRange window beside the dataset door; the ADR-0087 marker prose names the same doors. Premise re-read on main 3cf6a44be: query() (analytics-service.ts:2756) and generateSql() (:4091) both build their ctx through callCtx, whose baseCtx carries declaredValueShape (:1794); the refusal is native-sql-strategy.ts:2510. The dateRange position was MEASURED to refuse ($gte, 400 INVALID_FILTER) on a JSON-stored member (tags); a datetime declared multiple:true is not JSON-stored and is answered 200, so the text says 'multi-value or JSON field'. Pins added as a new top-level describe in the existing harness dataset-json-column-refusal-36168.test.ts, not a new file (AGENTS.md shared-harness placement rule; see deviations).", "tests": "d164ccf63: `pnpm --filter @objectstack/service-analytics typecheck` exit 0; `vitest run --maxWorkers=2` whole package: Test Files 224 passed (224), Tests 5733 passed | 345 skipped, lock VERDICT command-exit 0. New pins (-t 36264): 3 passed (query $in -> INVALID_FILTER/400 + $contains resolves; generateSql same; query dateRange on a tags member -> INVALID_FILTER/400). Ablation via scripts/ablation-replace.mjs in query() only: ctx = { ...(await this.callCtx(...)), declaredValueShape: undefined } (anchor x1->x0, blob bf7a2df1c981->edaab3fae524): 2 failed (both query pins) | 1 passed (generateSql, ctx untouched); restored blob == HEAD bf7a2df1c981, git diff HEAD empty. Test imports src/analytics-service.js, no dist involved.", "gates": "local (d164ccf63, dispatch-gates --commands, 63 families): 60 exit 0; `node scripts/check-empty-changeset.mjs --base origin/main` exit 1 = DELIBERATE CORRECTION of a pending note, declared in the PR body, red by design; NOT MEASURED (exit 3, prerequisite): `check-plugin-teardown-shape.mjs --self-test` (shallow clone cannot reach pinned control; also exit 3 on main 3cf6a44be) and `pnpm check:dual-build-cjs-loads` (needs full build). `dispatch-gates --ran` exit 0: 63 accounted, 61 run, 2 NOT-MEASURED, 0 UNRUN. overlap-check exit 1: conflicts with #35129 (Version Packages, shares the changeset; expected, untouched). CI check-runs on d164ccf63 at report time: all in_progress/queued (Check Changeset, Lint & Type Check lanes, Governed Surface Queue Guard) — not awaited.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm in the PR body's Clause-② line", "mcp_calls": "0", "api_writes": "3 — git push (branch); relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST issues/36671/assignees); post-stamped comment on issue 36264 (POST /repos/objectstack-ai/objectstack/issues/36264/comments)", "line_budget": "54 changed lines (changeset 4+/4-, test 46+/0-) vs aim 50 — 4 over; the dateRange pin (5 lines) supports the changeset's dateRange claim", "files_changed": [".changeset/36168-dataset-json-column-refusal.md", "packages/services/service-analytics/src/__tests__/dataset-json-column-refusal-36168.test.ts"], "deviations": ["File surface: the dispatch named ONE new test file; the pin went into the existing #36168 harness file as a top-level describe instead, because AGENTS.md (binding, outranks the dispatch) rules that a new pin for a component that already has a shared harness file goes there (ruling record 6583487846). No other claim holds that file. If the seat prefers a separate file, it is a pure move."], "open_questions": [], "security_findings": "none", "out_of_scope_findings": ["carrier: none · noted, not filed: a cube whose time dimension IS the JSON-stored member also used in `where` makes resolveStrategy answer 'No strategy can handle query' for a $in where (observed while probing; not the refusal shape the card asks, not reproduced through a public door)"] }objectstack-fleet commentedon Nov 23, 2026
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7
os-dev-report
{ "issue": 36264, "status": "done", "branch": "claude/issue-36264-analytics-refusal-changeset", "pr": "https://github.com/objectstack-ai/objectstack/pull/36671", "head": "225d687392", "session": "session_011y7As6FyXmJyGyHNKXUkV7", "premise_still_valid": true, "summary": "Patch round on the PASS review 7100067069. S1: I re-read native-sql-strategy.ts:1118-1193. jsonConstructOnUnknownDialectIn reads the where (through lowerAnalyticsWhere, which reads query.where only), the dataset filter, the measure filters and the read scopes. It never reads timeDimensions. The unknown-dialect sentence now says so, and says the window is refused on every datasource the native strategy compiles for. N1: the window clause now applies to all three doors, including the dataset door's selection.timeDimensions[], which I re-read at dataset-executor.ts:1742-1781. N4: 'a field declared multiple: true' became the summary's 'multi-value or JSON field', with the types the code judges listed (MULTI_CAPABLE_TYPES in spec field-value.zod.ts:365). N2: the dateRange pin now runs on query and generateSql, each with a scalar datetime time column control that resolves. The first patch commit e48453e08b had a TS2345 on the window helper (dateRange widened to string[]); 225d687392 fixes it by typing the helper's return as Partial<AnalyticsQuery>. The PR body now reads 'Clause-②: no (narrowing)', with a 'Skills-docs:' line, a patch-round section and the signed trailer as the last non-empty line. I changed no production code.", "changeset_sentences_before_after": [ "BREAKING lead-in. BEFORE: '... whose `runtimeFilter`, dataset `filter` or measure `filter` applies, 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 ...' AFTER: '... whose `runtimeFilter`, dataset `filter` or measure `filter`, 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 an operator of ...'", "BREAKING field clause (N4 + N1). BEFORE: '— to a field declared `multiple: true`, an inherently multi-value type (`tags`, `multiselect`, `checkboxes`) or a structured-JSON type:' AFTER: '— to a multi-value or JSON field: an inherently multi-value type (`tags`, `multiselect`, `checkboxes`), a `select`, `radio`, `lookup`, `user`, `file` or `image` field declared `multiple: true`, or a structured-JSON type. The same holds on all three doors, when the native SQL strategy answers, for a `timeDimensions[].dateRange` window on such a field (the dataset door's `selection.timeDimensions[]` included), which compiles to a `$gte` / `$lte` pair:'", "Unknown-dialect sentence (S1). BEFORE: '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.' AFTER: 'On a datasource whose SQL dialect the host cannot name (memory, MongoDB), the native strategy now declines a query whose `where`, dataset `filter`, measure `filter` or read scope carries such a comparison, so the engine answers it through its own driver; a `timeDimensions[].dateRange` window on such a field is not part of that decline, and is refused `400 INVALID_FILTER` on every datasource the native strategy compiles for.'", "Unchanged this round: the summary line, the Clause-② reason line and the ADR-0087 marker (as at d164ccf63)." ], "tests": "At 225d687392: `pnpm --filter @objectstack/service-analytics typecheck` exit 0, lock VERDICT command-exit 0. Whole package `vitest run --maxWorkers=2`: Test Files 224 passed (224), Tests 5734 passed | 345 skipped, VERDICT command-exit 0. Harness file alone, at e48453e08b, same test bytes as 225d687392 apart from the type annotation: Tests 41 passed (41). The [#36264] describe now has 4 tests: query and generateSql $in, then query and generateSql dateRange, each with its control. The round-1 ablation (declaredValueShape removed from query()'s context turns the query pins red) is unchanged and was not re-run. The new generateSql dateRange row is held by the generateSql context, which that ablation does not touch.", "gates": "Local, at 225d687392, dispatch-gates --commands (63 families, same list as round 1): 60 exit 0. `node scripts/check-empty-changeset.mjs --base origin/main` exit 1: the declared DELIBERATE CORRECTION. `check:dts-closure` and `check:type-check-debt` first exited 1 and 3 while the dogfood build was writing dist in parallel; re-run after that build, both exit 0. NOT MEASURED (exit 3, prerequisite not met): `check-plugin-teardown-shape.mjs --self-test`, because the shallow clone cannot reach its pinned control. `check:dual-build-cjs-loads` exited 3 in the loop and exit 0 when re-run after the full dogfood build (not folded into the --ran record). `dispatch-gates --ran` exit 0: 63 accounted, 61 run, 2 NOT-MEASURED, 0 UNRUN. overlap-check exit 1: only #35129 (Version Packages, shares the changeset), which is expected and was not touched. PR check-runs on 225d687392: 37 success; 'Check Changeset' completed/failure twice, the expected DELIBERATE CORRECTION; nothing else red or pending. The TypeScript Type Check red at e48453e08b is fixed at this head.", "dogfood_battery": "225d687392 · os-verify-lock: VERDICT command-exit 0 (held 48m23s, waited 0s) · Test Files 487 passed | 3 skipped (490) · Tests 4121 passed | 68 skipped (4189) · no failures", "mcp_calls": "0", "api_writes": "4 this round — git push (2 commits: e48453e08b, 225d687392); relay issue_patch of the PR #36671 body (PATCH /repos/objectstack-ai/objectstack/issues/36671, read back identical at 6633 bytes); post-stamped os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/36264/comments)", "line_budget": "57 changed lines against BASE 3cf6a44be (changeset 5+/5-, test 47+/0-): 7 over the 50 aim, all from review items N2 (window rows on both doors plus control) and S1/N1/N4", "files_changed": [".changeset/36168-dataset-json-column-refusal.md", "packages/services/service-analytics/src/__tests__/dataset-json-column-refusal-36168.test.ts"], "deviations": [ "e48453e08b was pushed before typecheck ran on the new rows and went red in CI (TS2345); fixed at 225d687392.", "The dogfood battery ran once at the final head 225d687392 before the PM's 19:13Z message arrived. That message asked to run it at the final head; the run already done is that run, so I did not run it a second time.", "The round-1 placement deviation stands: the pins are in the existing #36168 harness file, not a new file." ], "open_questions": [], "security_findings": "none", "out_of_scope_findings": ["class: a · reach: not measured through a public door, read from code by the reviewer · the unknown-dialect decline (jsonConstructOnUnknownDialectIn) does not read timeDimensions[].dateRange. On a non-SQL datasource, a window on a JSON-stored member is therefore refused 400 by the native compile instead of being declined to the engine. The reviewer names the production-code follow-up as optional; the seat can file it · dedupe: jsonConstructOnUnknownDialectIn, dateRange decline, RAW_SQL_UNSUPPORTED"] }objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#7 · os-alice · session_011y7As6FyXmJyGyHNKXUkV7
Delivered · 2026-11-24T00:14Z · PR #36671 merged 2026-11-23T21:48Z (L1-a ACCEPT 7112345749, contract review PASS 7111741771 with same-head delta 7112295892, approved and enqueued by os-zhuang for the declared narrowing). The pending #36168 changeset now declares the multi-value / JSON field refusal on all three analytics doors and the
timeDimensions[].dateRangewindow, with pins onqueryandgenerateSql. The dateRange decline follow-up is #36773.pm:dispatchedis removed with this note.sweep-closed-cards --pr 36671: this card is the only one the merge closed.