Repository navigation
CI: update bun.lockb offline takeover test (#1770) - #1771
Mikola Lysenko (mikolalysenko) merged 3 commits into
Conversation
Assisted-by: Claude Code:claude-opus-5-5
The nightly bun 1.0 and 1.1 e2e legs have failed since vendor started ejecting hosted pins straight from the lockfile (#1648). An offline vendor now refuses up front with offline_eject_unavailable, and the online eject reports no separate takeover-revert event, but the takeover roundtrip test still expected the old behaviour. Assert the new offline refusal and the eject's events. Also point both binary-lock eject runs at the mock patch API (--api-url, --api-token, --org). Without those flags the eject fetched its patch record from the live public API, so the test depended on that service and on the fixture uuid existing there. Assisted-by: Claude Code:claude-opus-5-5
Check that the online eject fetched its patch record view from the mock server, and that the offline refusal made no request at all, so the test fails if the eject quietly takes another path. Update the comments to describe an eject rather than the old takeover. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
|
[agent] Heads-up for the reviewer: #1772 (ci-janitor) fixes the same #1770 failure in the same file with an equivalent change. This PR also asserts the offline refusal makes no request and that the online ejects read the record from the mock ( Generated by Claude Code |
|
Ready for review at
Generated by Claude Code |
|
Ready for review at
Generated by Claude Code |
Final review briefWhat it does. Test-only fix for the nightly Risk: low. One test file changed; no product code. The legs it fixes only run nightly, so PR CI can't prove them — I ran them locally (below). Look here
Verified
Changes I made: none. Open questions: none. Auto-merge (squash) is armed, so approving sends it straight to the merge queue. Generated by Claude Code |
LLM Description written by Claude Code:claude-opus-5-5
Fixes #1770
Summary
The nightly
e2e-extendedlegse2e_bun_lockb(bun 1.0.36 and 1.1.45) have been red on main since #1648 (run 40639505834). That PR changed hosted → vendored from a "takeover" into an "eject":vendor --offlinenow refuses up front withoffline_eject_unavailablewhen a hosted pin is in scope.vendor_takeover_reverted_redirectevent.#1648updated the in-process eject tests (vendor_eject_bun_lockb.rs). It missed the real-Bun suitee2e_bun_lockb.rs, whose binary-lock legs run only nightly, so PR and merge-queue CI never saw the failure.Changes (test-only,
crates/socket-patch-cli/tests/e2e_bun_lockb.rs)native_binary_hosted_vendored_takeover_roundtrip: the offline step now asserts exit 1,offline_eject_unavailablewith the re-run-online remedy, no files written and no request made, for both the dry run and the real run.binary_shared_bundled_record_hosted_pin_is_managed) now pass--api-url/--api-token/--orgfor the mock. Without them the eject fetched the record from the live public patch API (patches-api.socket.dev). The 1.4.2 leg was green only because that live service happened to serve the fixture's uuid.Evidence
On
origin/mainwith bun 1.0.36,native_binary_hosted_vendored_takeover_roundtripfails withexpected redirect_revert_failed, the same panic as the nightly.With this branch,
cargo test -p socket-patch-cli --all-features --test e2e_bun_lockb -- --include-ignoredpasses that test on bun 1.0.36, 1.1.45 and 1.4.2. These pass too:cargo fmt --all -- --checkcargo clippy --locked --workspace --all-features -- -D warningsTwo tests still fail locally only because of this sandbox's network. Both pass in CI on main today.
native_binary_alias_and_transitive: GitHub tarball 403 through the proxy.rollbackinbinary_shared_bundled_record_hosted_pin_is_managed: it fetches the before-blob from the live patch API.CI cost
No workflow change. A lean PR run keeps the same job count and minutes (about 28 Linux jobs, about 8 min). These legs stay nightly-only.
/code-review high
Fixed: weak negative-only assertions, the missing no-request check on the offline refusal, and stale "takeover" comments.
Not fixed:
fixture.stage()in the shared test. The laterrollback(.., copy_already_original = true)relies on that manifest.Follow-up (not in this PR)
rollback_refuses_binary_hosted_pin_then_checkoutstill downloads the before-blob from the live public patch API. Pointing it at the mock isn't enough, because the mock has no blob route. Making it hermetic is a separate test-harness change.https://claude.ai/code/session_011f9aeP7z55jFbL75HPMkHJ
Note
Low Risk
Test-only changes to e2e assertions and mock wiring; no production CLI or runtime behavior is modified.
Overview
Updates nightly real-Bun tests in
e2e_bun_lockb.rsso hosted → vendored flows match the eject behavior from #1648 (in-process tests were already updated; these legs only run in extended CI).Offline
vendorover a binary hosted pin now expects exit 1, top-leveloffline_eject_unavailablewith a re-run-online message, unchanged project snapshot, and no mock HTTP traffic (dry and wet), instead ofredirect_revert_failedin events.Online eject invocations in
native_binary_hosted_vendored_takeover_roundtripandbinary_shared_bundled_record_hosted_pin_is_managedpass--api-url/--api-token/--orgso patch records come from the wiremock, not the public API. Assertions now require a/patches/view/hit via new helperrecord_views, and explicitly expect novendor_takeover_reverted_redirectevent. Comments are retitled from takeover to eject.Reviewed by Cursor Bugbot for commit d80f222. Configure here.
Generated by Claude Code