Repository navigation
Let Windows graphs live in the user folder - #58
Merged
Merged
Conversation
A graph anywhere under C:\Users failed to open with os error 5, because HawDB flushes every parent folder up to the drive root and ordinary users can't open C:\Users for writing. HawDB 0.24 has an option for this that we never set: namespace_durability_anchor stops the walk at a folder the host vouches for. On Windows, a graph inside the home folder now anchors there. Paths elsewhere, and every other platform, keep the full walk. 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.
Problem
On Windows, creating or writing to a graph anywhere under
C:\Users\...fails:HawDB flushes every parent folder up to the drive root when it opens a graph for writing, and an ordinary user can't open
C:\Usersfor writing. A machine with only drive C had nowhere obvious to put a graph.This isn't waiting on HawDB. nowledge-co/hawdb#1255 tracks it, and our pinned 0.24.0 already has the option for it,
DatabaseConfig::namespace_durability_anchor. We never set it.Change
C:\graphsstill fails, with a reworded hint..cargo/config.tomlnow say the same.The decision to review
Setting an anchor means we promise the home folder is already durable; HawDB doesn't check. HawDB's namespace durability doc describes this pattern for the OS-provisioned
LocalAppDatafolder and says not to do it for a folder the app just created. The home folder is also provisioned by Windows, but the doc doesn't name it, so this is our reading of it.Not tested: power loss. HawDB's doc also lists Windows namespace power-loss qualification as still open, with or without an anchor.
Testing
On Windows 11 as a non-admin user:
c:/users/...)C:\ProgramData\...(outside home)E:\...a_graph_in_the_home_folder_can_be_created_and_reopenedfails withos error 5when the anchor is turned off. It returns early if the temp folder isn't under the home folder, so it may not exercise this on every CI machine.cargo test --workspaceandcargo clippy --workspace --all-targets -- -D warningspass locally.open_inner.After this and #57 both merge
This is based on
main, so it can't touch text that only exists in #57. That text needs a small follow-up:probe_locationcomment inlocation.rs, which says HawDB needs write access to every parent folder.graph_dialog.new.no_suggestionstring, which says graphs may not work on drive C.suggest_locationneeds no change: its probe will now succeed forDocuments.🤖 Generated with Claude Code