Skip to content

fix: add x-action-forwarded guard and E2E tests for server action forwarding loop #4287

fix: add x-action-forwarded guard and E2E tests for server action forwarding loop

fix: add x-action-forwarded guard and E2E tests for server action forwarding loop #4287

Triggered via pull request May 17, 2026 09:56
Status Failure
Total duration 3m 38s
Artifacts 3

ci.yml

on: pull_request
Matrix: create-next-app
Matrix: e2e
Matrix: test-integration
Vitest (integration report)
28s
Vitest (integration report)
Fit to window
Zoom out
Zoom in

Annotations

6 errors, 1 warning, and 13 notices
Vitest (unit)
Process completed with exit code 1.
[unit] tests/request-pipeline.test.ts > INTERNAL_HEADERS > matches Next.js's exact header list: tests/request-pipeline.test.ts#L671
AssertionError: expected [ 'x-middleware-rewrite', …(10) ] to deeply equal [ 'x-middleware-rewrite', …(9) ] - Expected + Received @@ -7,6 +7,7 @@ "x-middleware-next", "x-now-route-matches", "x-matched-path", "x-nextjs-data", "x-next-resume-state-length", + "x-action-forwarded", ] ❯ tests/request-pipeline.test.ts:671:30 ❯ node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.1.21_@opentelemetry+api@1.9.1_@types+node@25.2.3_@vitest_52611dc58883b093fa99a08e01844f15/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/chunk-artifact.js:302:14 ❯ node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.1.21_@opentelemetry+api@1.9.1_@types+node@25.2.3_@vitest_52611dc58883b093fa99a08e01844f15/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/chunk-artifact.js:1903:28 ❯ node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.1.21_@opentelemetry+api@1.9.1_@types+node@25.2.3_@vitest_52611dc58883b093fa99a08e01844f15/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/chunk-artifact.js:2326:24 ❯ runWithCancel node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.1.21_@opentelemetry+api@1.9.1_@types+node@25.2.3_@vitest_52611dc58883b093fa99a08e01844f15/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/chunk-artifact.js:2323:12 ❯ node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.1.21_@opentelemetry+api@1.9.1_@types+node@25.2.3_@vitest_52611dc58883b093fa99a08e01844f15/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/chunk-artifact.js:2305:24 ❯ runWithTimeout node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.1.21_@opentelemetry+api@1.9.1_@types+node@25.2.3_@vitest_52611dc58883b093fa99a08e01844f15/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/chunk-artifact.js:2272:12 ❯ node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.1.21_@opentelemetry+api@1.9.1_@types+node@25.2.3_@vitest_52611dc58883b093fa99a08e01844f15/node_modules/@voidzero-dev/vite-plus-test/dist/@vitest/runner/chunk-artifact.js:2955:70
E2E (app-router)
Process completed with exit code 1.
[app-router] › tests/e2e/app-router/server-actions.spec.ts:238:7 › Server action forwarding loop guard › middleware rewrite of action POST does not hang (no forwarding loop): tests/e2e/app-router/server-actions.spec.ts#L252
1) [app-router] › tests/e2e/app-router/server-actions.spec.ts:238:7 › Server action forwarding loop guard › middleware rewrite of action POST does not hang (no forwarding loop) Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(received).toContain(expected) // indexOf Expected substring: "action-ok" Received string: "" Call Log: - Timeout 10000ms exceeded while waiting on the predicate 250 | const text = await page.locator("#action-result").textContent(); 251 | expect(text).toContain("action-ok"); > 252 | }).toPass({ timeout: 10_000 }); | ^ 253 | }); 254 | 255 | // Ported from Next.js: test/e2e/app-dir/action-forward-loop/action-forward-loop.test.ts at /home/runner/work/vinext/vinext/tests/e2e/app-router/server-actions.spec.ts:252:8
[app-router] › tests/e2e/app-router/server-actions.spec.ts:238:7 › Server action forwarding loop guard › middleware rewrite of action POST does not hang (no forwarding loop): tests/e2e/app-router/server-actions.spec.ts#L252
1) [app-router] › tests/e2e/app-router/server-actions.spec.ts:238:7 › Server action forwarding loop guard › middleware rewrite of action POST does not hang (no forwarding loop) Error: expect(received).toContain(expected) // indexOf Expected substring: "action-ok" Received string: "" Call Log: - Timeout 10000ms exceeded while waiting on the predicate 250 | const text = await page.locator("#action-result").textContent(); 251 | expect(text).toContain("action-ok"); > 252 | }).toPass({ timeout: 10_000 }); | ^ 253 | }); 254 | 255 | // Ported from Next.js: test/e2e/app-dir/action-forward-loop/action-forward-loop.test.ts at /home/runner/work/vinext/vinext/tests/e2e/app-router/server-actions.spec.ts:252:8
CI
Process completed with exit code 1.
E2E (app-router)
No files were found with the provided path: playwright-report/. No artifacts will be uploaded.
🎭 Playwright Run Summary
13 passed (6.8s)
🎭 Playwright Run Summary
2 passed (6.2s)
🎭 Playwright Run Summary
16 passed (9.1s)
🎭 Playwright Run Summary
22 passed (12.5s)
🎭 Playwright Run Summary
1 passed (13.3s)
🎭 Playwright Run Summary
7 passed (12.1s)
🎭 Playwright Run Summary
17 passed (13.5s)
🎭 Playwright Run Summary
38 passed (19.6s)
🎭 Playwright Run Summary
38 passed (12.2s)
🎭 Playwright Run Summary
1 passed (9.7s)
🎭 Playwright Run Summary
87 passed (23.5s)
create-next-app (windows-latest)
NOTICE: windows-latest requests are being redirected to windows-2025-vs2026 by June 15, 2026
🎭 Playwright Run Summary
1 failed [app-router] › tests/e2e/app-router/server-actions.spec.ts:238:7 › Server action forwarding loop guard › middleware rewrite of action POST does not hang (no forwarding loop) 8 skipped 371 passed (2.5m)

Artifacts

Produced during runtime
Name Size Digest
blob-report-1
56 KB
sha256:9f46ad705326fdd4b02b245ecd4bbcc47eb511412799b1e7f2dda14fc0e93d5d
blob-report-2
88.7 KB
sha256:c540760f4feba50422a07d5ccd305f8dabccbf04932bf856b4cea301e42ab7ed
blob-report-3
45.1 KB
sha256:8e261abaa83c6fc670c331c9726be1a6456a8aa3bf80fcdfa79d6cb9e415e51c