test(smoke): regression for HEAD on cacheable-extension keys#97
Merged
Conversation
Guards the Cloudflare HEAD->GET cache-rewrite bug fixed in #95: for a key whose extension is in CF's cacheable static-asset set (.tif/.dmg/.zip/...), the edge rewrote the Worker's outbound HEAD into a GET, which failed SigV4 against the HEAD-signed presigned URL (403 SignatureDoesNotMatch). PUTs a `.tif` object to the writable real-S3 bucket and asserts HEAD returns 200. Only reproduces against the real Cloudflare edge, so it lives in the smoke suite (MinIO has no edge cache); gated on SMOKE_WRITE_BUCKET like the multipart-checksum regression. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
🚀 Latest commit deployed to https://multistore-proxy-pr-97.development-seed.workers.dev
|
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.
What
Adds a smoke-suite regression test for the Cloudflare HEAD cache-rewrite bug fixed in #95.
Why the smoke suite (not integration)
The bug is a Cloudflare edge behavior: for a URL whose extension is in CF's cacheable static-asset set (
.tif,.dmg,.zip, …), the edge rewrites the Worker's outboundHEADinto aGET. Because the proxy forwards reads via a presigned URL signed for the original method, that rewrittenGETfails SigV4 and S3 returns403 SignatureDoesNotMatch. The integration suite runs against MinIO, which has no edge cache, so it cannot reproduce this — only the smoke suite (deployed preview = real Cloudflare + real S3) can.The test
TestHeadOnCacheableExtensionPUTs a.tifobject to the writable real-S3 bucket and assertsHEADreturns 200 (before #95 this returned 403). Mirrors the existingTestMultipartUploadchecksum regression: gated onSMOKE_WRITE_BUCKET, uses theactions_credentialsrole, cleans up after itself.🤖 Generated with Claude Code