Repository navigation
Fix gem vex stub rejecting the capabilities query (#2492) - #2493
Mikola Lysenko (mikolalysenko) wants to merge 2 commits into
Conversation
Assisted-by: Claude Code:claude-fable-5-2
The loopback patch API in stage 2b of docker_e2e_vendor_gem answered a request only when the raw request target ended with /view/<uuid>. The CLI sends its capabilities as a query string on patch API requests, so the stub answered 404 and the ledger-less vex reported record_unavailable. Compare and log the path alone. Fixes #2492 Assisted-by: Claude Code:claude-fable-5-2
|
bugbot run Generated by Claude Code |
PR SummaryLow Risk Overview After #2433, the CLI appends Reviewed by Cursor Bugbot for commit 8816fd7. Configure here. |
|
[agent] PR shepherd: final review brief What it does. The gem Docker e2e's loopback patch API stub (stage 2b, ledger-less Risk: low. Test-only, one Ruby line in a Docker test script; no product code changes. Look here
Verified: read the diff and the stub around it, and confirmed the CLI sends the query on view requests. Changes I made: none. Generated by Claude Code |
LLM Description written by Claude Code:claude-fable-5-2
Fixes #2492
Summary
coverage-docker (gem)is red onmainbecause of the test's ownstand-in patch API, not the product. This is a one-line change to that
stand-in, in
crates/socket-patch-cli/tests/docker_e2e_vendor_gem.rs.No product code changes.
Root cause
Stage 2b of
docker_e2e_vendor_gemruns a hand-written loopback patchAPI (a Ruby
TCPServer) inside the container. It answered a request onlywhen the raw request target ended with
/view/<uuid>. The CLI sends itscapabilities as a query string on patch API requests (#2433), so the target
is
/patch/view/<uuid>?capabilities=file-modes. The stub answered 404, andthe ledger-less
vexreportedrecord_unavailable.The issue reads the failure as step 1 of the stage (ledger kept, offline).
The log shows that step passing (
===ML LEDGER VEX VERIFIED===); the stepthat fails is step 2, the ledger-less
vexagainst the stub, with thewarning
vex_record_not_foundand the request/patch/view/<uuid>?capabilities=file-modesin the stub's log.The stub now compares and logs the path without the query string. The log
assertion behind it (
grep "/view/<uuid>$") then holds as written.No other suite has this mistake: the wiremock-based tests match on
url.path(), and this is the only hand-written stub that serves theviewroute.Evidence
Run locally in Docker with
SOCKET_PATCH_DOCKER_E2E_REQUIRED=1(so amissing image fails instead of skipping), Ruby 3.3 and Bundler 2.7.2:
gem_vendor_fresh_checkout_bundle_install_and_revertgem_vendor_lockfile_checksums_fresh_checkout_and_revertmain(d987721)FAIL: ledger-less vex exited 1, the same output as the nightlyBoth tests cover #2492.
--test docker_e2e_gemalso passes (2 of 2).Two notes on the local run:
built from
ruby:3.3-bookworminstead oftests/docker/Dockerfile.gem'sslim image plus apt packages. The CLI in it was built from this branch in
the base Dockerfile's pinned Rust image.
coverage-dockerruns nightly, on dispatch and under the full CI scope,so this PR's own checks may not run the suite. The next nightly on
mainis the confirmation in CI.
Local checks:
cargo fmt --checkon the touched file passes, andcargo clippy --locked -p socket-patch-cli --all-features -- -D warnings(the form CI runs) passes. With
--all-targetsadded, clippy reportserrors on
mainin test helpers this PR does not touch(
tests/prebuilt_common/mod.rs,tests/common/mod.rsand others); theyare not gated by CI and are left alone here.
/code-review highon the diff returned no findings.https://claude.ai/code/session_011f9aePUqSYEbT8jokLFv22
Generated by Claude Code