Repository navigation
test: strengthen Linux boundary and credential-daemon checks - #187
Conversation
## Problem Linux startup refusals lack paired controls for their permitted alternatives. The optional live credential-daemon test accepts any hard failure, including a stale socket. ## Solution Add Linux tests for absent deny paths, list-only grants, and the system-information boundary. Retain successful startup controls and verify that hostname changes fail. Require daemon health and caller access before checking the specific unknown-environment response. Add local response and stale-socket checks, and document the live fixture. Production behavior and automated workflows do not change. ## Tests Linux ARM64: the three new cn_linux_* cases passed and rejected altered test inputs. The restored tests passed again. The existing cn_w_03 startup-refusal case passed. All 93 harness unit tests passed. Credential tests reported 204 unit and 29 integration passes, including one explicit live-daemon skip. A synthetic live fixture passed and six setup/response faults failed as required. The all-features workspace log reports 4,493 passes, zero failures, and 17 ignored tests. The workspace reports missing helper, accepted alias-read, and real-daemon skip diagnostics. Workspace clippy passed with the repository's vendored-code allowances. Formatting passed. Independent review found no code or documentation defect and passed its scoped gates. The examples script found no scripted examples. No live agent or real daemon ran. macOS validation requires the hosted checks. The full native suite passed 123 cases with nine declared macOS-only skips and no failures. The first native run failed unchanged cn_l_02 on a symlinked HOME spelling. The same directory's canonical HOME spelling made the focused control and full suite pass.
|
Assessment: Approve Solid, focused test-only change. Each Linux refusal is paired with a positive control, the refused workload is verified never to run, and system state (deny path, protected file contents, host hostname) is checked unchanged — so a false "refused" cannot pass. The credential-daemon changes close a real false-positive: the live test now requires a healthy, caller-accessible fixture and the exact unknown-environment mapping, and a new local test proves a stale socket cannot satisfy that assertion. Review notes
Nicely constructed negative-plus-control tests that make the refusals hard to fake. |
|
Assessment: Approve (re-review at The commits since my last review add Correction to my previous summary: I wrote that hosts lacking namespace capabilities "skip rather than error". That was wrong. What I checked (each held)
|
Human readable section
Problem: Linux test results need to distinguish executed assertions from platform exclusions and early returns. The prior coverage also lacks a durable agent/tool metadata check, and unrelated credential failures can conceal an incorrect test setup.
Solution: Add paired Linux checks for hidden metadata, unsupported-grant startup refusal, and system-information boundaries. Verify the complete credential request and the exact expected error. Negative fixtures must reach their intended error before testing rejection.
Trade-off: Nine macOS-only cases remain declared skips on Linux. Some have Linux counterparts with different supported behavior. The real credential daemon, external HTTPS fixtures, and separate permission changes remain outside this candidate's proof.
Description
This refresh includes current main
21609dc94d26e1392ea74be5af4faf5f8c63a1a4and the earlier PR187 changes. Main declares 129 deterministic cases; this PR adds four Linux cases, for 133. The current product was rebuilt and tested; old-head results are not used as current evidence.The metadata case checks both agent and tool access to the same owned file. An explicit read grant exposes its metadata and contents. Without that grant, both operations must report absence. A separate missing file, completion markers, tool-start authorization, and host-side content checks establish that the probes ran.
Credential checks require the full request object and the specific unknown-environment error. The negative fixtures check their own expected parse or daemon error first. This prevents a truncated response or unrelated transport failure from satisfying the intended test. The live test requires health and an authorized known-environment listing before its unknown-environment request.
Existing denial checks and platform declarations remain. No product interface, permission policy, or automated workflow changes. Prepared with Codex and independently reviewed. The automated re-review at
34e3d0balso found no new defects and recommended approval; this is not human approval.Related Issues
Related to #48; this PR does not close the broader coverage issue.
Type of Change
Other: integration tests, assertion repairs, and coverage reconciliation.
Testing
Tested revision:
34e3d0b8ece45386f0a651f0822548f869f4c96b. Main baseline:21609dc94d26e1392ea74be5af4faf5f8c63a1a4.Native Linux: Amazon Linux
2023.12.20261029, ARM64, kernel6.12.111-136.204.amzn2023.aarch64, Rust/Cargo1.98.1. Experimental Linux support was enabled.HOME=/local/home/keorelis the canonical spelling of the same operator home. This lets the existing Git denial assertions run while #198 retains ownership of their fixture repair.The following rows describe integration tests, not unit tests.
The deterministic result is 133 expected and recorded: 124 passed, nine skipped, zero failures or errors. Its
coverage_gate=fullmeans every manifest case has a result; it does not mean every product requirement is covered. There are no quarantined cases or unexpected deterministic skips.Linux/macOS differences and missing execution
The manifest contains 112 shared cases, 12 Linux-only cases, and nine macOS-only cases. Native macOS compiled all updated harness targets and passed the credential tests. The four new Linux cases recorded four declared macOS skips. Hosted run 41013940746 passed both deterministic jobs: Linux recorded 124 passes and nine declared skips; macOS recorded 121 passes and 12 declared skips. Both recorded all 133 cases with zero failures or errors. Hosted checkout uses the pull-request merge commit
d69ede75ea8ca51528acd69a57bf08ea4dd5c767; its tree49623b30c7bce138126d0b1bf8eae727861ec8a9matches the tested branch head. The hosted Linux workspace job, lint, native macOS checks, and code scans passed. The macOS workspace job remains in progress; no all-checks-passed claim is made.Separate unit and support evidence
The hosted Linux workspace job passed but printed 99 skip diagnostics for unavailable containment or namespace prerequisites, unsupported architecture, a missing alias helper, and the absent real daemon. This is a diagnostic-line count, not 99 unique tests. Its green status does not prove those assertions ran. The native ARM64 results below supply the executed containment evidence; #185 separately owns gate enforcement.
The Linux workspace reported 1,882 passes and seven ignores across 20 unit/binary targets. Its 109 Cargo integration targets reported 2,696 passes and nine ignores. These targets include component/API tests and process tests; they are not all end-to-end tests.
The first workspace invocation exited 101 because seven documentation targets reported missing compiled dependencies (
E0463) after overlapping build checks. All runtime targets passed. A subsequent, serialized documentation run exited zero: 13 passed and one ignored across eight targets. This does not turn the original invocation into a clean pass.The standalone harness's 93 unit tests passed separately; its one documentation example remained ignored. Credential unit tests passed on both platforms: 204 on each. These subset and cross-platform counts must not be added into a unique-test total.
The workspace run preceded the last credential-fixture correction; the corrected credential suite was rerun separately and passed.
The ignored workspace cases comprise shared defects, deferred measurements, external fixtures, the accepted alias-read diagnostic, and child helpers invoked by parent tests. They must not all be treated as missing integration coverage. The 16 runtime ignores comprise three shared policy defects, one shared Shell defect, three deferred measurements, two external HTTPS fixtures, one alias-read diagnostic, and six child helpers. The parent tests for those helpers passed. One documentation example is also ignored.
Assertion sensitivity
Independent checks changed the serialized request version and weakened the expected-error guard; the tests rejected both changes. Granting the hidden file to either agent or tool made the metadata denial check fail. Restored source passed.
The synthetic live fixture completed health, known-environment listing, and unknown-environment lookup in order. Six incorrect fixtures failed: wrong error, malformed response, incompatible health protocol, empty credential list, absent socket, and stale socket. These prove test sensitivity, not compatibility with the shipped daemon.
Commands
Mac compilation used
cargo test --manifest-path test-integ/Cargo.toml --all-features --locked --no-run. Credential tests used the same command as Linux. Workspace lint passed with the existing repository allowances. Standalone harness lint retained one warning in unchangedcn_native_egress.rs; there were no new warnings. The examples command found no scripted examples; no live SDK tutorial ran. Independent credential build, no-default build, and private documentation checks passed.Detailed per-case results, the 29-row requirement matrix, commands, source/binary hashes, and raw logs are retained in the owned worktree under
.agents/explorations/integ-current-main-20261030/. The harness's legacy commit stamp reportsunknownin this mapped worktree;validation-summary.jsonrecords the actual revision and binary hashes separately.No deployment, Runtime restoration, positive native cloud enforcement, performance parity, or release qualification is claimed.
just check, orcargo test --workspace --all-features)cargo fmt --allandcargo clippy --workspace --all-targets --all-features -- -D warningsThe lint command includes the repository's documented allowances, as shown above.
Checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.