Skip to content

Commit e669c1b

Browse files
committed
fix(pm): escape the block-comment terminators in the new prose
The previous commit wrote a literal star-slash inside JSDoc while describing the byte the walker now reads. It closed the comment at that word: the module stopped parsing and `--self-test` exited 1 before reaching a single case. The sequence is spelled with a backslash here, which is what the rest of this file already does, and the push that carried the broken parse is recorded in the report rather than amended away. Claude-Session: https://claude.ai/code/session_01AmH9bKvGoLjiY86Q4Z3og2 Co-authored-by: Claude <noreply@anthropic.com>
1 parent d603731 commit e669c1b

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎scripts/pm/check-widening-tells.mjs‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,15 +1111,15 @@
11111111
* ⛔ A HUNK MAY BEGIN INSIDE A COMMENT, and the flag above must not read that
11121112
* as a guess. The walk starts at the hunk's own first line with no comment
11131113
* state, so a doc comment opened above the hunk has its body read as code — and
1114-
* the ` */` that ends it was being taken for a bare slash. Measured on the same
1114+
* the ` *\/` that ends it was being taken for a bare slash. Measured on the same
11151115
* 250-diff corpus: 21 of the 88 readable T1 stacks went unreadable that way,
1116-
* 21 of 21 raised by ` */`, across 7 diffs — and one of them is an honest
1116+
* 21 of 21 raised by ` *\/`, across 7 diffs — and one of them is an honest
11171117
* #18234 narrowing this file had ALREADY landed a decline for, turned back into
1118-
* a tell. ⇒ a `*/` outside a block comment, on a walk that has opened none of
1118+
* a tell. ⇒ a `*\/` outside a block comment, on a walk that has opened none of
11191119
* its own and raised no flag, is read as what it unambiguously is: the hunk
11201120
* began inside a comment. The frames the comment text pushed are discarded and
11211121
* the walk restarts after it. ⭐ No regex lexer, and no heuristic: outside a
1122-
* string and outside a comment, `*/` is not valid TypeScript.
1122+
* string and outside a comment, `*\/` is not valid TypeScript.
11231123
*
11241124
* ⭐ The same measurement is why a LONE `/` no longer raises the flag either. A
11251125
* regex literal cannot span lines, so a `/` with no second `/` left on its line
@@ -1187,9 +1187,9 @@
11871187
* removed key's place and keeps telling. The place is a textual agreement
11881188
* between two CONTEXT lines, ⛔ never a resolved path.
11891189
* • a hunk whose walk had to guess — a regex literal carrying a bracket, a
1190-
* type-blind pop, an unterminated string, an unexplained `*/` — certifies
1190+
* type-blind pop, an unterminated string, an unexplained `*\/` — certifies
11911191
* nothing from that byte on, and every member after it fires. ⛔ A division
1192-
* and the ` */` of a hunk that began inside a comment are NOT that: both
1192+
* and the ` *\/` of a hunk that began inside a comment are NOT that: both
11931193
* are read, and both are pinned.
11941194
* • T2 is deliberately not extended, with its own overturn condition stated
11951195
* on {@link insideReplacedUniversalAcceptorBag}.
@@ -2358,14 +2358,14 @@ function topLevelMembers(s, open, close) {
23582358
* and division pushes and pops nothing.
23592359
* • a closer whose type does not match the opener it popped.
23602360
* • a string literal that never closes on its line.
2361-
* • a `*/` this walk cannot explain — a second one, or one after the flag is
2362-
* already up. ⛔ The FIRST `*/` on a clean walk is not a trigger at all: it
2361+
* • a `*\/` this walk cannot explain — a second one, or one after the flag is
2362+
* already up. ⛔ The FIRST `*\/` on a clean walk is not a trigger at all: it
23632363
* says the hunk began inside a comment (see the reset below).
23642364
*
23652365
* ⛔ Every reader that SUPPRESSES anything must refuse when the flag is set, and
23662366
* every trigger must be stated wherever this reading is described. A disclosure
23672367
* naming only the division operator — which raises nothing, and occurs zero
2368-
* times on this tree's corpus — while ` */` fired on 24% of readable T1 stacks
2368+
* times on this tree's corpus — while ` *\/` fired on 24% of readable T1 stacks
23692369
* is how the first cut of this flag regressed a landed #18234 decline in the
23702370
* commonest hunk shape there is.
23712371
*

0 commit comments

Comments
 (0)