fix(drift): treat resolution stubs like ./x as not-paths - #222
Open
dyk1454683243-sudo wants to merge 1 commit into
Open
dyk1454683243-sudo wants to merge 1 commit into
dyk1454683243-sudo wants to merge 1 commit into
Conversation
Drop single-letter hypotheticals (`./x`, `x.ts`, `x/index.ts`) before they become path claims, so mutual-alternative resolution prose no longer reports MISSING_PATH. Real project paths stay claims. Co-authored-by: David <dyk1454683243-sudo@users.noreply.github.com>
11 tasks
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Treat hypothetical / mutual-alternative resolution examples such as
`./x`,`x.ts`, and`x/index.ts`as not filesystem path claims, so they never becomeMISSING_PATH.isNotAPathnow rejects a single-letter basename (optional./) that is bare, plus a known extension, or plus/indexand a known extension. That is the class used in import-resolution prose:(`./x` may be `x.ts` or `x/index.ts`); at most one really exists.Real files stay claims:
src/auth/login.ts,.mex/ROUTER.md,package.json. Compound extensions such asx.d.tsare left for #216. Alternation shorthand (tests/grounding|traversal|…) is owned by #221.Why
Addresses #202 (bullet 3 only).
Do not treat this as
Fixes #202orCloses #202— that would auto-close the whole mega-issue.Other #202 bullets are owned elsewhere and stay out of this PR:
src/auth/login.validateToken) — owned by fix(drift): treat qualified-name symbol notation as not a path #220.d.ts) — owned by fix(drift): treat compound extensions like .d.ts as not-paths #216tests/grounding|traversal|…) — owned by fix(drift): treat pipe-alternation shorthand as not a path #221 (still a separate PR; this change does not implement it)@scope/pkg/package.jsonvs bare specifier) — owned by fix(drift): resolve scoped packages by bare specifier #217Issue #202 stays open.
Type of change
How to test
npx vitest run src/drift(`./x` may be `x.ts` or `x/index.ts`); at most one really existsproduces zero path claims and zeroMISSING_PATHfor those three tokens.src/auth/login.tsis still reported asMISSING_PATH..mex/ROUTER.md/package.jsonstill extract as path claims.npm run typecheckChecklist
npx vitest run src/drift— 11 passed, 1 skipped#201version-shaped case left untouched)npx vitest run test/claims.test.ts— 30 passed, including the bullet-3 skip plus preserved real paths)npm run typecheck)npm test) — full suite is not the gate for thisisNotAPathfilterCode-graph changes
mainLanguageExtractororFrameworkResolverinterfacecore / discuss-firstissue is linked aboveThis is a drift claim-extraction filter only. It does not change graph identity, extractors, or the other #202 bullets. Issue #202 stays open.