Skip to content

feat(spec): offer dataset member synonyms and description on the dataset form - #31845

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

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-sb4zrd

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Fixes #31660

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:Studio 数据集表单的维度与度量行,新增「同义词」「描述」两列(ADR-0149 D1),附说明文字与 10 种语言译文;删掉对账测试里这四个键的 4 条 omit 行。
  • 为什么改:这两个键早已可写,service-analytics: list_datasets / query_dataset AI tools with the D3 selection rule and provenance (ADR-0149 D2-D4) #31589 落地后已被数据集 AI 工具读取(liveness 均为 live),但在 Studio 里建的数据集没有入口填写,AI 问数的命中率因此打折。
  • 风险与回滚:只动表单布局、翻译包与测试计数,不动 schema;回滚即 revert 本 PR。同义词输入沿用行编辑器现有的逗号分隔输入,含逗号的短语无法录入。
  • 先看:packages/spec/src/ui/dataset.form.ts(四行新增与说明文字);packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts(译文);packages/spec/src/system/metadata-form-zod-reconciliation.test.ts(删的四行)。
  • 两分钟验证:pnpm --filter @objectstack/spec exec vitest run src/system/metadata-form-zod-reconciliation.test.ts,预期全绿;Studio 打开任一数据集,维度/度量行里出现「同义词」「描述」。
  • 需要你做的:无,席位落地。

