Repository navigation
Fix nightly bun.lockb e2e for the hosted-pin eject - #1772
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Conversation
#1648 made plain `vendor` with a hosted pin in scope eject the lockfile's hosted patch: it fetches the patch record from the API and refuses an --offline run up front with `offline_eject_unavailable`. It updated the PR-tier tests (vendor_eject_bun_lockb.rs) but not e2e_bun_lockb.rs, whose tests are #[ignore] and run only in the nightly e2e-extended legs, so the 1.0.36, 1.1.45 and 1.4.2 e2e_bun_lockb legs have failed on main since it landed. Assert the new contract: the offline vendor is refused with `offline_eject_unavailable`; the online vendor is pointed at the mock API (--api-url/--org/--api-token) so the eject can fetch the record, and it reports no per-purl takeover advisory. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeSVRFUn2uamhKgw5V5
|
bugbot run 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 b5fad72. Configure here.
|
Burn-down agent: closing as a duplicate of #1771. Both PRs fix the same nightly Generated by Claude Code |
Problem
The nightly CI run on main (run 40639505834, 2026-10-28 05:42 UTC, head b787454) is red on three
e2e_bun_lockblegs, a new failure that started with #1648:e2e_bun_lockb, 1.0.36native_binary_hosted_vendored_takeover_roundtripexpected redirect_revert_failed, gotoffline_eject_unavailable(e2e_bun_lockb.rs:928)e2e_bun_lockb, 1.1.45e2e_bun_lockb, 1.4.2binary_shared_bundled_record_hosted_pin_is_managedpatch_fetch_failed/eject_refused: the eject asked the real API for the mock's patchNightly on main has also been red every day since 10-22, but each earlier day had a different cause (Windows path forms, gem, pdm vex). This PR fixes only today's new e2e_bun_lockb regression.
Root cause
#1648 changed plain
vendorwith a hosted pin in scope from a per-purl takeover into an eject: it fetches the hosted patch record from the API (patches/view), and an--offlinerun is refused up front withoffline_eject_unavailable. #1648 updated the PR-tier tests for the same paths (vendor_eject_bun_lockb.rs,mode_migration_bun.rs, …). It missede2e_bun_lockb.rs, whose tests are#[ignore](they need a real Bun) and run only in the nightlye2e-extendedlegs. So the PR and merge-queue CI passed, and main's nightly broke.Fix
Test-only. In
crates/socket-patch-cli/tests/e2e_bun_lockb.rs, the tests now assert #1648's contract the same wayvendor_eject_bun_lockb.rsalready does:error.code == offline_eject_unavailableand the "re-run without --offline" remedy, and still write nothing.--api-url/--org/--api-tokenpointing at the wiremock, which already serves/v0/orgs/{ORG}/patches/view/{uuid}. The vendor still keeps--patch-server-url, so the hosted URL in the lock is recognized.vendor_takeover_reverted_redirectand noredirect_revert_failed(the same check astakeover_vendors_over_a_hosted_bun_lockb_and_reverts_exactly).No assertion was dropped without replacement. Everything after the eject (ledger original, exact revert, offline re-vendor, outage rerun, VEX matrices, rollback refusal) is unchanged.
Proof (local, with the exact nightly Bun releases)
SOCKET_PATCH_BUN_LOCKB_{READER,VERSION,REQUIRED,EXTENDED,PRODUCTION}set as the nightly legs set them:--include-ignored: 23 passed. 1 failed:native_binary_alias_and_transitive, because this sandbox gets a 403 fromapi.github.comfor a git dependency. It passes in CI.--include-ignored: 22 passed.native_binary_hosted_vendored_takeover_roundtripnow passes; before this PR it failed exactly as in CI.binary_shared_bundled_record_hosted_pin_is_managednow gets past the eject. It then fails later, in itsrollbackleg, because this sandbox can't reachpatches-api.socket.dev/patch/blob/…. The same test fails the same way locally at fix: vendor hosted patches directly from lockfiles #1648's parent (8244b94), yet that leg was green in CI on 10-27. So it is environmental. This leg is confirmed only by the next nightly (or aworkflow_dispatchof CI on this branch, if a reviewer wants it before merging).cargo fmtis clean on the touched file.cargo clippy -p socket-patch-cli --test e2e_bun_lockb -- -D warningsreports nothing in this file; its existing warnings are all intests/prebuilt_common/mod.rs.Where the tests run
Unchanged: nightly
e2e-extended(e2e_bun_lockb× Bun 1.0.36 / 1.1.45 / 1.4.2 / 1.3.14). Nothing was added, removed or moved.Not in this PR (same nightly run, for follow-up)
mode_migration_vltvlt_pinned_matrix_migration_{dry_run_parity,hosted_then_vendored}fails on 6 legs (Linux, Windows, macOS). It looks like the same fix: vendor hosted patches directly from lockfiles #1648 eject fallout in another#[ignore]suite.coverage-docker (deno)failed on a network blip:curl https://deno.land/install.shexited with 56.Generated by Claude Code
Note
Low Risk
Test-only updates to e2e assertions and CLI flags in ignored nightly tests; no runtime behavior changes.
Overview
Updates nightly-only
e2e_bun_lockb.rsexpectations to match #1648’s hosted-pin eject behavior (already covered in PR-tier tests likevendor_eject_bun_lockb.rs).Offline vendor over a binary hosted pin (dry and wet) now asserts a top-level
offline_eject_unavailableerror and a “re-run without--offline” message, instead of aredirect_revert_failedevent—still requiring exit code 1 and no filesystem writes.Online vendor in
native_binary_hosted_vendored_takeover_roundtripandbinary_shared_bundled_record_hosted_pin_is_managedadds--api-url/--org/--api-tokenaimed at the wiremock so eject can fetchpatches/viewlocally. Comments and assertions drop the retired takeover contract: responses must not mentionvendor_takeover_reverted_redirectorredirect_revert_failed.No production code changes; rest of each test flow is unchanged.
Reviewed by Cursor Bugbot for commit b5fad72. Configure here.
Generated by Claude Code