fix(artifact): emit valid range headers - #287
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Author
|
CI follow-up: the first run exposed that the global Worker budget command assumed every Worker dependency graph had already been built. This PR now adds an explicit all-Worker prerequisite build before measuring budgets; the command and |
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.
Why
Production QA of the new R2 transport found that a valid
Range: bytes=0-15request returned the correct 16 bytes and HTTP 206, but emittedContent-Range: bytes NaN-NaN/<size>.Cloudflare's R2 runtime range object can expose the
suffixproperty with an undefined value. Property-presence narrowing therefore selected the suffix branch even for offset/length requests.What changed
suffixas active only when it is numeric.offsetandlengthvalues before normalizing the returned range.No database, API contract, or deployment-topology changes.
Verification
pnpm --filter @cheatcode/artifact-worker lintpnpm --filter @cheatcode/artifact-worker typecheckpnpm --filter @cheatcode/artifact-worker buildpnpm lintpnpm typecheckpnpm turbo build --forcepnpm deadcode(existing configuration hints only)pnpm architecture:checkpnpm turbo skills:buildpnpm worker:performance-budgetsAll commands ran with Node 24.18.0 and pnpm 11.15.0. Production validation before this fix also confirmed HTTP 206/16-byte delivery, ETag-backed 304, and invalid-range 416; the exact same flow will be repeated after deployment to verify the corrected
Content-Rangevalue.