Repository navigation
test: make the failed container write test hold when the suite runs as root - #369
Merged
Merged
Conversation
…s root The test relied on a chmod 0o500 drive denying writes, which root ignores. Make the container path a dangling symlink instead, so opening it for writing fails for every user and the same ordering guarantee is asserted. Closes #368 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GqtiAsmkmDmpynCN35XTzg Signed-off-by: Claude <noreply@anthropic.com>
10 tasks done
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.
Closes #368
What and why
test_a_failed_container_write_leaves_the_sealed_original_alonemade the destination read-only withchmod 0o500and expected anOSError. Root ignores directory permission bits, so no error was raised and the test failed in root-user environments (containers, some sandboxes) although CI passes.Instead of skipping under
os.geteuid() == 0, the container's target path is now a dangling symlink into a directory that does not exist. Opening it for writing fails for every user, root included, so the same failure path is reached everywhere and the assertions that matter (original still sealed in the vault, not marked offloaded, bytes unchanged) still run for non-root. The chmod/try-finally restore is removed.Test-only change: no behaviour, packet format, threat model, or dependency change.
Checklist
make lint type cov i18n doc-links markersgreen, run as root (per-module 95% floors met)Generated by Claude Code