Repository navigation
test: add portable Linux target validation - #198
Conversation
## Problem Installed Linux packages lack a reusable target check with retained evidence. The Git path test also fails before its denial assertion when the home is a symlink. ## Solution Reuse the lifecycle probe in a portable Python runner. Record file effects, shutdown, prior-grant isolation, native refusal, and restoration continuity. Add negative controls, Linux workflow steps, and a contributor guide. Canonicalize the test home without changing its assertions. No product interface changes. ## Tests The full deterministic suite passed 120 cases with nine declared macOS-only skips. All 93 harness units and nine Python regressions passed. Mutation checks pin false startup, permission, timeout, isolation, and cleanup evidence. Installed main checks passed seven cases; the native candidate passed eight, including expected setup refusal. Local continuity passed seven checks without platform suspension. The original Git fixture reproduced StripPrefixError; the repaired fixture passed. Builds, formatting, and repository-configured Clippy passed. Strict workspace Clippy still fails on unchanged vendored shell warnings. No cloud deployment, native cloud qualification, or product-wide test campaign ran.
|
Assessment: Comment Well-scoped test infrastructure. The runner reuses the existing Phase 3 lifecycle probe, adds no new dependencies (pure stdlib), and the signal path is genuinely careful — Review Categories
Nice work keeping the evidence honest about what it does and does not prove. |
|
Assessment: Approve Re-reviewed at No remaining concerns. |
Human readable section
Problem: An installed Linux package needs repeatable checks for file access, shutdown, and isolation between runs. A successful startup alone does not prove these behaviors.
Solution: Add a portable runner that retains its fixtures, executable hashes, logs, and results. For example, one Box writes an allowed file. A later Box must refuse that same file after the grant is removed.
Trade-off: These are focused package checks. They supplement the deterministic suite and do not qualify a cloud deployment or prove native enforcement.
Description
The runner reuses the existing lifecycle fixture. Seven ordinary checks cover startup, file effects, normal exit, termination, forced termination, a harness deadline, and a subsequent isolated run. An optional eighth check requires a recognized native setup refusal without workload entry.
Restoration commands preserve a bounded live fixture and check continuity afterward. Actual platform suspend/resume responses must be collected separately. The harness deadline does not exercise a service's timeout interface.
Negative tests reject false success from absent workload entry, unrestricted access, missing heartbeat evidence, unrelated setup errors, and timeouts. Cleanup identifies fixture processes and checks their identity before signaling them.
Linux continuous integration runs the Python tests and installed-package checks, then uploads their evidence. Existing deterministic cases and the Linux advisory policy remain intact.
The existing Git denial test also needs a fixture repair. Its fixture path was canonical, but its home prefix was not. Canonicalizing both lets the original assertions run when the home is a symlink. This changes no product code or permissions.
Related Issues
Related to #48. This PR does not close the broader coverage work.
Type of Change
Other: test infrastructure, one test-fixture repair, and contributor documentation.
Testing
Local validation used ARM64 Linux. The ordinary package was built from main revision
0b31256607813d98f0e2a1f9c392d8d5e0620d12; this PR changes no product source. The optional refusal check separately used native candidate58d0fc24b548409812de4ccf2eefd8f5889b6c8b.bash test-integ/run.shcargo test --manifest-path test-integ/Cargo.toml --all-features --locked --lib --binspython3 -m unittest discover -s test-integ/tools -p test_target_validation.py -vStripPrefixError; the repaired case passed with its assertions retained.just clippyrecipe passed when run directly becausejustwas unavailable. It uses the existing repository allowances. Standalone harness Clippy passed with one unchanged comment warning.Hosted CI passed for head
8c9d3bf02087782f6b31358ff514d7d30eb17f2e: Linux recorded 120 passes and nine declared macOS-only skips; macOS recorded 121 passes and eight declared Linux-only skips. All 11 runner tests and seven package checks passed. The CI Gate and macOS native build/unit job passed. The second hosted review confirmed all three findings are resolved and reported no remaining concerns. Human approval remains required.No cloud deployment, positive native cloud qualification, service cancellation test, or full agent workload matrix ran for this PR.
just check, orcargo test --workspace --all-features)cargo fmt --allandcargo clippy --workspace --all-targets --all-features -- -D warningsThe checked items attest to execution. The table records the strict Clippy failure and the narrower suite selection explicitly.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.