upload-artifact: local backend honors conditional (no-overwrite) atomically #6

Merged
stephen merged 1 commit from fix/upload-artifact-local-conditional into main 2026-06-30 15:16:38 +00:00
Owner

Why

The local backend ignored the {conditional: !overwrite} option the caller passes (upload-impl.js:112); only a non-atomic exists() guarded it (TOCTOU clobber). S3 enforces this via If-None-Match:*.

What

Local upload() honors conditional atomically (exclusive open / wx), so a non-overwrite upload fails on an existing key with no TOCTOU window.

Testing

Added local-backend tests. Backlog rank 14.

## Why The local backend ignored the `{conditional: !overwrite}` option the caller passes (`upload-impl.js:112`); only a non-atomic `exists()` guarded it (TOCTOU clobber). S3 enforces this via `If-None-Match:*`. ## What Local `upload()` honors `conditional` atomically (exclusive open / `wx`), so a non-overwrite upload fails on an existing key with no TOCTOU window. ## Testing Added local-backend tests. Backlog rank 14.
Honor local artifact conditional writes
All checks were successful
test / unit (pull_request) Successful in 5s
test / e2e (pull_request) Successful in 5s
9fde4cc3af
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rasterstate/upload-artifact-action!6
No description provided.