Skip to content

fix(service-analytics)!: a dotted member like vendor.region no longer filters the base field of the same name - #31878

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/project-thread-ivenn8
Nov 9, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/project-thread-ivenn8

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #31842

Clause-②: no (narrowing)
Metadata-protocol: none

维护者速读

  • 改了什么:分析查询里带点的成员(如筛选 vendor.region)只在第一段是本数据集/本对象名时才按本对象字段解析;否则一律按关联路径处理(未声明 include 就明确拒绝,已声明就筛关联对象的字段)。校验门和两种执行策略共用同一条规则。
  • 为什么改:以前只要最后一段和本对象某个字段同名,vendor.region 就会悄悄按本对象自己的 region 筛选,图表数字是错的,且没有任何提示。
  • 风险与回滚:属于收窄:原来"答错"的写法现在会被拒(INVALID_FIELD/400)或改为筛关联字段;一方代码里没有这种写法。回滚即 revert 本 PR。
  • 先看:packages/services/service-analytics/src/cube-member-key.ts(唯一规则)、analytics-service.ts 的 declaredMemberEntry、两个策略的 lookupMember。
  • 两分钟验证:pnpm --filter @objectstack/service-analytics exec vitest run src/__tests__/dotted-dimension-unbacked-join-parity.test.ts,预期 17 个全绿(其中 8 个是本卡新增)。
  • 需要你做的:无,席位落地。

What changes

One rule for which declared cube member a spelling names, in a new module cube-member-key.ts (declaredCubeMemberKey, not exported from the package root), read by every resolver that used to carry its own copy:

  • the door's gates: declaredMemberEntry in analytics-service.ts (the where gate, the dimension gate, the include gate, the field-read admission, the preview column map);
  • NativeSQLStrategy.lookupMember and ObjectQLStrategy's lookupCubeMember;
  • the structured-JSON door's measureEntryOf (the same lookup for measures; see Acceptance notes).

A spelling names a declared key verbatim (a declared dotted key included), behind the cube's own qualifier (CUBE.region, or OBJECT.region where OBJECT is the bare object the cube's sql reads), or through an underscore-flattened key ONLY when that key's own sql is the same relationship path. The bare-tail arm (if (bag[tail]) return bag[tail]), which made the first === cube.name arm above it dead, is gone from all four copies. Any other dotted member is a relationship path: the dimension tier hands it to the join machinery, and on a compiled dataset the existing include gate (or the existing related-column gate) answers. No error code, envelope or export is added.

The three undeclared fallbacks that read member.split('.')[1] as a base column (resolveFieldSql, resolveDimensionSql, resolveCubeFieldName) and the split('.').slice(1) one in resolveStorageTarget now return the member itself. Measured: they were unreachable for a dotted member, because the dimension lookup answers every dotted member first (a declared key, or the synthetic traversal), so the only path into them was a bare member; resolveCubeFieldName's could be reached dotted only with kind measure, which no caller passes.

Seat ruling 3 (flat keys): nothing in the package MINTS a flat key. inferCubeFromQuery mints a dotted member verbatim, and the dataset compiler keys a dimension by its authored name. A flat key is authored only; skills/objectstack-ui/rules/dashboards.md teaches account_industry with sql: 'account.industry', which names the related field and still answers account.industry. A flat key over a base column (a dataset dimension vendor_region over region) no longer answers vendor.region.

Tests

dotted-dimension-unbacked-join-parity.test.ts (the existing real-SQLite harness for dotted members on both strategies) gains one top-level describe with its own fixture: a deal with its own region, a vendor lookup to an object with no region, and a supplier lookup to one that has it (the supplier's region disagrees with the deal's on every row, so the answer shows which column was read). Eight pins:

  1. vendor.region through no include: refused INVALID_FIELD / 400, param where, on both strategies. RED on main (served the base filter).
  2. vendor.region through a declared include to an object without region: refused INVALID_FIELD / 400 on both. RED on main.
  3. supplier.region through a declared include: native filters the joined supplier column; the engine-aggregate face refuses it as it refuses every related filter. RED on main (both served [], the base filter).
  4. CONTROL: DATASET.region and OBJECT.region still filter the base column on both. Green on main.
  5. vendor.region beside a flat vendor_region over the BASE column: refused on both. RED on main.
  6. A flat supplier_region over supplier.region answers that spelling with the related column. RED on main (the bare-tail arm caught it first).
  7. A hand-authored cube (query): native joins the supplier for supplier.region; the engine face refuses vendor.region. RED on main.
  8. CONTROL: a hand-authored cube still filters CUBE.region as the base column on both. Green on main.

No existing test was edited.

Red on main, then green

Sources restored from origin/main 31ae944b (tree only), the new pins run, then restored from HEAD (git diff HEAD empty):

× refuses 'vendor.region' through no include on both strategies, instead of filtering the deal's own region
× refuses 'vendor.region' through a declared include to an object with no 'region' on both strategies
× filters the RELATED 'supplier.region' through a declared include, never the deal's own region
× refuses 'vendor.region' beside a flat key 'vendor_region' over the BASE column on both strategies
× a flat key 'supplier_region' over the related 'supplier.region' answers ...   (named a CONTROL in that run; renamed after it went red)
× a hand-authored cube: 'supplier.region' joins the supplier on the native strategy, and the engine face refuses 'vendor.region'
Tests  6 failed | 11 passed (17)

On the fix: Tests 17 passed (17).

Ablations (scripts/ablation-replace.mjs, anchor hit 1 to 0 and blob moved each time; restored, git diff HEAD empty)
ablation file result
A1 drop the first-segment guard (any first segment names the tail) cube-member-key.ts 5 failed / 12 passed
A2 restore the bare-tail arm in NativeSQLStrategy.lookupMember only native-sql-strategy.ts 2 failed / 15 passed (pins 3 and 7)
A3 restore the bare-tail arm in lookupCubeMember only objectql-strategy.ts 2 failed / 15 passed (pins 3 and 7)
A4 let any flat key answer a dotted path cube-member-key.ts 1 failed / 16 passed (pin 5)

