Repository navigation
Retry clean policy contention before physical file deletion - #238
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.
A single-file Delete could return HTTP 409 and leave the original job needing recovery when another transaction briefly held the organization row. The conflict occurred after the Delete intent was stored, but before the file moved or a receipt was written.
The direct physical Delete preflight now retries only a failed authorization entry after a confirmed rollback. It checks the same claim and current permissions on each attempt, with three bounded delays. The file move and receipt writes still happen once; persistent contention, revoked access and uncertain outcomes fail closed.
Validation: reproduced the PostgreSQL row lock on the previous code. The new regression passes with the lock released, with permissions revoked before the next check, and with the lock held through the retry limit. The passing case verifies one intent, one completion and byte-identical Trash content; both refusal cases preserve the source. Release typecheck and targeted ESLint passed. The PostgreSQL regression runs in Native API and SDK CI.