test(cache): run commands against the remote cache test server - #754
Merged
Merged
Conversation
wan9chi
added this pull request to stack #751
September 24, 2026 17:43
fspy benchmarklinuxmacoswindows |
wan9chi
force-pushed
the
remote-cache-test-server
branch
from
September 25, 2026 02:04
866960a to
ad5e614
Compare
`remote-cache-server <command> [args...]` starts the backend on a free loopback port under the `/projects/test` base path, runs the command with `VP_REMOTE_CACHE_URL` set to that endpoint, and exits with the command's exit code after stopping the server. State lives in `remote-cache/` in the working directory, so consecutive E2E steps share entries and blobs, and blob IDs keep counting across invocations. This replaces `start`, `stop`, the detached daemon, `cache.url`, `cache.log`, the `--base-path`, `--max-request-bytes`, and `--max-lifetime-ms` options, and the request size limit. `cbor-http` now joins its path onto `VP_REMOTE_CACHE_URL`. Fetch responses follow the server API in #713: a miss returns `{kind: "not_found"}`, and a fallback also returns the entry's value and blob ID. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
wan9chi
force-pushed
the
remote-cache-test-server
branch
from
September 25, 2026 02:13
ad5e614 to
0439c07
Compare
wan9chi
marked this pull request as ready for review
September 25, 2026 02:27
This was referenced Sep 25, 2026
wan9chi
added a commit
that referenced
this pull request
Sep 25, 2026
## Motivation The remote cache test server from #754 handles cases the tests never hit: signals sent to the wrapper, a missing command, spawn failures, non-numeric blob IDs, and `cbor-http` calls with an absolute URL or without `VP_REMOTE_CACHE_URL`. Test infra should only handle what the tests exercise. `remote-cache-server` now starts the server, runs the command, closes the server, and exits with the command's exit code. The blob route and state loading check whether the file exists. `cbor-http` always appends its path to `VP_REMOTE_CACHE_URL`. The `command_wrapper` case goes away; the other snapshots are unchanged. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Motivation
The remote cache client PRs stacked on this one need to run
vpagainst the test backend, with uploads from one step visible to the next, for example to restore outputs aftervp cache clean. The detached daemon needs explicitstartandstopsteps and loses its state on restart. Its fetch responses also differ from the server API in #713, which the client will implement.remote-cache-server <command> [args...]starts the backend on a free loopback port under the/projects/testbase path, runs the command withVP_REMOTE_CACHE_URLset to that endpoint, and exits with the command's exit code after stopping the server. The command inherits stdio, and the wrapper takes no options. State lives inremote-cache/in the working directory:state.jsonholds entries, associations, and the next blob ID, and each blob is a file inblobs/named by its ID. Consecutive steps share state, and blob IDs keep counting across invocations, so snapshots stay deterministic.This removes
start,stop, the daemon,cache.url,cache.log, the--base-path,--max-request-bytes, and--max-lifetime-msoptions, and the request size limit.cbor-httpjoins its path ontoVP_REMOTE_CACHE_URL, including the base path. As in #713, a fetch miss returns 200{kind: "not_found"}, and a fallback returns{kind: "fallback", key, value, blob_id}.The
remote_cache_backendsteps now run asremote-cache-server cbor-http .... Therequest_limitcase is removed.daemon_lifecycleis replaced bystate_across_invocations, and a newcommand_wrappercase covers the endpoint's base path and the exit code.