The tests import the sources (../plugin.js), not a dist/, so no build leg applies.

Acceptance notes

  • Measured on main (seat ruling 1). origin/main 31ae944b, real SqlDriver (SQLite), the engine's execute / aggregate recorded. A dataset over a deal with its own region answered runtimeFilter: { 'vendor.region': 'emea' } with [{ region: 'emea', total: 11 }] on both strategies: native ran ... WHERE region = ? ..., the engine face handed where: { region: 'emea' }, with and without vendor in the include. supplier.region: 'apac' (supplier HAS region) served [] on both, from the same base filter. A flat vendor_region over region answered vendor.region the same way. A hand-authored cube through query did too. An undeclared dotted member with no same-named member (supplier.name) already reached the JOIN machinery on main (native LEFT JOIN, include gate refusal when unbacked).
  • Clause-② (seat ruling 5). no (narrowing): vendor.region is now refused where the related object lacks the column or the path is undeclared, so not every such input resolves to a related field. BREAKING banner, ADR-0087 disposition not-required (no-migration-prescription), and the full dogfood battery on the final head below. First-party count of a dotted analytics member whose tail names a base member: 0 (grepped content/, examples/, skills/, packages/qa/dogfood; the three dotted where hits are ObjectQL data-query docs, not analytics).
  • OBJECT qualifier kept beside CUBE. Seat ruling 2 names only the cube's own name. A compiled dataset is named for the dataset, and OBJECT.region has always named its base field: the existing analytics: a dotted dimension whose join the dataset does not back gets three different answers from native, ObjectQL and the draft preview #28258 control and the analytics: the dataset draft preview answers [] for a runtimeFilter member spelled OBJECT.region that both live strategies resolve to the declared dimension #28691 preview map pin it. The rule treats the bare object of the cube's sql as an own qualifier too. Raised as an open question in the report.
  • Changeset remedy. The delta asked for a FROM / TO line. The ADR-0087 gate reads a FROM-TO label as a migration prescription and refuses it beside no-migration-prescription, so the remedy is stated in prose (spell it CUBE.region or region; a stored member is not rewritten, because only its author knows which field it meant).
  • Files beyond the claim's surface. src/cube-member-key.ts (new module, the one rule, not exported from the package root) and src/structured-json-dimension-door.ts (measureEntryOf carried the same bare-tail copy for measures; same defect class, mechanical, no new gate family).
  • Out of scope, reported to the seat. (a) A CUBE-qualified MEASURE in a dataset where (DATASET.total) is read by the gate as the declared measure but compiled by both strategies as a join through a hop named for the dataset (native DATASET_INVALID "join ... is not backed", engine face the cross-object refusal), while bare total serves. Pre-existing on main, unchanged here. (b) On a hand-authored cube (no include gate), the native strategy answers DATABASE_ERROR / 500 for a related column the related object lacks (vendor.nope on main; now vendor.region lands there too, instead of being served from the wrong column). The dataset path refuses the same input INVALID_FIELD / 400.

Verification

Head 93e3a44a (merge of origin/main ef194d79).

Local runs
  • pnpm --filter @objectstack/service-analytics test on 93e3a44a: Test Files 214 passed (214), Tests 5148 passed, 332 skipped.
  • pnpm --filter @objectstack/service-analytics typecheck on 93e3a44a (closure built with DTS): 0 errors.
  • eslint packages/services/service-analytics --no-inline-config: exit 0.
  • node scripts/pm/dispatch-gates.mjs --commands: 70 families, all run with exit 0 recorded; --ran reconciliation: 70 derived, 70 run, 0 NOT-MEASURED (derived zero). After the merge the derivation is unchanged and the diff-sensitive families (adr-0087 registration, changeset no-major, empty changeset, closing-keyword parity, issue citations, doc-authoring, nul-bytes, cross-package test inputs, test-source alias, affected docs) were re-run: all exit 0.
  • Full dogfood battery: 93e3a44a · os-verify-lock VERDICT command-exit 0 · Test Files 441 passed, 3 skipped (444) · Tests 3662 passed, 42 skipped (3704) · no failures. (Also green on the pre-merge head 21e229dc, same counts.)

Generated by Claude Code

…ind the cube's own qualifier

One rule (declaredCubeMemberKey) for the door's gates, both strategies'
lookupMember and the structured-JSON door: a dotted spelling never names a
declared member by its tail alone, and a flattened key answers only when its
sql is the same relationship path.

Claude-Session: https://claude.ai/code/session_01ADHkmP7cP3t3ncc39aFhhx
Co-authored-by: Claude <noreply@anthropic.com>
… declared member on both strategies

Claude-Session: https://claude.ai/code/session_01ADHkmP7cP3t3ncc39aFhhx
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m 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 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

13 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 65 of 231 client-bound route-ledger rows — the other 166 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 166: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 107 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 10 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 3f0e3acea404fe707d6f83f42b97f0d689bd5fdb → packageMentionDocs.

Which tree this was computed on

This run read content/docs from dac458fa739259c9f2a164e883a2885c83d14f6e — the merge of head 93e3a44aa4f4c0116075f7189f57d1eafe709665 into base 3f0e3acea404fe707d6f83f42b97f0d689bd5fdb, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin dac458fa739259c9f2a164e883a2885c83d14f6e && git checkout dac458fa739259c9f2a164e883a2885c83d14f6e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3f0e3acea404fe707d6f83f42b97f0d689bd5fdb 93e3a44aa4f4c0116075f7189f57d1eafe709665 && git checkout -B drift-repro 3f0e3acea404fe707d6f83f42b97f0d689bd5fdb && git merge --no-ff 93e3a44aa4f4c0116075f7189f57d1eafe709665

