Skip to content

test(use-cache): avoid bound capture ordering assumption - #2845

Merged
james-elicx merged 1 commit into
mainfrom
codex/fix-use-cache-bound-action-test
Aug 10, 2026
Merged

test(use-cache): avoid bound capture ordering assumption#2845
james-elicx merged 1 commit into
mainfrom
codex/fix-use-cache-bound-action-test

Conversation

@james-elicx

Copy link
Copy Markdown
Member

Summary

Root cause

The runtime behavior is correct. The test rendered two differently bound cached functions but paired the first encrypted envelope with the first fixture value positionally. The squash merge changed generated module/reference ordering, so the first envelope decoded to the second fixture value and the assertion failed.

Failed main run: https://github.com/cloudflare/vinext/actions/runs/31342961567/job/93319976210

Validation

  • vp test run tests/app-router-production-server.test.ts -t "resolves nested 'use cache' functions passed as props"
  • vp check tests/app-router-production-server.test.ts

@pkg-pr-new

pkg-pr-new Bot commented Aug 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@2845
npm i https://pkg.pr.new/create-vinext-app@2845
npm i https://pkg.pr.new/@vinext/types@2845
npm i https://pkg.pr.new/vinext@2845

commit: 96d4dcf

@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
workers-cache preview production
web preview production

@github-actions

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared 96d4dcf against base 373e826 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 134.7 KB 134.7 KB ⚫ -0.0%
Client entry size (gzip) vinext 122.2 KB 122.2 KB ⚫ -0.0%
Dev server cold start vinext 2.98 s 3.00 s ⚫ +0.7%
Production build time vinext 3.27 s 3.28 s ⚫ +0.2%
RSC entry closure size (gzip) vinext 114.3 KB 114.3 KB ⚫ -0.0%
Server bundle size (gzip) vinext 191.9 KB 191.9 KB ⚫ -0.0%

View detailed results and traces

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

@james-elicx
james-elicx merged commit 9962354 into main Aug 10, 2026
76 of 77 checks passed
@james-elicx
james-elicx deleted the codex/fix-use-cache-bound-action-test branch August 10, 2026 00:07
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