Repository navigation
CI: share test helpers in 17 more test files (#824) - #1402
Merged
Mikola Lysenko (mikolalysenko) merged 2 commits intoOct 11, 2026
Merged
Conversation
Seventeen CLI test files still carried their own copies of the binary() and git_sha256 helpers. They now use the shared ones in tests/common, so a fix to either helper reaches every suite at once. The helper-copy ratchet (cli/shared_helper_copies.rs) drops these files from its pending list, plus a stale entry for a deleted file, so new copies there fail the test. The scan/ and repair/ files that an open PR touches and the four shared *_common modules stay pending. Refs #824 Assisted-by: Claude Code:claude-opus-5-5
7 tasks
in_process_alternate_installers and in_process_gem_apply compiled tests/common/cache_env.rs twice, once on its own and once inside mod common, so its selftests ran twice per run. Both files now use common::cache_env. Refs #824 Assisted-by: Claude Code:claude-opus-5-5
Mikola Lysenko (mikolalysenko)
marked this pull request as ready for review
October 11, 2026 22:19
Collaborator
Author
|
BugBot review Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 52739d9. Configure here.
Tanmay Singla (Tanmay182003)
approved these changes
Oct 11, 2026
Collaborator
Author
|
Ready for review at
Generated by Claude Code |
This was referenced Oct 11, 2026
Mikola Lysenko (mikolalysenko)
deleted the
agent/fix-ci-test-helper-copies
branch
October 11, 2026 23:56
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.
LLM Description written by Claude Code:claude-opus-5-5
Refs #824 (slice 4 of the shared-test-helper migration; the issue stays open for the remaining files).
What it does
Test-only. Seventeen CLI test files still defined their own
binary()and/orgit_sha256helpers. They now usetests/common's versions: top-level targets through#[path = "common/mod.rs"] mod common;, and theapply/,cli/androllback/directory targets throughuse crate::common::... Imports that the deleted copies needed (sha2::{Digest, Sha256},PathBuf) are dropped.scan_vendor_e2e.rskeepsuse sha2::Digestbecause it still callsSha512::digest.cli/shared_helper_copies.rs(the ratchet that stops new copies) removes those 17 files fromPENDING_PRIVATE_HELPERS, so any copy added back to them now fails the test. It also drops the stalediff_created_file_e2e.rsentry, because that file no longer exists.Every copy removed here had one of the two shapes the ratchet's header says
commonpins: the Git-blobsha256("blob <len>\0" ++ content), orenv!("CARGO_BIN_EXE_socket-patch"). So no test changes what it computes.Still pending (unchanged)
repair/covgap_commands_repair.rs,repair/covgap_commands_repair_vendor.rs,repair/repair_invariants.rs,scan/covgap_commands_fetch_stage.rs: open PR CI: hermetic spawns in scan/repair tests (#823) #1398 changes these files, so they stay out of this PR to avoid conflicts.vex_e2e_common,vlt_e2e_common,vlt_hosted_common,vlt_vendor_common: shared modules whose includers don't all declaremod common.CI cost
No workflow change. A lean PR run is unchanged: same jobs and roughly the same job-minutes as before (about 28 Linux jobs, about 8 min wall time).
Validation
cargo fmt --all -- --check: cleancargo test -p socket-patch-cli --all-featureson all 17 touched targets (e2e_vex_vendor, the 11in_process_*files,remove_rollback_api_overrides,scan_vendor_e2e,apply,cli,rollback): all pass with 0 warnings. That includescli::shared_helper_copies, which checks the shrunken pending list.e2e_vex_vendorandscan_vendor_e2ehave no#[ignore]tests.cargo test --workspace, because the sandbox disk could not hold every test binary at once. Workspace clippy does not lint test targets. CI runs both./code-review high
No correctness findings. One cleanup fixed in 52739d9: `in_process_alternate_installers` and `in_process_gem_apply` compiled `common/cache_env.rs` twice (once on its own, once inside `mod common`). Both files now use `common::cache_env`, and both targets pass again. Findings left out on purpose:
🤖 Generated with Claude Code
https://claude.ai/code/session_017k2mexmgXxWiKdHrkRuRJC
Generated by Claude Code