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 3901239
Browse filesBrowse the repository at this point in the historyBrowse files
fix(utils): fail closed when the staged file's mode copy fails
_copyTargetMode logged a failed chmod and let the publish proceed at the staged
file's own mode, so a 0o600 credential file could be published widened. The mode
copy runs before the commit rename, so this failure is the reversible one: nothing
is published yet, the teardown unlinks the staged file and the target keeps its
previous content. The sibling writer in services/file-safety/safeWriteText.ts
already rethrows for the same property, and its comment explains why the mode has
to be applied rather than inherited. The doc block no longer defends proceeding on
atomicity grounds - the rename makes the publish atomic whatever the mode is - and
the row that pinned the old behaviour now asserts the teardown instead: the target
still holds its previous content and no .new_ staged file is left beside it.
Refs: Zoo-Code-Org#2359 (discussion_r4509387063)
0 commit comments