Skip to content

Commit d5106ae

Browse files
docs(adr): ADR-0048 §5 describes the namespace-prefix lint as it now ships (#30988)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9D9HSxC7WngZADjXgb6UHCVp)_ domain:devx#1 · os-elon-musk · session_016WV4cyadQ5Zhih2y1GNTQm Fixes #30804 Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:只改 ADR-0048 §5 的一条 lint 说明,让它与已发布的 `naming/namespace-prefix` 一致。 - **为什么改**:原条目还写着「只查 7 类、只豁免同名 app 和 `sys_`」;#30842 与 #30927 合并后已不是这样。 - **风险与回滚**:纯文档,不发布任何包(`skip-changeset`)。回滚即 revert。 - **先看**:`docs/adr/0048-cross-package-metadata-collision.md` 的 §5 第一条。 - **两分钟验证**:对照 `packages/cli/src/commands/lint.ts` 的 `NAME_JUDGED_ELSEWHERE`、`carriesPackageNamespace` 和 `PLATFORM_REQUESTED_BARE_NAMES` 读一遍新条目。 - **需要你做的**:这是 `docs/adr` 的 Tier H 改动,需要 os-zhuang 或 hotlong 批准后合并。 ## What changes ADR-0048 §5's first bullet described the old `naming/namespace-prefix`: a warning on seven types (`app`, `page`, `dashboard`, `flow`, `action`, `report`, `dataset`) that exempted only the namespace-named app and `sys_` names. It now describes the rule as it ships after #30842 and #30927: - it warns on every bare package-authored top-level name in every manifest collection, and gives the rename as its `fix`; - it leaves objects (`defineStack` refuses those), views, docs (`docs/namespace-prefix`), extensions, translation bundles, fields, `functions` and `overrides` items to other checks; - a name carries the namespace when it is the namespace itself (ADR-0019), starts with `<ns>_`, is a `<ns>.<short>` capability name, or starts with `sys_`; - the permission set `guest_portal` is exempt, because the public form doors request it by that bare name (ADR-0138), and the exemption is named `PLATFORM_REQUESTED_BARE_NAMES`; - it still reports a name declared twice in one package, it is warning-only, and the refusal is phase 3 (#30806). The bullet links both maintainer rulings it rests on: - dotted capability names carry the namespace, 2026-11-06T11:08Z, recorded in [#30804 comment 6683456244](#30804 (comment)); - `guest_portal` is exempt, 2026-11-06T14:57Z, recorded in [#30804 comment 6687835712](#30804 (comment)). No other line of the ADR changes. Its status, decision and addenda are untouched. ## Why Ruling C on #30798 (maintainer, verbatim 「同意 c」): every package-authored metadata name carries its namespace, phased. Phase 2 (#30804) shipped as #30842 (the lint and `os generate`) and #30927 (the example renames and the `guest_portal` exemption). This one-file PR brings the ADR's phasing list in line and closes the card. ## Acceptance notes - **Tier H.** This touches `docs/adr/**`, so it needs a governed approver (os-zhuang or hotlong). Auto-merge is not armed. - **Changeset:** none. It is a docs-only PR and releases nothing, so it carries the `skip-changeset` label. - **Two other sentences in the ADR mention the rule and stay as written.** §3.4 item 4 (the `os lint` rule "keeps authoring hygiene") and the paragraph after it (a package shipping two `page/home` items "stays covered by the `naming/namespace-prefix` lint") are both still true. ## Verification - Every identifier the bullet names exists on `main` at `9d313f3ac`: `NAME_JUDGED_ELSEWHERE`, `carriesPackageNamespace` and `PLATFORM_REQUESTED_BARE_NAMES`. - Local gates: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` at `3329301de` derived 21 commands. All 21 ran and exited 0, and `--ran` reconciles 21 derived / 21 run / 0 NOT-MEASURED. <details><summary>Gates run at 3329301 (21)</summary> ```text node scripts/check-adr-links.mjs :: exit 0 node scripts/check-adr-links.mjs --self-test :: exit 0 node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0 pnpm check:adr-anchors :: exit 0 pnpm check:adr-index :: exit 0 pnpm check:adr-symbol-anchors :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:closed-ceremony-text :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:doc-authoring :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-prior-rulings :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` </details> ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (`packages/spec` not touched.) - [x] 2. Every name I added uses the casing for its kind. (No names added.) - [x] 3. No formatter ran; `pnpm lint` passes. (Markdown only.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here. (Publishes nothing: `skip-changeset`.) - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (n/a) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cyadQ5Zhih2y1GNTQm --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent dfa179a commit d5106ae

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

‎docs/adr/0048-cross-package-metadata-collision.md‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,25 @@ alias is optional and out of scope for the phases below.
333333
Status legend: **[done]** shipped · **[proposed]** not yet built ·
334334
**[deferred]** out of scope here.
335335

336-
- **[done]** Authoring lint: `naming/namespace-prefix` in `os lint` (warns on
337-
non-prefixed `app`/`page`/`dashboard`/`flow`/`action`/`report`/`dataset`;
338-
exempts the namespace-named app per ADR-0019 and `sys_` names; warning-only).
336+
- **[done]** Authoring lint: `naming/namespace-prefix` in `os lint` warns on
337+
every bare package-authored top-level name in every manifest collection of a
338+
package that declares `manifest.namespace` (a package without one is not
339+
judged), and gives the rename as its `fix` (ruling C on #30798, #30804). It
340+
does not judge objects (`defineStack` refuses those), views (named for their
341+
object), docs (`docs/namespace-prefix`), extensions, translation bundles,
342+
fields, `functions`, or an item that declares `overrides`. A name carries the
343+
namespace when it is the namespace itself (the namespace-named app per
344+
ADR-0019), starts with `<ns>_`, is a dotted `<ns>.<short>` name, the
345+
capability shape (maintainer ruling 2026-11-06T11:08Z, recorded in
346+
[#30804 comment 6683456244](https://github.com/objectstack-ai/objectstack/issues/30804#issuecomment-6683456244)),
347+
or starts with `sys_`. The permission set `guest_portal` is exempt, because
348+
the public form doors request it by that bare name (ADR-0138; maintainer
349+
ruling 2026-11-06T14:57Z, recorded in
350+
[#30804 comment 6687835712](https://github.com/objectstack-ai/objectstack/issues/30804#issuecomment-6687835712);
351+
`PLATFORM_REQUESTED_BARE_NAMES`). The rule also reports a name declared
352+
twice in one package among its apps, pages, dashboards, flows, actions (per
353+
`objectName`), reports and datasets. It is warning-only; the refusal is
354+
phase 3 of the same ruling (#30806).
339355
- **[done] Phase 1 — install-time namespace gate.** `NamespaceConflictError` +
340356
the gate in `SchemaRegistry.installPackage` (refuses a package whose
341357
`manifest.namespace` is already owned by a different installed package;

0 commit comments

Comments
 (0)