You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3f1b951
Browse filesBrowse the repository at this point in the historyBrowse files
fix(obsidian): close review residuals O1, O4, O7 in the vault writer
O1 — no directory is ever created outside the vault. mkdir(parents=True)
ran BEFORE the containment re-check, so an ancestor swapped for a symlink
between projection_path and the write created directories on the far side
of the link before the file write was refused. Containment is now checked
on the nearest EXISTING ancestor before mkdir (resolve() on unbuilt
directories cannot see where a hostile link sends children), re-checked
after mkdir as before, and once more immediately before os.replace —
narrowing the accepted TOCTOU window to the rename itself. The new test
asserts the property that matters: nothing appears outside the vault, not
merely that an error was raised.
O4 — the dry run previews the replace warning. classify_write returned
WRITTEN for an owned-and-changed note, so --dry-run said 'would write'
where the real publish then said 'written + replaced your edits' — the one
warning added so a learner is told BEFORE losing text was invisible in the
preview. classify_write now returns REPLACED, plan_dry_run carries the
'would replace your edits in …' warning, and journey beat 10 asserts the
preview warns (and that the dry run itself does not touch the edit).
O7 — an unreadable mode refuses the replace. The 0o644 fallback on any
OSError meant a note the learner had locked to 0o600 could be silently
rewritten world-readable if one stat failed. A vanished file still gets
the 0o644 new-file default (the inode-identity check refuses the race);
any other stat failure on an existing note now refuses with the reason.
All three ruled MINOR-with-small-fix by ARBITRATION Q3. 95 tests across
the writer/backend/CLI files pass; 35 journey tests pass; pyright clean.
0 commit comments