Repository navigation
Ask AI on Windows: survive files named NUL; show progress while serve starts - #6
Merged
Merged
Conversation
… starts - The repo walk behind grep and impact (every Ask AI question) took relpath of each file. Windows resolves a file named NUL / CON / ... (what `> nul` in Git Bash leaves behind) to \\.\nul, so relpath raised "path is on mount '\\.\nul', start on mount 'C:'" and the answer failed. relpath is now taken of the folder only; retrieve.py reuses impact's walker instead of its own copy. - `codewiki serve` prints a line at once, then a spinner naming the index step in progress (git check, re-reading changed files, indexing) and the load time, instead of ~5 s of silence. The index logs its steps (stderr via logging, so the MCP server's stdout stays clean). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…prefix
A plain open("...\\nul") on Windows writes to the NUL device, so the
file never existed and the test failed on the Windows wheel jobs. With
\\?\ the file exists and relpath fails for real; other platforms keep the
simulated error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Two Ask AI fixes reported from a Windows machine.
1. "Could not answer ask failed: path is on mount '\\.\nul', start on mount 'C:'"
Every question walks the repo (grep and impact scans). The walk took
relpathof each file. Windows resolves a file namedNUL/CON/AUX… (what> nulin Git Bash leaves behind) to the device path\\.\nul, andrelpathraises across "mounts".2.
codewiki servewas silent for ~5 s at startQAIndex logs each slow step (git check, re-reading changed files, indexing) through
logging, so the MCP server's stdout stays clean.serveshows those steps in arichspinner, on stderr.Evidence
test_repo_walk_survives_windows_device_namesfails. It adds a file namednuland makesos.path.relpathraise the WindowsValueErrorfor it.After: it passes. grep, the impact scan and the walk all work.
codewiki serve --docs docsnow shows the spinner and step messages, then the load time.Merge Danger
Door: two-way
Blast Radius: ask-and-serve
richstatus prints nothing, so piped output stays as before.🤖 Generated with Claude Code