Two P1 defects in rename-references, both raised on review of #1386 after it had already merged, so both are live on main at docs-hygiene 0.9.0.
1. Form 1 auto-rewrites an unrelated hyphenated slash command
Form 1 is \B/<old>\b. A \b treats a hyphen as a word boundary, so it prevents /confirm matching in /confirmation but not in /confirm-changes.
Renaming a context plugin therefore matches the unrelated /context-guard. Form 1 is rated Certain, and container-rename mode keeps it on the Certain-eligibility allowlist, so the match reaches the default auto-apply path and rewrites another command's name.
Slash-command and container names are kebab-case by convention, so this is a common case rather than an edge one.
Forms 13 and 15 already exclude an adjacent hyphen for exactly this reason; Form 1 does not.
2. Manifest declarations reject an inline comment
Form 14's YAML and TOML declaration alternatives are end-anchored, so a self-documenting manifest is not matched:
name = "old" # package name
Filesystem evidence still selects container mode for such a manifest, after which the unmatched occurrence is suppressed as bare-token residue and apply mode can report zero actionable stragglers while the registered name stays stale.
Note for whoever fixes this: the whitespace before # is load-bearing in YAML but not TOML. YAML starts a comment only when # follows whitespace, so name: old#x is the single scalar old#x and must not match. TOML's value is quoted, so the closing quote already ends the string. JSON has no comment syntax and is out of scope.
Related
Two P1 defects in
rename-references, both raised on review of #1386 after it had already merged, so both are live onmainatdocs-hygiene0.9.0.1. Form 1 auto-rewrites an unrelated hyphenated slash command
Form 1 is
\B/<old>\b. A\btreats a hyphen as a word boundary, so it prevents/confirmmatching in/confirmationbut not in/confirm-changes.Renaming a
contextplugin therefore matches the unrelated/context-guard. Form 1 is rated Certain, and container-rename mode keeps it on the Certain-eligibility allowlist, so the match reaches the default auto-apply path and rewrites another command's name.Slash-command and container names are kebab-case by convention, so this is a common case rather than an edge one.
Forms 13 and 15 already exclude an adjacent hyphen for exactly this reason; Form 1 does not.
2. Manifest declarations reject an inline comment
Form 14's YAML and TOML declaration alternatives are end-anchored, so a self-documenting manifest is not matched:
Filesystem evidence still selects container mode for such a manifest, after which the unmatched occurrence is suppressed as bare-token residue and apply mode can report zero actionable stragglers while the registered name stays stale.
Note for whoever fixes this: the whitespace before
#is load-bearing in YAML but not TOML. YAML starts a comment only when#follows whitespace, soname: old#xis the single scalarold#xand must not match. TOML's value is quoted, so the closing quote already ends the string. JSON has no comment syntax and is out of scope.Related