Repository navigation
Commit 48f5200
docs(spec): record that ADR-0087 entry prose is scanned as source twice (#19676)
Fixes #15130
Clause-②: no
One file, one section: a fourth bullet under the authoring-rules heading
of
`packages/spec/src/migrations/entries/README.md`, plus the `patch`
changeset the
measurement below says is owed. Prose only — no behaviour change, no
mechanical check,
no entry edited.
## The rule that landed, and why the broad wording
> **Entry prose is scanned as source, twice over — never spell a shape a
live textual
> ratchet matches.**
The narrow wording the incident suggests — "quote a retired call site
without its
parentheses" — would make counter-examples of entries that are green
today. What an
author actually controls is not spelling a shape *some* ratchet matches;
the parenthesis
is the instance, and the bullet carries a warning saying so, so that an
existing entry
spelling a parenthesised call is not read as a violation.
The heading moved from "Three rules that are not style" to "Four".
Nothing in the repo
references that heading or its anchor (`git grep`, one hit: the heading
itself).
## What I re-derived before writing it down, and what did not match
**The mechanism — confirmed, live, end to end.** Not transcribed. Two
untracked stand-in
`.ts` files were placed under `packages/spec/src/migrations/`, one
standing for an entry
file and one for the generated registry region it is concatenated into,
each carrying one
parenthesised call spelling of an enumerated method inside a **string
literal**:
| leg | `packages/client` census | verdict |
|---|---|---|
| baseline, clean tree | 20/20 pass, 28 classified sites | exit 0 |
| both stand-ins present | **"expected 30 to be 28"**, 4 tests red |
exit 1 |
| stand-ins removed | 20/20 pass, 28 classified sites | exit 0 |
Two files, one spelling each, `+2` — the doubling, measured. The failure
text named both
files by path and flagged each as "inside the ' literal". Restoration
was proven by
observing state (`git status --porcelain` and `git diff HEAD` both
empty), not by an exit
code. No tracked file was touched in any leg.
Reading the scanner confirms why: `sitesInSource` calls `maskComments`
(comments only —
literals deliberately intact), walks the whole workspace from the repo
root over
`.ts/.tsx/.js/.mjs/.cjs`, and matches on the method name followed by an
opening
parenthesis. `NON_ENTRY_FILES` in the generator excludes `README.md`, so
this edit cannot
reach generation.
**The precedent trap — confirmed in substance, with one correction to
the card.** The
census enumerates four methods only (`analytics.query`,
`analytics.meta`,
`analytics.explain`, `automation.trigger`). Neither `meta.deleteItem`
nor `data.delete`
is among them, which is why the two precedent entries are green — and
the clean-tree run
reports "no counted site sits inside a string, template or regex
literal", so today no
entry's prose is counted at all.
1 parent 408ca2e commit 48f5200
2 files changed
Lines changed: 30 additions & 1 deletion
File tree
- .changeset
- packages/spec/src/migrations/entries
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
79 | 96 | | |
80 | 97 | | |
81 | 98 | | |
| |||
0 commit comments