Repository navigation
Commit 2326eab
fix(lint): ADR-0087's prescription detector reads a rewrite whose TO side is an instruction (#18834)
Fixes #18745
ADR-0087's `no-migration-prescription` detector missed a framed FROM →
TO line again, so
an exemption the categories inherit can be held by SILENCE rather than
by a finding. This
adds the one arm that was missing, answers the three questions the claim
could not, and
hands back the one reading that is not this PR's to act on.
This is ⛔ NOT a defect in PR #18736. That PR's exemption rests on four
positively
verified predicates and the gate printed `-- verified`. What recurred is
the INSTRUMENT.
Clause-②: no — one repo gate script, no published byte moves (measured
below).
## Q1 — which spelling was missed, beside the branch that should have
caught it
Anchored on SYMBOLS and reported where they actually are. In
`scripts/check-adr-0087-registration.mjs`: `findMigrationPrescription`
is at **:1562** on
`origin/main` and at **:1685** on this branch. The card's `:204-214` for
the header
paragraph is NOT stale — `That argument is correct and it was accepted`
really does open
at **:204** on `origin/main`, and still does here (this PR appends its
cross-reference
after that paragraph rather than editing it).
```
MISSED: **Migration — `api: { … }` → delete the property.** .changeset/18318-evalcontext-no-query-api.md
BRANCH: 2, `framed-line` (REWRITE_RE under MIGRATION_FRAMING_RE)
```
Predicate by predicate on that one line, each with its own non-zero
control:
| predicate | on the missed line | non-zero control |
|---|---|---|
| `MIGRATION_FRAMING_RE` | `true` | `false` on `plain prose` |
| FROM side is an `OPERAND` | `true` (a backticked span) | — |
| an `ARROW` is present | `true` | — |
| `REWRITE_RE` (needs an `OPERAND` on BOTH sides) | **`false`** | `true`
on the same line with `` `os.exists` `` as the TO side |
So it failed on exactly ONE predicate. `delete the property` is an
INSTRUCTION, not a
name — and `OPERAND` is a backticked code span or a dotted/slashed
identifier path. A
removal has no new name to put on the right, so the most careful
prescription an author
can write for one is invisible to every arm.
## Q2 — the #8277 miss in the gate's header is a DIFFERENT hole
Measured on `fc71b84:.changeset/lucky-schools-smash.md` through the
exported detector.
| | #8277 (the header's case) | #18745 (this round) |
|---|---|---|
| the prescription | `read` `` `result.driverFault?.message` `` `where
you read` `` `result.error` `` | `` `api: { … }` `` → `delete the
property` |
| arrow on that line | no | yes |
| migration framing on that line | no | yes |
| FROM side an operand | n/a — no pair at all | yes |
| what it fails on | there is no rewrite PAIR to match | the TO side is
not an operand |
| after this PR | still `null` | `framed-removal` |
#8277 is the **IMPERATIVE-SENTENCE** residue this gate's own header
already lists as
deliberate ("no arrow, no table, just …"), and this PR does not move it
one inch. RM11
and RM12 pin that in the self-test, so a later author widening toward it
argues with a
red test rather than with prose. Closing the second hole does not close
the first, and a
repair that claimed to would be the over-matching criterion the residue
paragraph says to
falsify before implementing.
## Q3 — does tightening red the existing changeset stock? ONE reading,
handed back
Measured over the 414 changesets in `.changeset/` at `origin/main`:
```
BEFORE hits 28 / 414 {framed-line: 1, from-to-label: 25, header-framed-table: 2}
AFTER hits 29 / 414 {framed-line: 1, from-to-label: 25, header-framed-table: 2, framed-removal: 1}
```
Exactly one row moves, and it is the card's own:
`18318-evalcontext-no-query-api.md`,
`null` → `framed-removal`. It holds `not-required
(runtime-interface-only …)`, a category
that INHERITS the prescription refusal, so it WOULD be refused if the
gate re-judged it.
It does not today: this gate judges only changesets a diff adds or
modifies, and this PR
touches none. `pnpm check:adr-0087-registration` is green on this
branch.
1 parent 631dcbd commit 2326eab
1 file changed
Lines changed: 289 additions & 2 deletions
0 commit comments