Repository navigation
CI: share test helpers in the last 4 modules (#824) - #1439
Merged
Mikola Lysenko (mikolalysenko) merged 3 commits intoOct 12, 2026
Merged
Conversation
Assisted-by: Claude Code:claude-opus-5-5
7 tasks
Four shared test modules (vex_e2e_common, vlt_e2e_common, vlt_hosted_common, vlt_vendor_common) still carried their own copy of the git-blob hash, and vex_e2e_common its own binary(). Its copy called production's hasher, so a test comparing the two could pass against a broken implementation. Both helpers now live in tests/common/oracle.rs. common re-exports them, and the shared modules pull the file in with #[path] and re-export it, the way common/hermetic.rs is shared. The pending list in cli/shared_helper_copies.rs is gone, so the check now covers every test file outside common/. Closes #824. Assisted-by: Claude Code:claude-opus-5-5
The doc still said test files carry their own helper copies and could migrate later. That migration is now done. Assisted-by: Claude Code:claude-opus-5-5
Mikola Lysenko (mikolalysenko)
marked this pull request as ready for review
October 12, 2026 17:24
Collaborator
Author
|
BugBot review Generated by Claude Code |
Tanmay Singla (Tanmay182003)
approved these changes
Oct 12, 2026
Mikola Lysenko (mikolalysenko)
deleted the
agent/fix-ci-test-helper-copies-6
branch
October 12, 2026 17:58
This was referenced Oct 12, 2026
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
Fixes #824
Summary
This is the last slice of #824. Four shared test modules still had their
own
git_sha256, andvex_e2e_commonalso had its ownbinary(). Theycouldn't use
commonbecause not every test target that includes themalso declares
mod common:vex_e2e_common/mod.rsbinary(), plus agit_sha256that called production's hasher, so any check in those suites that compared the two was circularvlt_e2e_common/mod.rsgit_sha256vlt_hosted_common/mod.rsgit_sha256vlt_vendor_common/mod.rsgit_sha256Change
binary()andgit_sha256move into a newtests/common/oracle.rs.common/mod.rsre-exports them, so the existingoracle_selftestsstillpin the hash to the Git-blob golden values and to production's hasher.
vex_e2e_common,vlt_hosted_commonandvlt_vendor_commonpull inoracle.rson its own with#[path]and re-export it.common/hermetic.rsand
common/cache_env.rsare already shared this way.vlt_e2e_commonalready includes
common, so it re-exportscommon::git_sha256.PENDING_PRIVATE_HELPERSis deleted fromcli/shared_helper_copies.rs, sothe ratchet now covers every test file outside
common/.common/mod.rsloses its stale "migrate in a follow-up" doc.CI cost
This is a test-only change with no workflow edits. A lean PR run keeps the
same job count (~28 Linux jobs) and job-minutes (~8 min wall).
Test evidence
Run locally (as root, Rust 1.93.1):
cargo fmt --all -- --check: cleanRUSTFLAGS="-D warnings" cargo check --locked --workspace --all-targets --all-features(the CI test-target gate): clean
cargo test -p socket-patch-cli --all-featuresfor these targets:cli110/110e2e_vex_lockfile345/345 (usesvex_e2e_common::git_sha256)e2e_vlt27 pass, 9 ignoredin_process_vendor132/132 (usesvlt_vendor_common)rollback57/57 andapply132 pass, 1 ignored (usevlt_hosted_common)get86/86 andspawn_env_hygiene14/14in_process_redirect: 139 pass, 3 fail. All three(
partial_lockfile_write_failure_exits_1_and_writes_no_ledger,redirect_json_mode_write_failures_emit_error_envelope,vlt::scan_redirect_vlt_heal_invalidation_failure_warns) make adirectory read-only with
chmod 0o555and expect the write to fail,which can't happen when running as root. They don't involve the
helpers changed here.
pub fn git_sha256(..)tovlt_vendor_common/mod.rsturnscli::shared_helper_copies::no_new_private_binary_or_git_sha256red(
["vlt_vendor_common/mod.rs"]). Without it the test is green. Before thisPR, that file was exempt.
Per-issue checklist:
common/definesbinary()/git_sha256.no_new_private_binary_or_git_sha256enforces this with noallow-list.
/code-review high
I fixed one finding (the stale
common/mod.rsdoc). I didn't change codefor three others:
pub use <production hasher> as git_sha256. Thatshape doesn't exist in the tree, and covering re-export aliases would need
a parser-level check for a hypothetical case.
oracle_selftestsstay incommon/mod.rs, notoracle.rs. There isone source file, and dozens of targets that include
commonpin it everyCI run. Moving the tests would compile and run them in every target again.
vlt_e2e_commonre-exportscommon::git_sha256instead of includingoracle.rs. It already compilescommon, so another#[path]includewould add a second copy of the same file to that target.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Hiv3kKKJLF4NHLhReP3vim
Generated by Claude Code