Skip to content

Two checker false positives: package-manager builtins and INDEX.md frontmatter edges #203

Description

@theyashasvipandey

Two small independent false positives, both suited to a first contribution.

1. DEAD_COMMAND reads package-manager builtins as script names

A scaffold documenting `pnpm install` gets:

✗ DEAD_COMMAND:48 Script "install" not found in package.json scripts

install is a builtin, not a script. checkCommands in
src/drift/checkers/command.ts matches:

/^(?:npm\s+run|yarn|pnpm|bun\s+run)\s+(\S+)/

npm run x and bun run x are scoped correctly, but bare yarn and pnpm
swallow their builtins, so install, add, dlx and ci are looked up as
scripts and reported missing.

2. INDEX_MISSING_ENTRY ignores frontmatter edges

A pattern referenced from patterns/INDEX.md only as an edge:

edges:
  - target: syntax-extractor-review.md

is reported as exists but is not referenced in INDEX.md. It is referenced —
checkIndexSync in src/drift/checkers/index-sync.ts parses markdown links and
backticks only, never frontmatter.

This looks like an oversight, not a decision: the sibling checker
src/drift/checkers/stale-pattern.ts already handles edges and says why —
"Frontmatter edges are mex's canonical navigation, so a pattern reached only
through an edge is not orphaned." The two checkers currently disagree about the
same concept.

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

    bugSomething isn't workingcheckerRelated to drift checkersgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions