fix(ingest): treat a cross-drive --dir as outside the repo (#384) - #396
Frankie-Xu wants to merge 2 commits into
Conversation
🌱 graft blast radius1 area changed → 3 areas can be affected. 7 dependent symbols, depth 2. flowchart TB
A0(("Graph Building<br/>3 symbols"))
A1(("CLI Engine<br/>2 symbols"))
A2(("Pull Request Review<br/>2 symbols"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2 reached;
Who knows this code — 2 people across 4 areas
Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no All 7 dependent symbols, grouped by areaGraph Building — 3 symbols in 3 files
CLI Engine — 2 symbols in 2 files
Pull Request Review — 2 symbols in 2 files
Test signal per changed area — 1 ✓Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.
32 test suites also reference this code34 symbols, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.
Open the interactive graph → — click an area to see its dependent symbols at file:line. |
Windows checkout rewrote node-file.ts and its test as CRLF, inflating the PR. Behaviour is unchanged.
|
Follow-up: 919d38e stores node-file.ts and the test as LF to match main. The previous commit was CRLF-only noise. Behaviour is unchanged. |
Summary
ensureGitignored/ensureSearchabletreatedrel.startsWith(..)as--diroutside the repo. On Windows,path.win32.relativefor a different drive returns an absolute path (F:/tmp), so the guard missed and/F:/graft-dir-repro-tmp/was appended to the repo.gitignore/.ignore.rel(path.isAbsoluteorpath.win32.isAbsolute) as outside too. Same-drive in-repo--dirstill writes/graft/.Not in this PR
GRAFT_NO_GITIGNORE/GRAFT_NO_IGNORE.graft/.cache/telemetry-repo-id.json(split out in the issue).Closes #384
Test plan
rooton this volume +F:/graft-dir-repro-tmp→ neither ignore file containsF:<root>/graftstill gets/graft/node --import tsx --test --test-name-pattern ensureGitignored|ensureSearchable test/context.test.tsMade with Cursor