node scripts/docs-audit/affected-docs.mjs --json 3f0e3acea404fe707d6f83f42b97f0d689bd5fdb

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#2 · os-steve · session_01ADHkmQKZzp4DLtqiCkZZRM

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 93e3a44aa4f4c0116075f7189f57d1eafe709665
Local-runs: none
Scope: packages/services/service-analytics/src/cube-member-key.ts, packages/services/service-analytics/src/analytics-service.ts, packages/services/service-analytics/src/strategies/native-sql-strategy.ts, packages/services/service-analytics/src/strategies/objectql-strategy.ts, packages/services/service-analytics/src/structured-json-dimension-door.ts, packages/services/service-analytics/src/tests/dotted-dimension-unbacked-join-parity.test.ts + packages/services/service-analytics/src/dataset-compiler.ts, packages/services/service-analytics/src/dataset-filter-field-binding.ts, packages/services/service-analytics/src/order-key-door.ts, packages/services/service-analytics/src/index.ts, skills/objectstack-ui/rules/dashboards.md, content/docs/references/data/analytics.mdx, content/docs/data-modeling/analytics.mdx, packages/spec/src/data/analytics.zod.ts, scripts/check-adr-0087-registration.mjs (read, not reviewed)
Inputs: card #31842 (body, triage, claim, os-dev-report), PR #31878 (body, 7-file list, net diff against main at the head), the head's 47 check-runs at 2026-11-09T09:17Z: 42 concluded (success or skipped, no failure, none cancelled), 5 still in_progress (Test Core shards 1/8, 3/8, 4/8, 7/8, 8/8). Judged on what has concluded; Check Changeset (which runs check-adr-0087-registration.mjs), Governed Surface Queue Guard, PR-body guards, Build Core, every Type Check job, every Lint job and the concluded Test Core shards are green. Not read: the dispatch order's conclusions.

① Derived judgments

  1. Accept-set narrowing, filter / dimension / time-dimension members — right. declaredCubeMemberKey (cube-member-key.ts) resolves a dotted spelling to a declared key only verbatim, behind the cube's own qualifier (cube.name, or the bare object cube.sql names), or through an underscore-flattened key whose own sql is the same relationship path. The bare-tail arm (if (bag[tail]) return bag[tail]) is gone from all four copies: declaredMemberEntry (every door gate: where, dimension, include, related-column, field-read admission, preview column map, record-currency, structured-JSON dimension door), NativeSQLStrategy.lookupMember, lookupCubeMember (= ObjectQLStrategy.lookupMember), and measureEntryOf. Read in the head: relationshipMembers gets declared: false for vendor.region, so assertDimensionJoinsBacked refuses the undeclared path with the existing INVALID_FIELD / 400 "traverses relationship path 'vendor'" envelope, and assertRelationshipColumnsExist refuses a declared path to a column the related object lacks. This is card Work item 1 and seat ruling 2 as written.
  2. Flat-key arm restricted — right. pathOf(flatEntry) === member (with the $ sigil stripped). The dataset compiler writes sql: d.field verbatim (dataset-compiler.ts L879), so a dataset dimension supplier_region over supplier.region still answers that spelling, as does the skill's account_industry: { sql: 'account.industry' } (dashboards.md L451); one over a base column (vendor_region over region) no longer answers vendor.region. Nothing in the package mints a flat key: inferCubeFromQuery mints dotted members verbatim, and bindDatasetFiltersToObjectFields mints KEY__object_field keys, which no dotted spelling flattens to. Card Work item 2, seat ruling 3.
  3. One rule, no drift — right. Gate and both strategies read the same function (seat ruling 4); measureEntryOf keeps [finding] analytics NativeSQL answers a multi-value dimension one group per serialized array on SQLite and 500 on PostgreSQL, and a count_distinct over a JSON-stored field 2 / 500; the engine door #20808 adds does not see it #20912's own-keys-only guard by re-checking hasOwnProperty on the returned key. The undeclared split('.')[1] / slice(1) fallbacks in native resolveFieldSql, resolveDimensionSql, resolveStorageTarget and objectql resolveCubeFieldName now return the member itself; read in the head, they were unreachable for a dotted member, because lookupMember(…, 'dimension') answers every dotted member (a declared key, or the synthetic traversal) before them.
  4. Own qualifier includes the bare object — right. A compiled dataset's cube is sql: dataset.object (dataset-compiler.ts L955) and named for the dataset, so OBJECT.region is a second spelling of the same base table, not a relationship hop. It is pinned on main by the analytics: a dotted dimension whose join the dataset does not back gets three different answers from native, ObjectQL and the draft preview #28258 CONTROL ("'OBJECT.region', which resolves to the declared 'region', still serves on every face"), by previewWhereColumns (analytics: the dataset draft preview answers [] for a runtimeFilter member spelled OBJECT.region that both live strategies resolve to the declared dimension #28691) and by the include gate's own jsdoc. No pin moves.
  5. No public surface — right. cube-member-key.ts is not exported from src/index.ts (unchanged); no error code, status or envelope is added; every refusal reuses INVALID_FIELD / 400 or the engine's existing cross-object refusal.
  6. Tests — right. Eight pins in the existing real-SQLite harness, on both live strategies: the three Done-when outcomes (never the base column; CUBE.region / OBJECT.region still the base column; related column through a declared include, or refusal), plus the flat-key pair and the hand-authored cube pair. No existing test edited.
  7. Not fully retired, no contract effect (see ④). Objectql resolveStorageTarget (L1892) still carries member.split('.').slice(1).join('.') where the native twin was changed; resolveMeasureAggregation (L1944) and assertMeasureFields's stripPrefix (analytics-service.ts L4265) read a MEASURE by its tail whatever the prefix. Both are behind mintableMeasureKey (analytics 自动推断路径:measures 上的关系穿越点号 member 仍被剥成基表列 —— owner.region_count_distinct 静默聚合基表 region(#5739 裁决未覆盖的第四个铸造点) #5918), which refuses any dotted non-qualifier measure on both mint paths, and measures have no traversal tier, so no input reaches them wrongly.

