fix(review): contain untracked reads honestly - #9
Merged
Conversation
Route untracked and EditorConfig reads through the native capability helper. Omitted files keep the tracked patch and set complete:false. Honor staged/revision/show blob specs, propagate tracked git-diff failures, and keep Node GitHub code out of the browser bundle.
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.
Summary
Follow-up after #8 and the native-file hardening slice. Untracked diffs and EditorConfig no longer walk the repo through Node
fs. Denied, missing, or unavailable untracked files are omitted; the tracked patch is kept;/api/diff, inspect, MCPget_diff, and the web UI reportcomplete: falseinstead of a full snapshot.Also stops the browser UI from importing the Node GitHub client, and fails the Vite build if a Node builtin leaks into the client bundle.
What landed
complete/omittedPaths.git difffailures propagate instead of becoming an empty successful review.getFileContent/resolveFileVersionhonor staged, revision-range, and show-mode blob specs.classifyPrCommentsmoved tosrc/lib/pr-comments.ts; VitebrowserOnlyPluginrejects Node builtins in the client bundle.Verification
pnpm exec vitest run(targeted containment files): 6 files, 227 tests passed.pnpm test:ts: 178 files, 1,849 tests passed.pnpm exec vite build: passed (existing >500 kB chunk warning).I did not re-run the waived #8 manual browser/latency matrix, and there is no browser MCP in this session to click the new incomplete banner. Data path is covered by
useDiff//api/difftests.Still deferred
This is not the rest of the hardening roadmap. Still open, in order:
fff, remaining Rust callers, OS matrix (A02 remainder).No release.