Skip to content

fix(response-store): stabilize cached variant selection - #3308

Merged
james-elicx merged 1 commit into
mainfrom
codex/fix-response-store-vary-selection
Sep 17, 2026
Merged

james-elicx merged 1 commit into
mainfrom
codex/fix-response-store-vary-selection

Conversation

@james-elicx

Copy link
Copy Markdown
Member

Summary

  • mark every framework selector as present on opaque Response Store lookup requests
  • keep original selector values encoded only in the opaque lookup key
  • preserve cached response status, body, and public headers

Why

The Response Store lookup URL already partitions every framework request selector. Giving each selector a fixed marker keeps cache variant selection consistent without forwarding large request values.

Testing

  • vp check packages/cloudflare/src/cache/response-store-adapter.worker.ts tests/cloudflare-response-store-worker.test.ts
  • vp test run tests/cloudflare-response-store-worker.test.ts
  • pnpm --filter @vinext/cloudflare exec vitest run tests/response-store-adapter.e2e.test.ts (17 tests)
  • vp run @vinext/cloudflare#build

@pkg-pr-new

pkg-pr-new Bot commented Sep 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vinext/cloudflare

npm i https://pkg.pr.new/@vinext/cloudflare@3308

create-vinext-app

npm i https://pkg.pr.new/create-vinext-app@3308

@vinext/types

npm i https://pkg.pr.new/@vinext/types@3308

vinext

npm i https://pkg.pr.new/vinext@3308

@cloudflare/workers-response-store

npm i https://pkg.pr.new/@cloudflare/workers-response-store@3308

commit: 7e3b957

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

You have an eight-minute time limit. Finish the review and post all findings within eight minutes.

@github-actions

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
response-store-demo preview production
static-export preview production
web preview production

@github-actions

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared 7e3b957 against base 91fa8d8 using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 142.2 KB 142.2 KB ⚫ +0.0%
Client entry size (gzip) vinext 129.6 KB 129.6 KB ⚫ +0.0%
Dev server cold start vinext 2.87 s 2.89 s ⚫ +0.7%
Production build time vinext 3.05 s 3.06 s ⚫ +0.6%
RSC entry closure size (gzip) vinext 121.0 KB 121.0 KB ⚫ -0.0%
Server bundle size (gzip) vinext 211.0 KB 211.0 KB ⚫ -0.0%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

@ask-bonk

ask-bonk Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@james-elicx
james-elicx marked this pull request as ready for review September 17, 2026 09:57
@james-elicx
james-elicx merged commit ebbebfc into main Sep 17, 2026
76 checks passed
@james-elicx
james-elicx deleted the codex/fix-response-store-vary-selection branch September 17, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant