fix: record failed uploads and deletes in the audit log - #15
Merged
Merged
Conversation
blaipr
force-pushed
the
fix/audit-failed-file-writes
branch
from
September 2, 2026 22:08
c1f0ee3 to
d16b5b8
Compare
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.
What this changes
files_upload,files_delete,files:uploadandfiles:deleterecord afailedaudit entry, carrying the path and the error, when the FTP operation throws — the same shapedb_execute/db:executealready use.docs/safety.mddocuments the three outcomes.Why
A failed upload or delete left no trace in the log at all. An upload that broke off may have left a partial file on the site, and a log listing only the writes that succeeded cannot explain a truncated file when someone asks what happened. The error is still rethrown, so the caller sees the same failure as before.
Checklist
npm testpassesnpm run typecheckpassesdocs/updated if behaviour changedCHANGELOG.mdupdated if the change is user-observable