Repository navigation
fix(reconstruction): recognize backtick identifier lists - #1073
Conversation
Signed-off-by: AJ Banerjee <anuragb2010@gmail.com>
aca581d to
16d8be1
Compare
rng1995
left a comment
There was a problem hiding this comment.
[SkillSpector Review]
Approve at 16d8be119763483365c16cfb3a45127b9c24ab14.
Value and readiness: The change addresses the documentation false positives described in #868/#515: the closing backtick in an identifier such as biome-ignore must not open a removal marker. The additional backward lookup is bounded by MAX_DIRECTIVE_HEADER_CHARS, accepts only identifier characters, and retains the existing following-quoted-item check. Immediate openers preserve multiword quoted verbs; filler-bearing and explicit/passive/replacement directives retain their existing paths. The new positive and negative controls cover these distinctions. Ready from this review.
Material findings: None.
PIC tradeoffs: None.
Verification and gaps: Reviewed the complete two-file diff, surrounding exact-head reconstruction logic, added tests, both linked issues, and cutoff discussion/review/thread history (empty). Hosted CI run 42581353973 is attributed to this exact head; its test-unit log reports 20,991 passed, 24 skipped, 258 deselected and 4 xfailed, with the reconstruction test module included. The six reported CI checks succeeded. This was a static review; no contributor code, tests, imports, builds or setup were executed locally. Author-reported local and integration results were not independently reproduced.
Summary
Backtick-quoted identifiers such as
biome-ignorefollowed by another quoted identifier are misread as removal instructions. The fallback parser treats the closing backtick as a marker opener and reconstructs the intervening comma and space.Changes
Extend the existing quoted-string-sequence guard to bounded backtick identifier prefixes. Preserve immediate openers, including quoted multiword verbs, and leave filler-bearing and explicit removal instructions detectable.
Test plan
16d8be119763483365c16cfb3a45127b9c24ab14, macOS, Python 3.13.13, in a fresh environment installed withuv sync --all-extras --lockedand an isolated home without provider credentials.make format: passed; all 365 files unchanged.make lintandmake format-check: passed acrosssrc/andtests/.make test: exit 0. Unit phase: 20,958 passed, 57 skipped, 4 xfailed (258 deselected). Integration phase: 249 passed, 5 skipped (21,023 deselected). Skips and expected failures are not counted as passes; live-provider validation is not claimed.-rsconfirmed the five skips are optional live CLI tests: three requireclaude, two requiregemini; neither binary is on the isolated test PATH. It again passed 249 tests.e48d771abefore the fix. The focused reconstruction/documentation suite passed all 1,264 tests after the fix.Task
Related to the existing false-positive reports #868 and #515.
Risk and rollback
This changes one existing reconstruction heuristic. The additional recognition is bounded, restricted to identifier characters, and requires the existing following quoted-item check. Revert this commit to restore prior behavior.
Notes
This is separate from TypeScript template ownership in #990 and does not change policy, suppress findings, or add a language parser. On a local full-skill fixture it cleared the Markdown partial-analysis result; unrelated TypeScript partial analysis remained. No private skill contents are included.
Checked against
CONTRIBUTING.md: the contribution uses a fork branch, references existing issues, includes regression tests, runs the documented formatting/lint/full-test targets, and the sole commit carries the required DCO sign-off. Existing SPDX headers are preserved; no new source files were added. The repository has no PR template, so this description retains summary, changes, validation, issue references, risk/rollback, and scope notes.