Conversation
`vt_remote_cache::Client::new` now takes an `Auth`, which supplies the headers for each request by operation (fetch, download, or store). It can use the client's HTTP client to get credentials, and when it fails, the request isn't sent and the operation fails with `Error::Auth`. `vp run` uses `Anonymous`, which adds no headers, so requests are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wan9chi
added this pull request to stack #799
October 4, 2026 07:52
fspy benchmarklinuxmacoswindows |
This branch has not been deployed
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 self-hosted remote cache server in #718, designed in #716, serves reads to anyone but accepts a store only with a GitHub Actions OIDC token. Other servers will need other credentials. For example, a private cache behind Cloudflare Access could need headers on every request. This adds one general hook so each kind of credentials is a separate implementation, and the client doesn't need to know about any of them.
Changes
vt_remote_cache::auth::Authsupplies the headers for each request, given its operation: fetch, download, or store. It can use the client's HTTP client to get credentials, such as a token, and that client doesn't follow redirects. If it fails, the request isn't sent, and the operation fails with the newError::Auth("failed to authenticate").Client::new(endpoint, auth)takes the auth.Anonymousadds no headers.vp runusesAnonymousfor now, so requests don't change.The next PR in this stack adds GitHub Actions OIDC as the first auth with credentials.
🤖 Generated with Claude Code