Skip to content

Preserve note ownership during atomic replacement - #6

Merged
crypdick merged 3 commits into
mainfrom
fix-atomic-file-ownership
Oct 28, 2026
Merged

crypdick merged 3 commits into
mainfrom
fix-atomic-file-ownership

Conversation

@crypdick

@crypdick crypdick commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

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).

@crypdick
crypdick merged commit 42df5f5 into main Oct 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant