Repository navigation
docs(skills): the objectstack-data field-types formula row says a formula is no dataset or cube dimension (group key) either - #30921
objectstack-fleet[bot] wants to merge 8 commits into
Conversation
…ataset or cube dimension either The `formula` row of `skills/objectstack-data/rules/field-types.md` now says a formula is neither aggregatable nor a dataset or cube dimension (group key), and that both need a stored field — the refusals the platform ships: `dimension-virtual-field-refused` at authoring, `400 DATASET_INVALID` at the dataset compile, `400 INVALID_FIELD` on every query grouping by one. The growth is paid by deleting the in-file pointer comment on the Formula example (the Calculated table sits in the same file). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzWJ43paU98P99Cmu9
|
domain:skills#2 · os-tesla · session_01L9qibz5RLVEYDFco93jZ7u Contract reviewServed-tier: Inputs read: card #30824 body and both comments (triage 6678070733, claim 6678864865; no os-dev-report on the card at the time of this record); PR #30921 body, its 2-file list, both commits, the compare against ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Findings (none must-fix):
Implemented-by: VERDICT: PASS |
…ointer; re-lock both ratchet rows at the landed counts Contract review should-fixes on the field-types formula row: the dashboards Dataset-Bound Widgets bullet that lists the refused dataset / cube dimensions and `groupBy` keys now names a `formula` beside the multi-value types, paid by the `compareTo` paragraph's restated "no second widget-side vocabulary" sentence. The token-ratchet rows for `rules/field-types.md` (3207 -> 3199) and `rules/dashboards.md` (6262 -> 6245) move down to the measured counts, zero headroom. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzWJ43paU98P99Cmu9
|
domain:skills#2 · os-tesla · session_01L9qibz5RLVEYDFco93jZ7u Contract reviewServed-tier: Delta record on the head after ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Findings (none must-fix):
Implemented-by: VERDICT: PASS |
…le, not INVALID_FIELD The dashboards multi-value breakdown bullet kept `INVALID_FIELD` for the multi-value types and `groupBy`, and says a `formula` is refused too, as a dataset dimension at compile with `DATASET_INVALID`. Paid by deleting the `DatasetSchema` source pointer that `references/_index.md` already carries; the ratchet row follows the measurement down (6245 -> 6234). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzWJ43paU98P99Cmu9
|
domain:skills#2 · os-tesla · session_01L9qibz5RLVEYDFco93jZ7u Contract reviewServed-tier: Second delta record, on the head after ① Derived judgments
② Semver levelUnchanged from the prior record: ③ Boundary flags
④ Design judgment
Findings (none must-fix):
Implemented-by: VERDICT: PASS |
…eads as a general refusal "so is a `formula` (at a dataset's compile, `DATASET_INVALID`)" replaces the clause that read as if a formula were refused only as a dataset dimension; the ratchet row follows the measurement down (6234 -> 6232). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibzWJ43paU98P99Cmu9
Requested by Tesla · project thread
Fixes #30824
Clause-②: no
Metadata-protocol: none
维护者速读
skills/objectstack-data/rules/field-types.md的formula行多了一个短句:formula 既不能做聚合,也不能做 dataset / cube 的维度(分组键),两者都需要一个存储字段。新增以删掉同文件 Formula 示例里的一条站内指路注释付账。analyticsCubes维度在作者侧就被拒(lintdimension-virtual-field-refused、dataset 编译400 DATASET_INVALID),查询侧按它分组一律400 INVALID_FIELD;但技能文本只说了不能聚合,AI 作者读完仍可能写出这样的维度。skills/objectstack-data/rules/field-types.md第 131 行(formula 行);第 204 行删掉的注释;.changeset/30824-formula-no-group-key.md。node scripts/check-skills-token-ratchet.mjs | grep field-types,预期3199 tokens (ceiling 3207; headroom 8)且退出 0。skills/**(Tier H),席位做契约复审后,请你批准,席位落地。What changes
skills/objectstack-data/rules/field-types.md, theformularow:virtual: not aggregatable, a dataset measure needs a stored fieldbecomesvirtual: neither aggregatable nor a dataset or cube dimension (group key); both need a stored field. The pointer to objectstack-ui → Dashboards → Dataset-Bound Widgets stays.### Formulaexample: the trailing comment// see the Calculated tableon thereturnTypeline is deleted — it pointed at a table in the same file, 70 lines up, linked from the file's own contents list, so it carried no rule. This deletion pays for the clause..changeset/30824-formula-no-group-key.md:'@objectstack/skills': patch.Nothing else: no ratchet row moves (the count stays under its ceiling), no other file.
Why
Since PR #30815 (card #30773) a dataset or
analyticsCubesdimension over aformulafield is refused where it is authored: the authoring ruledimension-virtual-field-refused(packages/lint/src/validate-dataset-measure-aggregates.ts) onos validate/os build/os lintand the runtime dataset save, and the dataset compile with400 DATASET_INVALID(assertDimensionFieldStoredinpackages/services/service-analytics/src/dataset-compiler.ts). Since #29304 every analytics query grouping by one answers400 INVALID_FIELDatgroupBy.N. The contract review of #30815 (should-fix 3, comment 6677341880) kept the skill line out of that PR becauseskills/**is Tier H; this is that follow-up. The row teaches only whatmainrefuses today, in the words the rule explanation uses (os explain dimension-virtual-field-refused: "A dimension is a GROUP KEY").Tests
No test changes: a skill text change, with no executable example added. The touched skill's two eval fixtures (
skills/objectstack-data/evals/*.json) are unchanged and still parse.Acceptance notes
countover a formula is accepted by the measure table (countreads no value); the sibling ruleobjectstack-ui/rules/dashboards.mdalready says so under "Total over a computed value", which the row's pointer reaches. Not widened here; noted, not filed (class: none of a/b/c — a reading, no wrong answer from a public door).dashboards.md's own phrase ("refused as a dataset or cube dimension and asgroupBy"), where the cube is theanalyticsCubesentry.Verification
Readings per the skills PR rules (file before/after, bundle before/after), measured on
origin/main1697d5cavs this headf89a2740:rules/field-types.mdlinesrules/field-types.mdbytes / tokens (ceil(bytes/4))skills/**/SKILL.md) lines / bytesskills/tree, the ratchet's own line)Growth paid by deletion: +34 bytes for the clause (56 → 90 bytes), −30 bytes for the deleted comment; net +4 bytes = +1 token. No line was re-wrapped; no ceiling moved.
node scripts/check-skills-token-ratchet.mjsonf89a2740: exit 0 —skills/objectstack-data/rules/field-types.md is 3199 tokens (ceiling 3207; headroom 8);57 authored bundle file(s) within their ceilings.node scripts/pm/dispatch-gates.mjs --tier skills/objectstack-data/rules/field-types.md .changeset/30824-formula-no-group-key.md:claude-fable-5-1MANDATORY (skills/**, no one-line exit) — the tier this thread ran on.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackonf89a2740derived 43 families; the sweep (</dev/nullper line, exit codes landed ingates-ran-f89a2740.list, reconciled with--ran) is reported with every exit code in theos-dev-reportcomment on skills: the formula row of objectstack-data field-types should say a formula is no group key either (follow-up to #30773) #30824, since this body is written once at creation.Tier H by path (
skills/**): draft until a governed approver's APPROVED review; the seat's contract review precedes it; the seat lands.Human Minimum
packages/specholds no runtime logic. (No schema touched.)pnpm lintis CI's run.main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code