Skip to content

fix: scope checkPaths to ROUTER.md only#80

Merged
theDakshJaitly merged 3 commits into
mex-memory:mainfrom
Taegost:fix/scope-check-paths-to-router
Jun 18, 2026
Merged

fix: scope checkPaths to ROUTER.md only#80
theDakshJaitly merged 3 commits into
mex-memory:mainfrom
Taegost:fix/scope-check-paths-to-router

Conversation

@Taegost

@Taegost Taegost commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What

Filters the claims array passed to checkPaths so it only includes claims extracted from ROUTER.md. This eliminates false MISSING_PATH errors from context docs, pattern files, and tool config files where backtick-wrapped strings are general-purpose inline code, not path declarations.

Why

Fixes #79checkPaths was extracting every backtick-wrapped string from all scaffold markdown files and attempting to resolve each as a file path. Strings like csi.kubeletRootDir: /var/lib/kubelet, argocd.argoproj.io/sync-wave, and 192.168.5.0/24 were flagged as MISSING_PATH errors (-10 points each), producing a drift score of 0/100 on real-world scaffolds.

Changes

  • src/drift/index.ts — Added basename import; filtered allClaims to only ROUTER.md before passing to checkPaths
  • test/public-api.test.ts — Added 3 integration tests verifying the scoping behavior
  • CHANGELOG.md — Added entry under [Unreleased]

Verification

Tested against https://github.com/Taegost/homelab-k8s branch feat/mex-integration (the repo where the issue was reported):

Metric Before After
Score 0/100 79/100
Errors 18 0
Warnings 7 7

The remaining 7 warnings are BROKEN_LINK issues in patterns/INDEX.md from a different checker — unchanged by this fix.

🤖 Generated with Claude Code

Taegost and others added 3 commits June 17, 2026 12:13
Filter claims passed to checkPaths so only those extracted from ROUTER.md
are validated as paths. Eliminates false MISSING_PATH errors from scaffold
files that use backticks for non-path content (config values, IPs,
annotation keys, glob patterns).

Fixes mex-memory#79

@theDakshJaitly theDakshJaitly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clear fix and for validating it against the real scaffold that surfaced #79.

I reviewed the diff and verified locally with:

  • npm test -- test/public-api.test.ts test/checkers.test.ts test/claims.test.ts
  • npm run typecheck
  • npm run build

Scoping checkPaths to ROUTER.md looks like the right behavior for now: it preserves path validation where the scaffold declares navigation, while avoiding noisy MISSING_PATH errors from inline config values in context and pattern docs.

LGTM.

@theDakshJaitly theDakshJaitly merged commit 6d9b5f6 into mex-memory:main Jun 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

checkPaths produces false positives for non-path inline code in markdown

2 participants