Repository navigation
fix(box): refuse mutations of box directory ancestors - #123
kevin-orellana merged 2 commits into
Conversation
## Problem The private-state floor refuses the box directory and its descendants, but accepts mutations of its parent directories. The parent_mutation_is_refused and grandparent_mutation_is_refused regressions fail on the baseline. ## Solution Apply the existing ancestor comparison to the private-state floor for mutations. No interface changes. The six private_tree_mutation_tests cover parent and grandparent refusal, protected-root and descendant refusal, and accepted sibling mutations and non-mutating ancestor access. ## Tests All six private_tree_mutation_tests pass on macOS arm64 and Linux arm64. All-feature builds and formatting pass on both. The Linux no-default-features build also passes. Clippy adds no warnings; macOS retains the baseline hosted.rs::tool_spawner warning. Adversarial review found no introduced defect. Full package and integration suites and end-to-end file access were not run.
|
Assessment: Comment (approvable after minor follow-ups) The fix closes a real gap: a mutation whose target is an ancestor of a forbidden root is now refused, reusing the established Review themes
Nicely scoped, well-tested bug fix that follows the existing patterns in this module. |
kevin-orellana
left a comment
There was a problem hiding this comment.
No actionable defects found. Verified that all six new tests passed in the macOS and Linux workflow logs. The signed-test receipt matches this revision. Local tests could not finish because the disk ran out of space.
Description
Box rejects changes to its own directory, but the same check lets changes to a parent directory through. That leaves a gap in the protection of Box's internal files.
I added the missing refusal for parent directories. The change keeps reads of those directories and changes to unrelated siblings working.
Related Issues
Type of Change
Bug fix
Testing
I checked the fix on macOS and Linux: all six targeted tests pass, and the two ancestor tests fail without the fix. Builds and formatting pass with no new lint warnings; full package and integration suites have not run.
just check, orcargo test --workspace --all-features)cargo fmt --allandcargo clippy --workspace --all-targets --all-features -- -D warningsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.