Skip to content

fix(drift): do not treat version-shaped refs as missing paths - #210

Open
dyk1454683243-sudo wants to merge 1 commit into
mex-memory:mainfrom
dyk1454683243-sudo:cursor/fix-missing-path-version-shaped-9358
Open

dyk1454683243-sudo wants to merge 1 commit into
mex-memory:mainfrom
dyk1454683243-sudo:cursor/fix-missing-path-version-shaped-9358

Conversation

@dyk1454683243-sudo

@dyk1454683243-sudo dyk1454683243-sudo commented Sep 19, 2026

Copy link
Copy Markdown

What

Tighten the isUnrootedReference extension guard so a trailing numeric-only segment is not treated as a file extension.

release/2.1.0 used to match /\.[A-Za-z0-9]+$/ on .0, skip the prose/unrooted check, and report MISSING_PATH. The guard now requires an alphabetic character in that suffix, so git-flow / pinned-runtime tokens (release/2.1.0, python/3.11, node/20.11) reach the existing first-segment check.

Unskips does not claim a version-shaped branch name and adds a small regression that docs/foo.bar still stays a real path claim.

The narrower api/v1.2 case (first segment exists on disk) is unchanged.

Why

Fixes #201

mex check was flagging branch names and pinned runtimes as missing files whenever the last dotted segment was digits-only.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Docs
  • CI/Tooling

How to test

  1. npx vitest run src/drift/__tests__/path-false-positives.test.ts
  2. Confirm the previously skipped does not claim a version-shaped branch name case is active and green.
  3. Existing MISSING_PATH false positives: negation only heading-scoped, non-path tokens treated as paths, dot-dir glob blind spot #143 path-false-positive cases should stay green.
  4. npm run typecheck

Checklist

  • Focused drift path tests pass (npx vitest run src/drift — 12/12)
  • Typecheck passes (npm run typecheck)
  • Full npm test — not used as a gate here; this environment’s Node 22.14.0 SQLite is built without FTS5, which fails graph/wiki suites unrelated to this change
  • No breaking changes (or documented below)
  • Tested locally with a real project

Code-graph changes

  • This PR targets main
  • A linked issue agrees on the bounded extractor/resolver scope
  • The change follows the frozen LanguageExtractor or FrameworkResolver interface
  • A focused fixture and assertions for the expected node/edge shape are included
  • Any new grammar WASM, extension mapping, extractor, or resolver is registered
  • No graph identity, reconciliation, schema, or drift-semantics changes are included, or a core / discuss-first issue is linked above

Treat trailing numeric segments such as .0 or .11 as versions, not file
extensions, so unrooted refs like release/2.1.0 are not MISSING_PATH.

Fixes mex-memory#201

Co-authored-by: David <dyk1454683243-sudo@users.noreply.github.com>
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.

MISSING_PATH: a version-shaped reference like release/2.1.0 is reported as a missing file

2 participants