Skip to content

docs-hygiene(rename-references): Form 1 rewrites hyphenated sibling commands; manifest declarations reject inline comments #1439

Description

@kyle-sexton

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
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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: highSignificant impact, or blocks an imminent release; staff this cycle.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions