Repository navigation
test: separate integration runtime discovery from fixture execution - #257
kevin-orellana wants to merge 1 commit into
Conversation
## Problem Native interpreter discovery and tool configuration share one large file with fixture execution. Their platform-specific unit tests make that file harder to extend and review. ## Solution Move runtime discovery and configuration into a private runtime module. Move its thirteen existing unit test functions into runtime/tests.rs. Preserve all fifteen root helper exports and every integration case and platform declaration. The moved implementation and test bodies are unchanged except for indentation and a qualified documentation link. Document the helper boundary and preserve the one-file-per-case extension pattern. ## Tests Thirteen runtime unit functions pass on Linux; twelve pass on macOS, where one Linux-only function is excluded. linux_python_discovery_grants_runtime_libraries_without_the_usr_prefix pins Linux runtime selection. the_probe_config_grants_only_the_runtime_directories_and_declares_the_search_path pins narrow runtime grants. the_git_tool_config_declares_the_real_git_and_claims_nothing_about_lookup pins the tool configuration. Independent source comparison verifies all moved bodies and public root exports. The combined rename and both helper patches pass 124 Linux integration cases with nine declared macOS-only skips. All 133 case records are present; 100 harness library unit tests and sixteen support checks pass. Full workspace tests, all-features build, formatting, repository Clippy, strict harness Clippy, and strict private rustdoc pass. Workspace output retains the missing credential-daemon and partial alias-read diagnostics. The example gate builds successfully but executes zero examples because no scripted examples remain. No new functional coverage is claimed. Native macOS checks cover helper units and compilation; full macOS integration and deployment qualification are separate.
|
Assessment: Approve I reviewed head Assumptions and rules checked (all held)
Description accuracy (optional): the PR description and commit message say the only non-move edit is "one qualified documentation link". Three more edits are in the diff:
On base This is a well-scoped split, and the source-equivalence evidence makes it easy to review. |
Superseded by #249. The author requested combining runtime-helper organization with readable integration-test names. PR249 preserves this exact implementation and commit history; cleanup remains separate in #256. The evidence below describes this original standalone PR.
Human readable section
Problem: Native interpreter discovery and platform configuration share one large file with fixture execution, making their boundaries harder to maintain.
Solution: Move those helpers and their thirteen existing unit test functions into a private runtime module. Keep every public root helper name available to existing cases.
Trade-off: Internal unit-test module paths move to
runtime::tests; filters using the old full unit-test path need updating. Integration case paths and behavior stay unchanged.Description
Independent source comparison verifies all fifteen root helper exports. The moved implementation and test bodies are identical after formatting, except for one qualified documentation link.
Three existing documentation warnings are also corrected: the
probe_pyruntime link, the private egress constant link, and egress-case list spacing. No production code, case assertion, platform declaration, or ignored status changes.The README states where runtime discovery belongs and how to extend independently reported integration cases.
Concurrent cleanup and shared scenario helpers are a separate companion change; the combined validation below includes them and naming PR #249.
CN-I-11do not prove terminal isolation; complete Linux/macOS parity is not established.The nine Linux skips are
CN-D-01,CN-D-02,CN-E-04,CN-F-02,CN-F-03,CN-I-13,CN-L-01,CN-P-02, andCN-T-05.They are actual test cases declared for macOS. Linux-specific cases test different supported boundaries; this refactor does not close the remaining platform gaps.
The Linux test-gate enforcement from #185 is unchanged. Deployment qualification remains separate.
Related Issues
Companion to naming PR #249 and the integration coverage work in #187.
Execution cleanup and scenario sharing are in companion PR #256. Both PRs target
mainand apply cleanly together.The unit-test owner retains Box and containment source ownership. The separate live HTTP repair owns
crates/box/tests/box_telemetry.rs.Type of Change
Other: Test harness organization.
Testing
Exact source. Base
e4ca8b80359b2213d684de31cd6ef32e0d61478a; published head2ebeeade92a82598e0034a670403b15e90904aef.The candidate tree is
9a19007bf36c8af10ce627d1a34cc541a72e5680, with patch SHA-256465afa8d9a33bf0333ba5640880cb20dfb561921a975de01e009e164d62142ec.The combined check applies #249 head
49f7f1b6fb9476061d5e26e40a57df27e4712aa7and both helper patches to that base.Its exact tree is
86bb858b0ce3b033b304a030401ef253fb080dc4.The raw verdict records
box_commit: unknown; the verified trees, patch hashes, and build receipts identify its source. The base commit alone does not identify the tested patch set.Linux environment. Amazon Linux
2023.12.20261102as reported by/etc/os-release, AArch64, kernel6.12.113-138.209.amzn2023.aarch64, Rust/Cargo 1.98.1.Runs used
EXPERIMENTAL_LINUX_SUPPORT=TRUE,CARGO_BUILD_JOBS=2, and the builttarget/debugdirectory first onPATH.The alias helper was also installed beside the workspace test binaries.
HOMEwas unchanged.box_librarytarget emits no count and is excluded.The full workspace is unchanged by these standalone harness edits. Its checks ran on the process candidate; source comparison confirms identical workspace sources for the runtime candidate.
The final combined deterministic run covers both helper implementations and the 133 case renames from #249. Earlier isolated candidate runs and native patch hashes match these source changes.
A combined formatting attempt with
--allencountered the enclosing checkout's workspace discovery throughtest-common; formatting the changed standalone crate passed.No source or assertion changed to bypass that setup error.
Commands, from the applicable checkout root with the environment above:
justis absent on this Linux host, so the listed Cargo commands ran its relevant gates directly.The combined checkout used
CARGO_TARGET_DIR=<primary-checkout>/test-integ/targetand the primary checkout's unchanged Box binaries.Native macOS used
cargo test --manifest-path test-integ/Cargo.toml --all-features --lib runtime::tests -- --show-output, followed by--all-features --no-run,cargo fmt --check, andcargo build --no-default-featuresfor the same manifest.Hosted validation. CI run 41286776896 passed for head
2ebeeade92a82598e0034a670403b15e90904aef, checked out as merge revision3c4114302277385b07b355d443e384ee3c258875against the base above. All applicable checks, including CodeQL Rust, passed.The hosted workspace Rust and native-filesystem jobs were skipped by their changed-path filters. The local workspace evidence above remains separate.
The automated reviewer found no issues on this head. Its prose approval is not a formal GitHub approval. Its independent unit run lacked the Box binary for three tests; the configured local and hosted runs above passed.
Formal required approval and merge remain outstanding. Deployment qualification is outside this PR.
just check, orcargo test --workspace --all-features).cargo fmt --alland the repository Clippy gate; the existing lint allowances are listed 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.