test(service): Add tombstone inconsistency tests#309
Merged
Conversation
Add tests for edge cases in the two-tier tombstone system: - Orphan cleanup when tombstone write fails - Graceful None on orphan tombstone get/get_metadata Extract from_backends constructor for use in both production and test code. Co-Authored-By: Claude <noreply@anthropic.com>
jan-auer
added a commit
that referenced
this pull request
Feb 16, 2026
CI runs `cargo fmt` and `ruff format` but these were missing from the pre-commit linting instructions in AGENTS.md. This caused formatting issues to slip through to CI (e.g. #309). Adds `cargo fmt --all -- --check` and `uv run ruff format --check` to the linting checklist.
lcian
approved these changes
Feb 16, 2026
Member
lcian
left a comment
There was a problem hiding this comment.
Cool way of testing this behavior.
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.
Add tests for edge cases in the two-tier tombstone system that aren't
covered by the existing happy-path test:
succeeds but the subsequent tombstone write to high-volume fails, the
long-term object must be cleaned up. Uses a
FailingPutBackendtosimulate the failure.
high-volume but the corresponding long-term object is missing (e.g.
partial cleanup or race), reads should return
Nonegracefully ratherthan error or expose the tombstone.
Also extracts
from_backendsout of#[cfg(test)]soStorageService::newdelegates to it, removing duplicated construction logic.
Documents the consistency invariant in the service architecture docs:
the tombstone is always the last thing written and the last thing removed,
ensuring no orphans without distributed locks.
Co-Authored-By: Claude noreply@anthropic.com