Repository navigation
Preserve note ownership during atomic replacement - #6
Merged
Merged
Conversation
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.
Atomic replacement retained mode bits but replaced an existing note's UID/GID with the temporary file creator's identity. On a shared vault this can remove another user's access after an otherwise successful edit.
Apply the original UID/GID to the temporary inode before its final mode and publication. If ownership cannot be preserved, leave the original file untouched and clean up the temporary file. Document that new-file group inheritance remains deployment configuration and that extended ACLs/xattrs are not copied.
Also repair the README configuration anchor left stale by the configuration guide rewrite. Isolate registry tests from inherited XDG_CONFIG_HOME and OBSIDIAN_KNOWLEDGE_VAULTS_CONFIG: CI exposed 39 failures because temporary HOME fixtures were superseded by the runner's XDG setting. Tests still exercise explicit XDG/registry overrides; production lookup behavior is unchanged.
Validation: both ownership regressions fail on unchanged source and pass with this fix; 20 focused writer tests pass. Reproduced registry discovery failures with ambient XDG before the fixture correction; 222 focused configuration/hook tests then pass with both ambient overrides deliberately set. The final full manual prek gate passes under those same ambient settings, including strict type/lint, architecture, packaging, plugin synchronization and pytest with required 100% coverage. Strict MkDocs build passes. Published final tree matches the tested local tree (
17144ff6958fc7d9672b1dfe6aed77ff50e7995f).