Repository navigation
fix(containment): restore Linux test compilation - #289
Closed
kevin-orellana wants to merge 1 commit into
Closed
kevin-orellana wants to merge 1 commit into
kevin-orellana wants to merge 1 commit into
Conversation
## Problem Two protection-alias test helpers still call protect_parents with one argument. The grant-scoped helper introduced by #254 requires the target path as a second argument, so the tests added by #266 do not compile on main. ## Solution Pass each writable Grant/Bind entry target to protect_parents in both fixtures. Keep the existing assertions and fixture ordering. Change only the Linux unit test setup; do not include the unrelated changes from #234 or #262. ## Tests Reproduced both E0061 errors on base 26521e4. The repaired protection-alias tests pass 10/10, and all 475 containment library tests pass in the full workspace run. Formatting, workspace build/tests, CI-equivalent workspace Clippy, unsuppressed containment Clippy, no-default containment build, and the Linux output audit pass. The no-default build retains 66 warnings from unchanged production code. The separate deterministic suite remains RED: 126 pass, two fail, nine declared macOS-only skips. A single-case replay passes the remote-MCP case and reproduces the existing metadata-permission failure tracked by #288. Runtime and harness sources match main. Existing workspace skips and lint allowances are documented in the pull request; this is not a full integration pass.
kevin-orellana
enabled auto-merge (squash)
November 3, 2026 21:17
|
Assessment: Comment This fixes the two Assumptions and rules checked that held
|
priyasingh2111
approved these changes
Nov 3, 2026
kevin-orellana
pushed a commit
that referenced
this pull request
Nov 3, 2026
Import the published test-only repair from PR #289 into the metadata-response branch so its Linux checks can compile. Preserve the existing test assertions and fixture ordering. Priya's metadata implementation remains unchanged. Source commit: 35b2b50 Combined Linux validation: workspace build and tests passed (4,855 test passes, 17 ignored). All 10 protection-alias tests and 131 integration cases passed, with nine declared macOS exclusions. Format, Linux output audit, CI-equivalent workspace Clippy, and unsuppressed containment Clippy passed. The no-default build passed with 66 warnings from unchanged code. Test tree: 5787cc8. Hosted merge checks and human approval remain required.
This was referenced Nov 3, 2026
Collaborator
Author
|
Superseded by #288, which merged the exact Linux test-compilation repair into main. The repaired file in main matches this PR. Closing this duplicate; no additional merge is needed. |
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.
Human readable section
Problem: Linux containment tests do not compile after #254 and #266 merged. Two test helpers still use the earlier function signature.
Solution: Update both helpers to pass the target path for each writable grant to the protection helper. The existing tests can then compile and run.
Trade-off: This repairs test setup only. It does not change runtime behavior or address separate runtime test failures.
Description
Both call sites now select writable
Grant/Bindentries and pass eachentry.targettoprotect_parents. Using the target preserves protection through aliases, including paths that differ from the source path.The change touches one Linux unit-test file. All test assertions, names, and prerequisite checks remain unchanged. It extracts the same repair already present in #234 and #262, without their startup or interpreter changes.
Related Issues
Supports #48. Repairs the test integration between #254 and #266.
Type of Change
Bug fix
Testing
Tested on Amazon Linux 2023 ARM64 with Rust 1.98.1 and
EXPERIMENTAL_LINUX_SUPPORT=TRUE. Base:26521e4ba9bb2b6c11a9e9a17ed99bbc27fce3db. Commit:35b2b50cd1b63f8819733b363651ba379cd13ee4. Tested Git tree:ca39a71e7dd6d0c2d2f9680b591d79f430c12490.cargo test -p strands-box-containment --locked --all-features --lib --no-runE0061compiler errors at the obsolete calls.protection_aliastestsbash scripts/test-all.shcargo build --workspace --all-features --lockedcargo fmt --all --checkandgit diff --checkcargo clippy -p strands-box-containment --all-targets --all-features --locked -- -D warningscargo build -p strands-box-containment --no-default-features --lockedbash test-integ/run.shThe workspace output retains existing ignored tests, one credential-service prerequisite skip, and an omitted alias-read assertion. That alias test executed its write assertions. The 10 repaired protection-alias tests had no prerequisite skips. The manual SDK tutorial and local macOS tests were not run.
The full deterministic run failed the remote tool-server case (
CN-MR-01) with a resource-unavailable error and the metadata-permission case (SH-PROBE-PERMISSION) withPermissionErrorinstead of the expectedPY=False. Separate single-case replays passedCN-MR-01and reproduced the metadata-permission failure. The initial full-suite RED result remains unchanged.Those runtime artifacts exclude this unit-test module. Their production and deterministic harness sources match the base byte-for-byte. The metadata-response repair is tracked separately in #288. This PR does not establish a full integration pass; that failure can block the required hosted checks.
Workspace Clippy used
--workspace --all-targets --all-features --locked -- -D warningswith the repository's allowances:clippy::too_many_arguments,clippy::only_used_in_recursion,clippy::await_holding_refcell_ref,clippy::explicit_auto_deref,clippy::chunks_exact_to_as_chunks,dead_code, andnon_snake_case. The separate containment-scoped run used no command-line allowances.just check, orcargo test --workspace --all-features)cargo fmt --allandcargo clippy --workspace --all-targets --all-features -- -D warningsThe checked run attestations refer to the delegated executions and exact allowances above. They do not mean that the deterministic suite passed.
Checklist
The two personal author attestations remain unchecked for Kevin. Codex read the contribution guidance and prepared and reviewed this change at Kevin's request. A separate Codex reviewer checked the repair and test evidence. These delegated checks do not represent Kevin's personal review or satisfy the required human approval.
Existing tests provide the regression coverage: unchanged
mainproduces two compiler errors, and the repaired tests execute their existing assertions. No new test is needed. Documentation changes do not apply to this private test-setup repair.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.