Skip to content

fix(versioning): reject delete markers for invalid keys - #1791

Open
TylerHillery wants to merge 3 commits into
masterfrom
tyler/fix/versioned-delete-validation
Open

TylerHillery wants to merge 3 commits into
masterfrom
tyler/fix/versioned-delete-validation

Conversation

@TylerHillery

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

For delete markers we dont check if the key is valid so this allows users to create delete makers for otherwise invalid keys. Deletes are allow to be made on objects that dont exist for versioned/suspended buckets.

What is the new behavior?

We now validated the key to and return invalid key instead of creating the delete marker

Additional context

N/A

@TylerHillery
TylerHillery requested a review from a team as a code owner December 2, 2026 17:18
@TylerHillery
TylerHillery force-pushed the tyler/fix/versioned-delete-validation branch from 8af8457 to 1eaefb6 Compare December 2, 2026 17:20
Copilot AI balanced review requested due to automatic review settings December 2, 2026 18:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues with the changes preventing delete markers for invalid missing keys.

No open issues 🎉

What changed in this PR

Prevents version-aware deletes from creating delete markers for invalid keys when the object does not exist.

Changes:

  • Rejects invalid missing keys in single-object deletes and filters them from batch-delete targets.
  • Adds regression tests for empty and malformed keys.
File Description
src/​test/​object-versioning-writes.test.ts Tests invalid-key rejection and confirms no delete markers are written.
src/​storage/​object.ts Validates missing keys before allowing delete-marker creation.

Review effort: Balanced

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Comment thread src/storage/object.ts Resolved
@coveralls

coveralls commented Dec 2, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 47436186807

Coverage increased (+0.003%) to 88.886%

Details

  • Coverage increased (+0.003%) from the base build.
  • Patch coverage: 5 of 5 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 19651
Covered Lines: 17992
Line Coverage: 91.56%
Relevant Branches: 12373
Covered Branches: 10473
Branch Coverage: 84.64%
Branches in Coverage %: Yes
Coverage Strength: 1277.55 hits per line

💛 - Coveralls

Comment thread src/storage/object.ts Resolved
@TylerHillery
TylerHillery force-pushed the tyler/fix/versioned-delete-validation branch from 3d24255 to 5a95ce9 Compare December 4, 2026 22:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants