Skip to content

Commit fb5c42d

Browse files
docs(lint): state where the dataset vocabulary advisory's reach ends (#34943)
<!-- claude-projects-attribution: {"github_login":"os-support-ai"} --> _Requested by **Yibo Wang** · [project thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwBLW6dHPW6sSheA32XPKZzPV)_ Fixes #34875 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:只在 `dataset-member-no-vocabulary` 规则的模块注释「Severity and doors」一节末尾加了一段话,说明该规则的覆盖范围到哪里为止。没有任何行为变化。 - 为什么改:平台自带的 System Overview 数据集(7 个成员没有同义词和描述)在 `os lint` 下零告警,卡片要求说明这是设计如此还是规则看不见。读数结论:插件在内核启动时注册的元数据不经过规则运行的任何入口,这一点以前没有写在规则旁边。 - 风险与回滚:无运行时风险,纯注释;注释不进 `dist`(已构建实测),无需 changeset。回滚即 revert 本 commit。 - 先看:`packages/lint/src/validate-dataset-member-vocabulary.ts` 模块注释最后一段(新增 7 行)。 - 两分钟验证:`git show c0a15a0 --stat` 应只见这一个文件 +8 行;读新增段落,核对 `packages/plugins/plugin-auth/src/auth-plugin.ts` 中 `datasets: SystemOverviewDatasets` 一行。 - 需要你做的:无,席位落地。 ## What changes One paragraph appended to the "Severity and doors" section of the module note in `packages/lint/src/validate-dataset-member-vocabulary.ts`. It states where the rule's reach ends: metadata a plugin contributes at kernel start, such as the platform's System Overview datasets that plugin-auth registers through its runtime manifest (`datasets: SystemOverviewDatasets`), is neither an authored stack nor a publish-door write, so the advisory never reads it. It also states what such a shipped dataset answers to: its name, its label as the platform's translation bundle gives it in the caller's locale, and no synonym unless its source writes one. This is outcome (b) of the card's reading. Comment only, no behaviour change. Each fact was checked against `origin/main` at `d576509c8` before it was written: - `packages/plugins/plugin-auth/src/auth-plugin.ts:1164` carries `datasets: SystemOverviewDatasets`, inside the manifest `register(...)` call at line 1122 in `init()` (which spans lines 769 to 1219). It is the only registration site: `git grep SystemOverviewDatasets` hits that file, the platform-objects barrel, the definition and one test. - `packages/platform-objects` has no `objectstack.config.*`: `git ls-files packages/platform-objects | grep objectstack.config` answers exit 1. Control: the same command over `packages/plugins/plugin-auth` lists its `objectstack.config.ts`. - plugin-auth's `objectstack.config.ts` passes only `manifest`, `objects` and `objectExtensions` to `defineStack`. There is no `datasets`. - `packages/platform-objects/src/apps/dashboards/system.datasets.ts` declares no `synonyms` and no `description` on any member. - The matcher (`service-analytics/src/dataset-term-matcher.ts`) compares name, label and synonyms. Both MCP doors pass the dataset list through `translateMetaList` before matching (`runtime/src/domains/mcp.ts`, `mcp/src/stdio-data-bridge.ts`), and `platform-objects/src/apps/translations/en.ts` carries `datasets.SYS_NAME.{measures,dimensions}.MEMBER.label` keys for all seven members. ## Tests <details><summary>lint package build + typecheck (head c0a15a0)</summary> ``` os-verify-lock: VERDICT command-exit 0 · held the lock 117s · waited 154s pnpm --filter '@objectstack/lint^...' build && pnpm --filter @objectstack/lint build && pnpm --filter @objectstack/lint typecheck check:test-typecheck: OK — @objectstack/lint's test layer compiles under packages/lint/tsconfig.test.json ``` </details> No unit test was added and no ablation was run. The diff is a comment, so there is no tested behaviour to pin. ## Acceptance notes - **Changeset: none, label `skip-changeset`.** The comment does not ship. After `pnpm --filter @objectstack/lint build`, `grep -rl 'Its reach ends at those doors' dist` gives exit 1. The module docblock it extends also gives zero hits (`What the two keys are read for`, exit 1), so module docblocks are not emitted at all. Positive control: `dataset-member-no-vocabulary` is found in `dist/index.cjs`, `dist/runtime.js` and `dist/rule-explanations.cjs`. `files[]` is `["dist","README.md","CHANGELOG.md"]`. - Outcome (a), giving the seven members `synonyms` and a `description`, was not done. The reading on the card says what it would cost: translatable description keys in every locale bundle, and a move in the i18n-coverage baseline. ## Verification <details><summary>dispatch-gates --commands for the one path, 45 families (head c0a15a0)</summary> `--ran` reconciliation: `45 derived famil(ies) accounted for — 42 run, 3 NOT-MEASURED (3 DERIVED from a recorded exit 3)`. All 42 measured families exited 0, including `check-issue-citations` (`no issue citations added against d576509`), `check:nul-bytes` (`OK ... no raw ASCII control bytes`), `check:doc-authoring`, `check-affected-docs`, `check-drift-comment` and `check:published-files`. NOT MEASURED, each exit 3 on its own prerequisite. These are left to CI's `Lint & Repo Gates`: - `check-plugin-teardown-shape.mjs --self-test`: the positive control is pinned to a commit this shallow clone cannot reach. This only checks the checker itself. - `check:dual-build-cjs-loads`: it needs every package's `dist/`, and 99 were absent. The gate covers the whole tree, and building all of it for a comment would have been out of proportion. - `check:lean-entry-closure`: it needs `packages/objectql/dist`, which is not in the lint closure. `overlap-check`: `VERDICT clean exit 0`. The branch merges cleanly with origin/main, and no open PR touches the same file. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir)_ repo:objectstack#3 · os-support-ai · session_01WGufzg1NmbJpZhtiWQkTir --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
1 parent 2ce9c7f commit fb5c42d

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎packages/lint/src/validate-dataset-member-vocabulary.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@
4444
* advisory on the save response, never a refusal. Reads only the dataset's own
4545
* members, so it is safe on a pre- or post-parse stack and on the per-write
4646
* snapshot.
47+
*
48+
* Its reach ends at those doors. Metadata a plugin contributes at kernel
49+
* start, such as the platform's System Overview datasets that plugin-auth
50+
* registers through its runtime manifest (`datasets: SystemOverviewDatasets`),
51+
* is neither an authored stack nor a publish-door write, so the advisory never
52+
* reads it. A dataset the platform ships answers to its name and to its label
53+
* as served in the caller's locale: the one translation-bundle label resolved
54+
* along the resolver's locale chain (the requested locale by the platform
55+
* locale ladder, variant expansion included, then the deployment's declared
56+
* fallback locale, skipped when the caller's locale is the authored one), or
57+
* the authored label where the bundle carries none. It answers to no synonym
58+
* unless its source writes one.
4759
*/
4860

4961
import { collectionEntries } from './collection-entries.js';

0 commit comments

Comments
 (0)