test: lake: mock remote cache artifact transfers - #14700
Draft
tydeu wants to merge 3 commits into
Draft
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Collaborator
|
Reference manual CI status:
|
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Mathlib CI status (docs):
|
mathlib-nightly-testing Bot
pushed a commit
to leanprover-community/batteries
that referenced
this pull request
Aug 6, 2026
mathlib-nightly-testing Bot
pushed a commit
to leanprover-community/mathlib4-nightly-testing
that referenced
this pull request
Aug 6, 2026
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.
This PR adds a Lake test which performs mock artifact transfers to/from a remote cache service using a mock Python HTTP server. This serves as an alternative to the existing online cache test which covers full integration with Reservoir but also requires secrets and network access and is thus ill-suited for CI.
This PR also fixes
test_errin the Lake test harness, which did not fail when an Lake invocation unexpectedly succeeded. All tests still pass, so no failures were obscured by this issue.Test Cases
cache put,put-staged, andstage, plus rejected artifact and outputs uploadscache getby--scopeand by--repo,--force-download,--mappings-only, revision search and--max-revs, and platform- and toolchain-partitioned revision pathsContent-Length, a connection closed with no response, a response carrying no body at all, and an error response whose body is not an artifactcurlthat reports no transfer while claiming success, one that reports failure for artifacts that arrived complete, and one that reports success for artifacts it never wrotelake cache get#14698: a batch in which one artifact yields no output file must report "failed to download some artifacts" and retain the artifacts that did transfer, rather than abort on the missing file.Failure case also assert exactly which artifacts remain in the local cache, and those that could poison it assert that a subsequent good fetch still succeeds.
🤖 Prepared with Claude Code