Skip to content

Commit d603731

Browse files
committed
fix(pm): the place must stand on CONTEXT lines, and a hunk may begin inside a comment
Round 2 of the at-tier review failed the repaired reading on two NEW findings, both reproduced here from git-emitted diffs before anything was written. F1 — the place predicate compared opener + head TEXT, which is identity only while the two lines are the same line. Two KEYLESS parents can spell their opener identically: discriminatedUnion arms, tuple members, `.or()`/`.and()` arguments. A `filter: z.unknown()` removed from arm a (a context line) and a `filter: strictObject({ newKey })` added to arm b (an added line respelled to the same text — a trailing comment is enough) compared EQUAL, and arm b is a strict object that could not accept `filter` before. Frames now carry the KIND of the line they stand on and `samePlace` requires CONTEXT on both sides: a context line is one line shown twice; an added line against a removed line is two lines. The re-declared bag itself never reaches the test, because `framePlace` drops the frame's own line. F2 — the flag's dominant trigger was undisclosed and regressed a landed #18234 decline. A walk starts at its hunk's first line with no comment state, so a JSDoc opened above the hunk had its body read as code and the ` */` that ends it was taken for a bare slash: 21 of 88 readable T1 stacks on the corpus, 21/21 raised by ` */`, zero by a regex or a division. A `*/` outside a block comment, on a walk that has opened none and raised no flag, is now read as what it unambiguously is. And a LONE `/` no longer raises anything: a regex literal cannot span lines, so a `/` with no second `/` on its line is arithmetic. Both discriminations are sound and neither needs a regex lexer. The header now names every trigger the flag has. Claude-Session: https://claude.ai/code/session_01AmH9bKvGoLjiY86Q4Z3og2 Co-authored-by: Claude <noreply@anthropic.com>
1 parent fa8321b commit d603731

1 file changed

Lines changed: 267 additions & 30 deletions

File tree

0 commit comments

Comments
 (0)