Repository navigation
Use tests/common's binary() and git_sha256 in 5 more CLI test files (#824) - #1366
Mikola Lysenko (mikolalysenko) merged 3 commits into
Conversation
Assisted-by: Claude Code:claude-opus-5-5
Five more CLI test files drop their private copies of binary() and git_sha256 and import tests/common's instead, so a change to how the tests find the binary or hash a blob is made in one place. The shared vendor_ecosystem_fixtures module now reaches common's git_sha256, and its two includers declare mod common. mode_migration_npm and vendor_group_commit_e2e take cache_env, hermetic and envelope through common rather than loading those files a second time. No test changes what it asserts. The shared_helper_copies ratchet drops the migrated files. Assisted-by: Claude Code:claude-opus-5-5
|
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 d41d22f. Configure here.
|
[agent] Generated by Claude Code |
|
[agent] Generated by Claude Code |
LLM Description written by Claude Code:claude-opus-5-5
Refs #824 (children 2–3, slice 3)
Summary
Five more CLI test files drop their private
binary()/git_sha256and usetests/common's. After this change, finding the binary or hashing a blob is defined in one place for these files too.Why
register/20-audit-core.md. Living document:doc/08-tests-ci-docs.md(test-support bullet,{{C30}}).tests/common(4binary()and 3git_sha256), R L (test-only). This was the highest-scoring candidate that no open PR blocks. Every higher-ranked production candidate (the manifest-load cluster An unparseable .socket/manifest.json is reported under five different --json error codes depending on the command #931…, Upstream restore sends every public-registry lookup at once; the registry_concurrency cap has no caller #1220, Delete the vendored and hosted-vlt helpers left without a production caller by the v5 consolidation #782/E41, Vendored requirements.txt refuses asix (==1.16.0)pin that the inventory and hosted mode accept, because exact pins are read by three grammars #1365, Lock inventory and the vendored PyPI router disagree on which lock governs when poetry.lock or pdm.lock has no packages #1114, The public-proxy per-package fallback runs 10 requests in flight, ignoring SOCKET_API_CONCURRENCY and the proxy cap of 4 #614/Chunk patch batch searches through one core helper with one set of batch limits #675, Validate patch UUIDs through one utils::uuid grammar instead of five #705) changes files that one of the 81 open PRs also changes.What changed
e2e_vex_redirect.rs,scan_rollout_e2e.rsandmode_migration_npm.rsdeclare#[path = "common/mod.rs"] mod common;and importbinary(plusgit_sha256where they used it).get/global_packages_e2e.rsusescrate::common::binary. Thegetdirectory binary already declaresmod common.vendor_ecosystem_fixtures/mod.rsusescrate::common::git_sha256, and its two includers (vendor_group_commit_e2e.rs,vendor_ledger_schema_e2e.rs) declaremod common.mode_migration_npm.rstakescache_env/hermetic, andvendor_group_commit_e2e.rstakesenvelope, throughcommon. Before, they loaded the same files a second time through their own#[path]mods.cli/shared_helper_copies.rsremoves the 5 migrated files fromPENDING_PRIVATE_HELPERS.Deleted
Production: +0/−0. Tests: +24/−50 across 8 files.
Behavior
None. No test changes what it asserts.
common::git_sha256is the canonical Git-blob hash, andcommon'soracle_selftestspin it to production'scompute_git_sha256_from_bytes, which is the shape that both deleted kinds of copy had.Test evidence
cargo clippy --workspace --all-features -- -D warnings: clean.cargo test -p socket-patch-cli --all-featureswith these suites:--test cli: 105 passed (includes theshared_helper_copiesratchet).--test spawn_env_hygiene: 12 passed.--test e2e_vex_redirect: 52 passed.--test mode_migration_npm: 31 passed.--test scan_rollout_e2e: 37 passed.--test vendor_group_commit_e2e: 30 passed.--test vendor_ledger_schema_e2e: 27 passed, 1 ignored.--test get global_packages: 10 passed.prebuilt_commonlints and thecommon/jvm_env.rsduplicate-module warning, whichcliandgetemit onmaintoo. CI's clippy job doesn't lint test targets.Remaining (#824)
vex_e2e_common,vlt_e2e_common,vlt_hosted_commonandvlt_vendor_common: not every includer declaresmod common.Risk
Low. Only test files change.
🤖 Generated with Claude Code
Note
Low Risk
Only CLI test sources and the helper-copy ratchet list change; runtime behavior and test assertions are unchanged.
Overview
Test-only refactor (#824): Five more CLI integration test targets stop defining local
binary()/git_sha256()(and in some cases duplicate#[path]loads ofcache_env,hermetic, orenvelope) and wire throughtests/commoninstead.Affected binaries/modules include
e2e_vex_redirect,scan_rollout_e2e,mode_migration_npm,get/global_packages_e2e,vendor_ecosystem_fixtures(plusvendor_group_commit_e2e/vendor_ledger_schema_e2edeclaringmod common). Local SHA-256/blob hashing copies are removed in favor ofcommon::git_sha256, which is pinned to production’s Git-blob hash.The
cli/shared_helper_copiesratchet listPENDING_PRIVATE_HELPERSdrops those migrated paths so new private copies stay forbidden. No production or asserted test behavior changes—only shared helper usage and ~50 lines of duplicate test glue deleted.Reviewed by Cursor Bugbot for commit d41d22f. Configure here.