Repository navigation
Commit d69f7e1
docs(cli): record what docs/duplicate-name rests on after ADR-0048 §3.4 — no rule change (#19352)
Fixes #19248
Clause-②: no
A card about a **justification**, not about a rule.
`docs/duplicate-name` refuses two owners
declaring one doc name; the claim it used to be explained by — *"one
registration overwrites the
other"* — was retired by ADR-0048. This PR quotes the ADR, sets it
beside what the rule's message
and docblock actually say today, and records the verdict.
⛔ **Nothing is relaxed.** No rule, message, severity or accept set
moves. The at-tier reviewer's
words on the originating flag were *"file it, do not relax it here."*
---
## 1. ADR-0048 §3.4 — verbatim
Read from `docs/adr/0048-cross-package-metadata-collision.md` at this
branch's base
`13d52947d8`. The section **still exists under that number** and still
carries the clause, so
nothing had to be substituted for it. Reproduced whole, unedited:
```text
### 3.4 Per-item cross-package detection retires; same-package overwrite stays
The original proposal's per-item guard threw `MetadataCollisionError` whenever
two **different** packages registered the same `(type, name)`. Under
package-scoped resolution that is exactly the case we now *support*: package
ids are always distinct, so prefer-local always disambiguates two different
packages — there is no unresolvable cross-package clash to detect. The
cross-package **throw is retired**; two distinct packages coexist on the same
bare name by construction.
What remains is the narrow, genuinely-ambiguous case the guard still earns its
keep on: **a write with no real package provenance** (a `sys_metadata`/runtime
overlay) is governed by the ADR-0005 overlay precedence (artifact-vs-DB warning,
unchanged), and **same-package re-registration** simply overwrites (idempotent
reload). Authoring-time hygiene — an author shipping two `page/home` in one
package — stays covered by the `naming/namespace-prefix` lint in `os lint`.
```
ADR-0048's header reads **Status: Revised (2026-06-13)**, and §5 files
Phase 2 (backend) as
`[done]`, repeating the same retirement: *"The per-item **cross-package
throw is retired**
(§3.4) — two distinct packages coexist on the same bare name."*
## 2. What `docs/duplicate-name` asserts today
The rule fires from two sites in
`packages/cli/src/utils/collect-docs.ts`.
**a. Within one owner** — `lintDocs`:
```ts
message: `Duplicate doc name "${doc.name}" (inline defineStack docs and src/docs/*.md files share one namespace).`,
```
**b. Across owners** — `lintDocNamesAcrossOwners`, the arm the
per-package split (#18431 / #18962)
had to preserve:
```ts
message: `Doc name "${name}" is declared by ${labels.join(' and ')}. One artifact may not ship one doc name twice — rename one. Doc names are namespace-prefixed for authoring hygiene, and ADR-0130 D1 lets packages of one artifact SHARE a namespace, so the prefix does not keep these apart.`,
```
Its docblock already declined the retired claim **by name**, before this
card:
> 1 parent 2b3eb17 commit d69f7e1
2 files changed
Lines changed: 60 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
937 | | - | |
938 | | - | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
939 | 954 | | |
940 | 955 | | |
941 | 956 | | |
| |||
0 commit comments