What changes

  • packages/spec/src/ui/dataset.form.ts: the dimensions and measures repeaters each offer synonyms and description as row properties, label equal to the item schema's .meta({ title }), with help text: synonyms are the words people use in a question, matched by the dataset AI tools and never shown (at most 20, each at most 60 characters, one member per word); description is a plain-language business definition, published with the analytics metadata and read by the dataset AI tools, never a prompt (at most 500 characters).
  • packages/spec/src/system/metadata-form-zod-reconciliation.test.ts: the four kind: 'omit' rows for dataset × dimensions/measures × synonyms/description are removed (their reason, "planned, not yet read", stopped being true when the readers landed; packages/spec/liveness/dataset.json marks all four live).
  • packages/platform-objects/src/apps/translations/*.metadata-forms.generated.ts: regenerated with node scripts/check-i18n-bundles.mjs --write, then the eight new leaves hand-translated in the nine translated locales (values only); re-running --write dropped their source-hashes entries except fr's two Description cognate leaves, which the generator records as copies, matching the dataset's existing root description entry.
  • ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts: the zh-CN mirror carries the same four rows.
  • Two count pins in packages/platform-objects/src/apps/translations/: the zh-CN positive control 733 to 737 (four row labels) and DATASET_LEAVES 40 to 48 (four rows, label plus help text).
  • Changeset 31660-dataset-member-vocabulary-form.md: @objectstack/spec and @objectstack/platform-objects patch.

The row editor (SchemaForm repeater) derives each row property's widget from the item schema: synonyms (array of strings) renders as the comma-separated string-list input, description (I18nLabel) as the same control label already uses. No type/widget is set on the rows, per the existing row-property convention.

Tests

  • @objectstack/spec: vitest run src/system/metadata-form-zod-reconciliation.test.ts src/ui/ green (180 files, 6360 tests).
  • @objectstack/platform-objects: full vitest run green (120 files, 1932 tests) after the two pin updates; before them, three reds named exactly the new rows (two counts, one fr en-echo, fixed by "Description de la dimension / de la mesure" as the fr precedent spells sibling rows).
  • node scripts/check-i18n-bundles.mjs: all bundles in sync.
  • ui/: node scripts/check-i18n-en-drift.mjs 0 findings.

Acceptance notes

  • synonyms entry inherits the repeater's comma-separated input: a synonym containing a comma cannot be typed in Studio (it can in code). Noted, not filed: no shipped synonym needs a comma.

Verification

All readings on head 09425f66 (after merging origin/main ad622d30 through scripts/pm/os-regen-merge.sh; nothing to regenerate):

Derived gates: 87 of 87 run, all exit 0

node scripts/pm/dispatch-gates.mjs --ran FILE answers: 87 derived families accounted for, 87 run, 0 NOT-MEASURED. check-plugin-teardown-shape --self-test first exited 3 (shallow clone missing its fixture commit), passed after fetching it. The 85 unlocked families ran before the merge of main (which touched no file in this diff); after the merge: check-i18n-bundles in sync, @objectstack/spec check:generated all 14 artifacts up to date, @objectstack/platform-objects 120/120 files, @objectstack/spec reconciliation + src/ui/ 180/180 files.

ui

pnpm --dir ui exec vitest run scripts/: 170 passed, 2 skipped (172 files). metadata-form-i18n.test.ts plus the two SchemaForm tests that read the zh-CN mirror: 3/3 files, 46 tests. node scripts/check-i18n-en-drift.mjs: 0 findings. Not run locally: the whole app-shell vitest and type-check (CI Test UI / Type Check UI).

Dogfood battery: n/a (no ! in the title, no narrowing arm).


Generated by Claude Code

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation protocol:system protocol:ui 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

4 anchor(s) derived from 2 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

Coarse fallback — 171 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 cc16008a1221cc0f676240c84a6b1a8285a38076 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from bc24f108b5a3203b855447b696154597eb805147 — the merge of head 09425f66f9a81a0461547258dd14ddb406c78a00 into base cc16008a1221cc0f676240c84a6b1a8285a38076, 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 bc24f108b5a3203b855447b696154597eb805147 && git checkout bc24f108b5a3203b855447b696154597eb805147
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin cc16008a1221cc0f676240c84a6b1a8285a38076 09425f66f9a81a0461547258dd14ddb406c78a00 && git checkout -B drift-repro cc16008a1221cc0f676240c84a6b1a8285a38076 && git merge --no-ff 09425f66f9a81a0461547258dd14ddb406c78a00

node scripts/docs-audit/affected-docs.mjs --json cc16008a1221cc0f676240c84a6b1a8285a38076

⚠️ 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:spec#2 · zhuangjianguo · session_01QsR2jUe9c6YdtNkrzUnMUd

维护者速读

  • 改了什么:Studio 数据集表单里,维度和度量的每一行新增「同义词」和「描述」两个输入项,配说明文字和 10 种语言的译文。对账测试里这四个键原来的 4 条 omit 行一并删掉。
  • 为什么改:这两个键早就能在代码里写,service-analytics: list_datasets / query_dataset AI tools with the D3 selection rule and provenance (ADR-0149 D2-D4) #31589 落地后数据集 AI 工具也已经在读(liveness 四行都是 live)。但在 Studio 里建的数据集没有地方填,AI 问数就认不出业务用语。
  • 风险与回滚:只动表单布局、译文包和两个测试计数,schema 和校验不变,main 上能保存的数据集照常保存。已知限制:同义词沿用行编辑器的逗号分隔输入,所以含逗号的短语只能在代码里写。回滚就是 revert 本 PR。
  • 先看:packages/spec/src/ui/dataset.form.ts 里新增的四行和说明文字,再看 zh-CN.metadata-forms.generated.ts 的译文。
  • 两分钟验证:运行 pnpm --filter @objectstack/spec exec vitest run src/system/metadata-form-zod-reconciliation.test.ts,应全绿。在 Studio 打开任一数据集,维度和度量行里应出现「同义词」「描述」。
  • 需要你做的:无。不属受管面,由本席落地。
  • 席位意见:建议合。CI 全绿;说明文字里的上限(20 个、每个 60 字符、500 字符、一词只对应一个成员)和 dataset.zod.ts 的实际校验一致;「从不显示 / 随分析元数据发布」两句和 liveness 证据一致。

席位核对 · ACCEPT · 2026-11-09T07:22Z · head 09425f66f9a81a0461547258dd14ddb406c78a00

Seat domain:spec#2 reviewed the diff of its own dispatch: claim 6733331759 on #31660, card thread session_01QsR2jUoJGXXRKQk9ypaq82, report 6734111510. Everything below was checked against GitHub and a local checkout, not taken from the report.

  1. Shape
    • 17 files, +200 / -34. Draft, base main, and the body opens with Fixes #31660.
    • Source changes: spec/src/ui/dataset.form.ts gains four row properties. The zh-CN mirror ui/packages/app-shell/.../metadata-form-zh-cn.ts gains the same four rows.
    • Regenerated: the 10 locale bundles platform-objects/.../*.metadata-forms.generated.ts. Values are hand-translated; only the eight new leaves change.
    • Tests: the four reconciliation omit rows are removed, and two count pins in platform-objects move. Those pins are the claim-accepted edits: 733→737 is four row labels, and 40→48 is four rows × label + help text.
    • One changeset: @objectstack/spec and @objectstack/platform-objects, both patch.
    • Every file is inside the claim's surface. git merge-tree against origin/main is clean.
  2. Premise. It held when the card was claimed, and it holds on this head.
    • liveness/dataset.json marks dimensions.{synonyms,description} and measures.{synonyms,description} as live. That was flipped on 2026-11-09 by service-analytics: list_datasets / query_dataset AI tools with the D3 selection rule and provenance (ADR-0149 D2-D4) #31589.
    • The readers are service-analytics matchDatasetTerms / createDatasetTools, and compileDataset → getMeta for description.
    • With the readers live, the omit rows' stated reason ("planned, not yet read") is no longer true.
    • The help text states the same limits the schema enforces: DATASET_MEMBER_SYNONYMS_MAX 20, DATASET_SYNONYM_MAX_LENGTH 60, DATASET_MEMBER_DESCRIPTION_MAX_LENGTH 500, and the cross-member collision refinement.
    • "Never shown" is correct for synonyms: per the liveness note, compileDataset does not copy them onto the Cube. "Published with the analytics metadata" is correct for description, via getMeta.
  3. Gates and check-runs
    • On this head: 0 red; every run is success or skipped.
    • check-expected-skips --pr 31845: OK, 10 skipped, every one in main's roster (exit 0).
    • Dev's run: dispatch-gates --ran 87/87 exit 0, check-i18n-bundles in sync, ui check-i18n-en-drift 0 findings.
  4. Accepted deviations
    • The two count-pin edits in platform-objects (accepted when the dev raised them).
    • fr's two Description cognate leaves stay recorded as copies in source-hashes. That matches the dataset's existing root description entry.
    • No widget or type is set on the rows. The repeater derives one from the item schema, which is the existing row-property convention.
  5. Out of scope and Skills-docs
  6. Landing
    • check-governed-merges --pr 31845: NOT governed. 0 of 17 paths hit the register, and 234 lines is under 3000.
    • Clause-②: no, Metadata-protocol: none. A form layout neither widens nor narrows an accept set, so no contract review at CONTRACT_REVIEW_TIER is owed. This seat's own read is the review of record.
    • Ordinary queue landing: this seat flips the PR to ready and arms auto-merge.
    • On merge, Fixes closes Studio: author a dataset member's synonyms and description in the dataset form (ADR-0149 D1) #31660 and this seat posts the landing note.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 9, 2026 07:23
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge November 9, 2026 07:23
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 7e697ff Nov 9, 2026
67 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-sb4zrd branch November 9, 2026 07:53
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 protocol:system protocol:ui 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

Development

Successfully merging this pull request may close these issues.

Studio: author a dataset member's synonyms and description in the dataset form (ADR-0149 D1)

1 participant