② Semver level

@objectstack/service-analytics: patch, ! in the title, BREAKING banner, exactly one ADR-0087 marker — not-required (no-migration-prescription) — and both declaration lines line-initial in the changeset and the PR body: Clause-②: no (narrowing), Metadata-protocol: none. Matches AGENTS.md ("a non-protocol change, widening or breaking, ships patch and keeps its BREAKING banner and ADR-0087 disposition"). Clause-②: arm right: an input that was answered (vendor.region over a vendor with no region, served from the base column on main) is now refused, so the accept set shrinks; the "argue no with no arm" branch of seat ruling 5 does not apply because not every such input resolves to a related field. Metadata-protocol: none right: no key, value or type an author writes in a cube or dataset changes; the input that moves is a query-time member spelling. The remedy stands in prose (spell it CUBE.region or region; a stored member is not rewritten); the gate's own source (scripts/check-adr-0087-registration.mjs, branch 1 "label convention") refuses a FROM/TO label beside no-migration-prescription, and Check Changeset concluded success on this head.

③ Boundary flags

  • Dev flag 1 — keep OBJECT.region as an own qualifier beside CUBE.region: ACCEPTED, option A. Seat ruling 2 names the cube's own name; its intent (the first segment names the cube's own table, never a relation) is met by both spellings, since the object cube.sql reads is the base table itself. Option B would refuse an input the card never touched and rewrite two existing controls (analytics: a dotted dimension whose join the dataset does not back gets three different answers from native, ObjectQL and the draft preview #28258, analytics: the dataset draft preview answers [] for a runtimeFilter member spelled OBJECT.region that both live strategies resolve to the declared dimension #28691): a wider narrowing than the card. Answered, not escalated.
  • Dev flag 2 — internal name declaredCubeMemberKey / cube-member-key.ts: ACCEPTED. Package-internal, not exported; the name states the rule.
  • Deviation — file surface adds cube-member-key.ts and structured-json-dimension-door.ts: ACCEPTED. Seat ruling 4 asks for one shared helper, which is the new module; measureEntryOf was a fourth copy of the bare-tail rule, and leaving it would be the drift ruling 4 forbids. Both stay inside packages/services/service-analytics/src; no packages/spec/**, no ui/**.
  • Deviation — changeset remedy as prose instead of a FROM / TO line: ACCEPTED, for the reason in ②; the prose names both the input that moves and the two spellings that replace it.
  • open_questions 1 and 2: answered above (A and A).
  • out_of_scope (a) — a CUBE-qualified MEASURE in a dataset where (DATASET.total) is read by the gate as the measure but compiled by both strategies as a hop named for the dataset: pre-existing on main (the dimension lookup's synthetic tier preempts the measure bag in the same order before and after this PR). Not moved here; follow-up card.
  • out_of_scope (b) — a hand-authored cube (no include gate) on the native strategy answers DATABASE_ERROR / 500 for a related column the related object lacks, where the dataset door answers INVALID_FIELD / 400. Pre-existing for vendor.nope on main; this PR routes vendor.region into the same class (the join tier) instead of serving it from the wrong column, which is the card's Done-when ("filters the related field … or refuses"). The 400 / 500 parity on the hand-authored path is a follow-up card, not a finding against this head.

④ Design judgment

The narrowing against the published spec on main. The spec publishes a member as CUBE.KEY (analytics.zod.ts L674/L678; references/data/analytics.mdx L129/L130) and a member's sql as "a field of the cube's object or a relationship path ending in one (account.industry)"; data-modeling/analytics.mdx L248 says related fields are reached "by dotted path … only declared" relationships. Nowhere does the spec declare that ANYTHING.KEY names KEY. So the narrowing takes no declared capability away at the consumer: a dotted member whose first segment is neither the cube nor its object was always, under the published spec, a relationship path, and the PR makes the spec's own refusal (#28258's include gate, #28558's related-column gate) real for it. The legacy second-segment arm existed only in the strategies' private jsdoc. No implementation gap is narrowed at the consumer: the related-field read through a declared include is delivered (pin 3, pin 6, pin 7), and the undeclared path is refused by the gate that already existed for every other dotted member.

Trying to break it (read in the head, not run):

  • Multi-hop a.b.c: tail b.c, flat a_b_c must carry sql: 'a.b.c' — same as the old rest.join('.'). Holds.
  • $-sigil sql: pathOf strips it before comparing. Holds.
  • A cube.sql that is not a bare identifier (a SELECT): the object arm never matches, cube.name still does. Holds.
  • Inherited keys (constructor): bag[member] truthiness is inherited from the old code in the gate and both strategies (unchanged), and measureEntryOf re-checks hasOwnProperty, so [finding] analytics NativeSQL answers a multi-value dimension one group per serialized array on SQLite and 500 on PostgreSQL, and a count_distinct over a JSON-stored field 2 / 500; the engine door #20808 adds does not see it #20912's own-keys-only contract on the structured-JSON door is kept. Holds.
  • The three faces agree: the preview path runs assertDimensionJoinsBacked / assertRelationshipColumnsExist / assertPreviewJoinsNothing before the evaluator and reads previewWhereColumns / previewEvaluationCube through the same declaredMemberEntry, so a vendor.region runtimeFilter is refused on the draft preview too. Holds by reading.
  • A cube or object whose name equals a lookup field name on that object (vendor cube over a vendor lookup): the own qualifier wins and vendor.region names the base field. This is the published CUBE.KEY semantics, unchanged by this PR; not a finding.

Findings:

  1. nit — objectql resolveStorageTarget keeps the member.split('.').slice(1).join('.') fallback that its native twin dropped (objectql-strategy.ts L1892). Unreachable for a dotted member (lookupMember(…, 'dimension') answers every dotted one first), so no effect on correctness or the contract; the two copies now disagree in text only. Follow-up or accepted deviation.
  2. nit — the helper's jsdoc claims to be "the ONE rule … for every reader in this package that resolves one", while resolveMeasureAggregation's alias arm (L1944) and assertMeasureFields's stripPrefix (L4265) still read a measure by its tail. Both sit behind mintableMeasureKey (analytics 自动推断路径:measures 上的关系穿越点号 member 仍被剥成基表列 —— owner.region_count_distinct 静默聚合基表 region(#5739 裁决未覆盖的第四个铸造点) #5918), which refuses every dotted non-qualifier measure on both mint paths, so no input reaches them wrongly; the claim is overstated, the behaviour is not. Not a prose face; accepted deviation or follow-up.
  3. nit (prose face, changeset) — the Clause-②: sentence lists "an order key" among the narrowed positions. An order key is an output alias gated by assertOrderKeysSelected and emitted as "MEMBER" by orderClauseSql; it is never resolved by this rule. It inherits the narrowing only through the selected spelling it must match, so the effect is right and the wording loose. Fixable on the changeset alone.
  4. nit — the new pins cover the two live strategies the card asks for; the preview face (which the analytics: a dotted dimension whose join the dataset does not back gets three different answers from native, ObjectQL and the draft preview #28258 harness also drives) is not pinned for the new inputs. Reading shows the same gates run before the evaluator; a pin would cost one case per outcome. Follow-up.

No must-fix, no should-fix. Nits alone end the round.

Implemented-by: claude/project-thread-ivenn8
Reviewed-by: fable-subagent-31878

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#2 · os-steve · session_01ADHkmQKZzp4DLtqiCkZZRM

维护者速读

  • 改了什么: 分析查询里带点的成员(如筛选 vendor.region),只有第一段是本数据集或本对象名时才按本对象字段解析;否则一律当关联路径处理:没声明 include 就明确拒绝(400),声明了就筛关联对象的字段。校验门和两种执行策略共用 cube-member-key.ts 这一条规则。
  • 为什么改: 以前只要最后一段和本对象某字段同名,vendor.region 会悄悄按本对象自己的 region 筛,图表数字错且无提示(main 上实测)。
  • 风险与回滚: 收窄:原来"答错"的写法现在被拒或改筛关联字段;一方代码里这种写法计数为 0。回滚即还原本 PR。
  • 先看: packages/services/service-analytics/src/cube-member-key.ts。
  • 需要你做的: 无,由席位落地。
  • 席位意见: ACCEPT。

席位核对 — ACCEPT · domain:server#2 · Head-sha 93e3a44aa4f4c0116075f7189f57d1eafe709665 · 2026-11-09T09:26Z

  1. Shape: draft to main, Fixes #31842. The declaration is Clause-②: no (narrowing) with Metadata-protocol: none; patch changeset for @objectstack/service-analytics with the BREAKING banner and one ADR-0087 marker not-required (no-migration-prescription). 7 files, +326/−65.
  2. Contract review: CONTRACT_REVIEW_TIER, narrowing face, PASS, on this head (comment 6736461187). Four nits, none must-fix or should-fix; nits alone end the round.
  3. Delta rulings, checked against the diff:
  4. Gates:
    • Dev: 6 of the 8 new pins red on main 31ae944b and 17/17 green now; the 2 CONTROL pins green both sides; ablations A1 to A4 each red and restored. service-analytics 5148 tests pass; typecheck and eslint 0; 70/70 derived gates, 0 NOT-MEASURED; the full dogfood battery green (3662 passed).
    • Check-runs on this head: 35 success, 15 skipped, 0 failed.
    • Governed surfaces: 0 of 7 paths on the register.
  5. Carried: analytics: a cube-qualified measure in a dataset where (DATASET.total) is gated as the measure but compiled as a join through a hop named for the dataset #31880 (DATASET.total in a dataset where) and analytics native: a hand-authored cube dotted filter naming a related column the related object lacks answers 500 DATABASE_ERROR, not 400 INVALID_FIELD #31881 (500 vs 400 on a hand-authored cube) come to this seat. The review's nits (the resolveStorageTarget fallback text, the helper jsdoc's "every reader", the changeset naming order keys, the preview face not pinned) ride analytics: a cube-qualified measure in a dataset where (DATASET.total) is gated as the measure but compiled as a join through a hop named for the dataset #31880.
  6. Landing: pr_ready + automerge_enable.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 9, 2026 09:28
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 9, 2026 09:28
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit f159aaa Nov 9, 2026
51 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-ivenn8 branch November 9, 2026 10:00
rajeev-kumar-se pushed a commit to rajeev-kumar-se/objectstack that referenced this pull request Nov 10, 2026
…ifier in a filter answers what its bare spelling answers (objectstack-ai#31899)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi95Mj725hLGj2V2T51uRpven)_
Fixes objectstack-ai#31880

Clause-②: no
Metadata-protocol: none

## 维护者速读

- **改了什么:** 筛选里写"数据集名.度量"、"对象名.度量"或"立方体名.度量"(如 `orders.total`,`total`
是已声明的度量)时,两种查询策略现在先查已声明的维度、再查已声明的度量,然后才当关联路径处理,与入口校验的读法一致;结果与只写 `total`
完全相同(同一条 SQL、同样的行)。
- **为什么改:** 以前入口校验放行了它,执行时却被编译成以数据集名命名的关联跳转:原生 SQL 报
`DATASET_INVALID`,手写立方体直接 500,引擎策略报跨对象筛选拒绝;只写 `total` 却正常(main 上实测)。
- **风险与回滚:** 只是"原来报错的写法现在给出与简写相同的答案";第一段不是本数据集/对象名的带点写法(如
`vendor.total`)行为不变,有对照测试钉住。回滚即还原本 PR。
- **先看:**
`packages/services/service-analytics/src/cube-member-key.ts`(新的
`declaredCubeFilterMember`),然后两个策略里的 `lookupFilterMember` /
`lookupCubeFilterMember`。
- **两分钟验证:** `pnpm --filter @objectstack/service-analytics exec vitest
run src/__tests__/dotted-dimension-unbacked-join-parity.test.ts`,预期 21
个全过;其中 `[objectstack-ai#31880]` 四条在 main 上有两条红。
- **需要你做的:** 无,席位落地。

## What changes

- `cube-member-key.ts` gains `declaredCubeFilterMember(cube, member)`:
the declared member a FILTER spelling names across both bags, dimensions
first, then measures (the order `declaredMemberEntry(…, 'any')` already
reads them in the where gate). The measure arm answers a bare spelling
or a dotted one behind the cube's own qualifier (`CUBE.total`,
`OBJECT.total`); a dotted spelling behind any other first segment that
names no declared dimension stays a relationship path exactly as objectstack-ai#31878
left it.
- Native: `resolveFieldSql` and `resolveStorageTarget` read the filter
member through a new `lookupFilterMember` (that helper, else the
synthetic traversal). ObjectQL: `resolveCubeFieldName(…, 'any')` and
`resolveStorageTarget` read it through the module-level twin
`lookupCubeFilterMember`. The dimension-only and measure-only readings
are unchanged.
- A measure in a filter does what bare `total` does on each strategy
today: a row-level predicate on the measure's column (`WHERE amount > ?`
native; `where: { amount: { $gt } }` to the engine aggregate). The
qualified spelling now produces the byte-identical statement / aggregate
call.
- Carried nits from objectstack-ai#31878's contract review: (a) ObjectQL
`resolveStorageTarget` no longer keeps the
`member.split('.').slice(1).join('.')` fallback its native twin dropped:
an undeclared member is the member itself on both; (b) the helper
module's jsdoc no longer claims to be the rule for every reader: it
names the two measure readers that resolve by tail
(`resolveMeasureAggregation`'s alias arm, `assertMeasureFields`'
qualifier strip) and why `mintableMeasureKey` keeps them unreachable for
a dotted non-qualifier spelling; (c) the draft preview face is pinned
for `DATASET.total` (it accepts a `runtimeFilter` and answers it exactly
as `total`).

## Tests

A new top-level `describe('[objectstack-ai#31880] …')` in the existing real-SQLite
harness `dotted-dimension-unbacked-join-parity.test.ts` (shared-harness
rule), with the engine's `execute` / `aggregate` wrapped so each pin
compares what was SENT as well as the rows:

1. `DATASET.total` and `OBJECT.total` in a `runtimeFilter` answer
exactly what `total` answers (rows and statement), native and ObjectQL.
**RED on main.**
2. A hand-authored cube: `CUBE.total` and `OBJECT.total` in a `where`
answer exactly what `total` answers, both strategies. **RED on main.**
3. The draft preview answers `DATASET.total` exactly as `total` (green
on main too: the preview already reads members through the gate's
lookup; pinned per review nit 4).
4. CONTROL: `vendor.total` (first segment not the cube's own) is still
refused `INVALID_FIELD` / 400 "traverses relationship path 'vendor'" on
both strategies through a dataset, and refused as a cross-object filter
by the engine face on a hand-authored cube.

No existing test is edited; objectstack-ai#31878's eight pins run unedited and green.

## Acceptance notes

- Measured on `main` `ac8fede8` before writing code (seat ruling 1),
filter `{ MEMBER: { $gt: 5 } }`:

<details><summary>main ac8fede answers</summary>

| face | `total` | `DATASET.total` | `OBJECT.total` | `CUBE.total`
(hand-authored) |
|:--|:--|:--|:--|:--|
| native, dataset | `WHERE amount > ?`, 2 rows | `DATASET_INVALID` / 400
join not backed | `DATASET_INVALID` / 400 join not backed | n/a |
| native, cube | `WHERE amount > ?`, 2 rows | n/a | `DATABASE_ERROR` /
500 (self-join) | `DATABASE_ERROR` / 500 (join to a table named for the
cube) |
| ObjectQL, dataset | `where: { amount: { $gt: 5 } }`, 2 rows |
`INVALID_FIELD` / 400 cross-object filter | `INVALID_FILTER` / 400
(engine has no such column) | n/a |
| ObjectQL, cube | same, 2 rows | n/a | `INVALID_FILTER` / 400 |
`INVALID_FIELD` / 400 cross-object filter |

On this branch every qualified cell answers the bare cell's statement
and rows byte-for-byte.
</details>

- The where gate (`declaredMemberEntry(…, 'any')`) is unchanged. For a
dotted spelling NOT behind the own qualifier it still reads a flat or
verbatim measure key, where the strategies hand that spelling to the
traversal tier; per seat ruling 2 that half keeps objectstack-ai#31878's behaviour
exactly and is not moved here (no first-party measure key mints one:
`mintableMeasureKey`).
- Not folded: objectstack-ai#31878 review nit 3 (the objectstack-ai#31842 changeset lists `an order
key` among narrowed positions). It is a wording fix to an existing,
unreleased changeset, which the delta does not name; left for the seat.
- objectstack-ai#31881 (hand-authored cube related-column 500) is not touched.

## Verification

Head `2c2c10a0` (`3e83c779` + merge of `origin/main` `a15b544d5`; the
merge touches no `service-analytics` file).

<details><summary>Red first, ablation</summary>

- Pins on main source (`git restore --source=ac8fede8` of the three
source files, test kept): `Tests 2 failed | 19 passed (21)`, the two
failing being pins 1 and 2 (`[NativeSQLStrategy] join "os31880_deals" is
not backed …`; `DATABASE_ERROR … no such table: os31880_cube`). Restored
with `git checkout HEAD --`, `git diff HEAD` empty.
- Ablation via `scripts/ablation-replace.mjs`: `cube-member-key.ts`
measure arm replaced by `undefined` (anchor 1 → 0, blob `0edd12a8` →
`8ae80de1`): `Tests 2 failed | 19 passed (21)`, pins 1 and 2 red;
restored, blob == HEAD, `git diff HEAD` empty. Tests import the package
source, so no dist leg.
</details>

<details><summary>Package and gates</summary>

- `pnpm --filter @objectstack/service-analytics test && … typecheck` on
`3e83c779`: `Test Files 214 passed (214)`, `Tests 5152 passed | 332
skipped`; `tsc --noEmit` exit 0 (lock VERDICT command-exit 0).
- eslint (`--no-inline-config`, the package has no `lint` script) on the
four touched source/test files: exit 0.
- After the main merge: `objectql` rebuilt, the harness plus
`cube-qualified-measure-filter.test.ts`: `Tests 28 passed (28)`.
- `dispatch-gates --commands`: 66 families on `3e83c779`, all exit 0;
`--ran` reconciliation: 66 derived, 66 run, 0 NOT-MEASURED, 0 UNRUN.
Re-run on `2c2c10a0`: see the report comment on the card.
- Dogfood battery: n/a (no `!`, no `(narrowing)` arm).
</details>

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic
(not touched).
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; eslint passes on the touched files.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. Patch changeset `.changeset/31880-qualified-measure-filter.md`
with both declaration lines.
- [x] 6. `packages/spec` not touched.
- [x] 7. No hand edits to reference docs, CHANGELOGs or release notes.
- [x] 8. Title, body and comments are in English.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmPssfuxFFm8in9oCRq)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
rajeev-kumar-se pushed a commit to rajeev-kumar-se/objectstack that referenced this pull request Nov 10, 2026
…ts related object lacks answers 400 INVALID_FIELD, not a database error (objectstack-ai#31943)

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi99NaHA8uVthXXC139JxE9ZB)_
Fixes objectstack-ai#31881

Clause-②: no — a 500 becomes the 400 the same input already gets on the
compiled-dataset path; nothing served changes, and no export, error code
or status is added.
Metadata-protocol: none

## 维护者速读

- 改了什么:手写分析立方上,按关联对象并不存在的字段查询(如 `vendor.nope`,或 vendor 没有 region 时的
`vendor.region`),现在在编译前被拒绝为 400 字段无效,并点名成员和关联对象;以前原生 SQL 策略会拼出 JOIN 后报
500 数据库错误。
- 为什么改:同样的输入走编译后的数据集路径早就被同一道关联字段闸门拒为 400;手写立方路径因为没有 include
白名单而跳过了这道闸门。现在两条路径问的是同一道闸门、同一句话。
- 风险与回滚:只放宽闸门的一个提前返回条件,并在调用处传入原生策略本来就执行的白名单;存在的关联字段照常关联和筛选。只动
`@objectstack/service-analytics`,回滚即 revert 本 PR。
- 先看:`packages/services/service-analytics/src/analytics-service.ts` 的
`assertRelationshipColumnsExist`(`!allowed` 不再提前返回)与 `callCtx` 中它的调用处(改传
`getAllowedRelationships`);测试
`dotted-dimension-unbacked-join-parity.test.ts` 末尾新增的 `[objectstack-ai#31881]` 块。
- 两分钟验证:`pnpm --filter @objectstack/service-analytics exec vitest run
src/__tests__/dotted-dimension-unbacked-join-parity.test.ts`,应见 24
个用例全绿,其中末尾 3 个是本卡新加的。
- 需要你做的:无,席位落地。

## What changes

`packages/services/service-analytics/src/analytics-service.ts`, one
gate, no second copy of the rule:

- **The gate** is `AnalyticsService.assertRelationshipColumnsExist`
(objectstack-ai#28558), the related-column gate the compiled-dataset path already asks
in `callCtx`. It returned early when `allowed` (the compiled dataset's
`allowedRelationships`) was `undefined`, which is every hand-authored
cube. It now runs on every cube; the `include`-backed check inside it
(`unbackedRelationshipPath`) runs only when there is an allowlist.
- **The call site in `callCtx`** passes
`reads.getAllowedRelationships(query.cube)`, the allowlist the native
strategy itself enforces for that cube (`cubeReads`: a compiled
dataset's `include`, else the configured `getAllowedRelationships` hook,
else none). So a compiled dataset gets exactly the set it got before,
and on a hand-authored cube with the legacy hook a path the hook does
not back keeps the strategy's own `DATASET_INVALID`, as an unbacked path
keeps `assertDimensionJoinsBacked`'s refusal on the dataset path.
`assertDimensionJoinsBacked` and the draft-preview call site are
unchanged.
- **The refusal** is the gate's own: `INVALID_FIELD` / 400 via
`invalidMemberError`, `member` / `param` / `cube` plus `field` and
`object`, in the dataset path's sentence ("Filter member 'vendor.nope'
on cube 'CUBE' reads field 'nope' through relationship path 'vendor',
which object 'VENDOR' does not have. …"). No new code, status or
envelope.

Reach of the gate (seat ruling 3), measured on `80c4c9a2` and on the fix
with the same harness:

| Input on a hand-authored cube | Native before | Native after |
Engine-aggregate before | Engine-aggregate after |
|:--|:--|:--|:--|:--|
| `vendor.nope` / `vendor.region` as a `where` leaf | 500
`DATABASE_ERROR` | 400 `INVALID_FIELD` (gate) | 400 `INVALID_FIELD`
(cross-object filter refusal) | 400 `INVALID_FIELD` (gate) |
| … as a dimension | 500 `DATABASE_ERROR` | 400 (gate) | 400
`INVALID_FIELD` (engine group-by guard) | 400 (gate) |
| … as a windowed time dimension | 500 `DATABASE_ERROR` | 400 (gate) |
400 `INVALID_FIELD` (cross-object bucket refusal) | 400 (gate) |
| … as a bucketed time dimension | 400 `INVALID_FIELD` (cross-object
bucket refusal) | 400 (gate) | same as native | 400 (gate) |
| `supplier.region` / `supplier.since` (column exists) | served |
served, unchanged | unchanged | unchanged |
| `nope.region` (no relationship field `nope` on the cube's object) |
500 `DATABASE_ERROR` | unchanged | 400 (its own refusals) | unchanged |
| a cube whose `sql` is a statement (`SELECT * FROM deal`), `vendor.*` |
500 `DATABASE_ERROR` | unchanged | 400 / 404 `OBJECT_NOT_FOUND` |
unchanged |

- **Unknown hop** (`nope.region`): the hop resolver names an object
called `nope` (the alias tier), the field probe has no answer for it,
and the gate stands down, as it does on the dataset path. The dataset
path refuses this input through a different gate
(`assertDimensionJoinsBacked`, "traverses relationship path 'nope',
which the dataset does not declare in its include"), which judges the
`include` a hand-authored cube does not have; the related-column gate
itself never refuses it. So per ruling 3 it keeps its native answer
(500); listed in open questions.
- **Raw `sql` cube**: the gate needs the cube's object name and stands
down (`BARE_IDENTIFIER`), unchanged.
- **Engine-aggregate face**: the same inputs were already 400
`INVALID_FIELD`; they now get the gate's sentence (naming the member and
the related object) in place of three different ones.

## Tests

New top-level `describe('[objectstack-ai#31881] …')` at the end of the shared objectstack-ai#28258
harness, `src/__tests__/dotted-dimension-unbacked-join-parity.test.ts`
(real SQLite, `AnalyticsServicePlugin` on both strategies, a
hand-authored cube named apart from its object, no allowlist):

- `vendor.nope` and `vendor.region` (vendor has no `region`) answer 400
`INVALID_FIELD` on the native strategy as a `where` leaf, a dimension
and a windowed time dimension: `code`, `status`, `param`, `member`,
`field` and `object`.
- On both strategies the cube's refusal message equals the compiled
dataset's refusal for the same member (`include: ['vendor',
'supplier']`), with only the cube name differing.
- CONTROL: `supplier.region` still joins and filters (`{region: emea,
count: 2}`) and groups (`apac: 2`, `emea: 1`) on the native strategy.
- objectstack-ai#31878's and objectstack-ai#31899's pins in the same file: unedited and green
(24/24).

**Forced test edit** (one):
`src/__tests__/field-read-admission-gate.test.ts`, "judges only names
the object's field list carries, and every name when that list is
unavailable". Its first leg pinned a hand-authored cube query with
`owner.not_a_field` (a related column the object's field list does not
carry) EXECUTING on the native strategy. That is the input this card now
refuses, so the leg now expects 400 `INVALID_FIELD` naming
`owner.not_a_field` / `fr_owner` / `not_a_field` and nothing executed.
Its claim (the read gate answers no 403 for an unlisted name) still
holds; the second leg (no field list ⇒ 403) is unedited.

<details><summary>Red on main, then ablation (mutation landed via
scripts/ablation-replace.mjs; tests import package source, no dist
leg)</summary>

- **Red on main**: `analytics-service.ts` restored to the `80c4c9a2`
blob (`584d6803`), `-t 31881`: 2 failed | 1 passed (the CONTROL).
`AssertionError: where vendor.nope: The database refused to run a raw
statement. … expected 'DATABASE_ERROR' to be 'INVALID_FIELD'`; `native
vendor.nope: … expected 'DATABASE_ERROR' to be 'INVALID_FIELD'`.
Restored: blob == HEAD.
- **Ablation, skip the gate on the cube path** (`if (!probe || !cube)
return;` → `if (!probe || !cube || !allowed) return;`, i.e. main's early
return): `ok mutation landed: anchor 1 -> 0, blob 9bba336 ->
a829f3584788`. Whole harness file: 2 failed | 22 passed (24), the two
objectstack-ai#31881 400 pins back to `DATABASE_ERROR` (500); every objectstack-ai#28258 / objectstack-ai#31842 /
objectstack-ai#31880 pin green. `ok restored: blob == HEAD (9bba336) and git diff
HEAD is empty`.
</details>

## Acceptance notes

- The bucketed time-dimension row reads "ObjectQLStrategy cannot bucket
a cross-object time dimension" on the NATIVE face on `main` for every
dotted time dimension, `supplier.since` included (an existing column).
That is the native strategy delegating cross-object bucketing
(`cross-object-rebucket.ts`), not this card; recorded only.

## Verification

Head `5be116d2` (fix `c8a7bf76`, changeset `ec72a669`, forced test edit
`2ecf02ad`, merge of `origin/main` `6180c874`).

- `pnpm --filter @objectstack/service-analytics test` on `5be116d2`,
after `turbo run build --filter='./packages/**'` (81/81): Test Files 214
passed (214), Tests 5155 passed, 332 skipped. `typecheck` (`tsc
--noEmit`) exit 0. Lock VERDICT command-exit 0.
- Harness file alone on `2ecf02ad`: 24/24.
- Lint: root `npx eslint --no-inline-config` on the three touched
source/test files, exit 0 (the package has no `lint` script). `node
scripts/check-nul-bytes.mjs` OK.
- Gates: `dispatch-gates --commands` on `5be116d2` derives 69 families
(the same 69 as on `2ecf02ad`); all 69 run on `5be116d2`, each exit 0.
`--ran` reconciliation: "69 derived famil(ies) accounted for — 69 run, 0
NOT-MEASURED". Round 1 on `2ecf02ad`: 69/69 exit 0 after the teardown
self-test's pinned fixture was fetched (first attempt exit 3, the
shallow-clone prerequisite).
- `main` moved 4 commits after the merge (`73bfe10e`); none touches
`service-analytics` or this changeset.
- Dogfood battery: n/a (no `!` in the title, no `(narrowing)` arm).

---
_Generated by [Claude
Code](https://claude.ai/code/session_01ADHkmPfkQkDAAzanWLnAyz)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
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 size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants