cloudflare/vinext

RSC segment cache prefetch protocol not implemented

Open

#1,335 建立於 2026年5月20日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)TypeScript (329 fork)github user discovery
adapter-api-e2ehelp wanted

倉庫指標

Star
 (8,120 star)
PR 合併指標
 (平均合併 1天 1小時) (30 天內合併 462 個 PR)

描述

This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.2.6, 2026-05-20).

Problem

vinext does not implement the Next.js 15+ RSC segment cache prefetch protocol. This is a new system where the client-side router prefetches individual route segments as RSC payloads, enabling more granular caching and faster navigations.

Tests wait for segment-level prefetch requests (intercepted via Playwright network monitoring) and expect to receive RSC segment payloads. These requests never fire because vinext has no segment prefetch endpoint.

Timed out waiting for a request to be initiated.

Expected: > 0
Received:   0
  expect(bodies.length).toBeGreaterThan(0)

Estimated Impact

~66 test failures across the deploy suite.

Affected Test Suites

  • test/e2e/app-dir/segment-cache/vary-params/vary-params.test.ts (15 failures)
  • test/e2e/app-dir/segment-cache/vary-params-base-dynamic/vary-params-base-dynamic.test.ts (15 failures)
  • test/e2e/app-dir/segment-cache/basic/segment-cache-basic.test.ts (9 failures)
  • test/e2e/app-dir/segment-cache/cached-navigations/cached-navigations.test.ts (8 failures)
  • test/e2e/app-dir/segment-cache/prefetch-inlining/prefetch-inlining.test.ts (7 failures)
  • test/e2e/app-dir/app-client-cache/client-cache.original.test.ts (9 failures)
  • test/e2e/app-dir/app-client-cache/client-cache.experimental.test.ts (7 failures)
  • test/e2e/app-dir/app-prefetch/prefetching.test.ts (9 failures)
  • test/e2e/app-dir/app-prefetch-false/*.test.ts
  • test/e2e/app-dir/app-prefetch-static/*.test.ts

Recommendation

  1. Reproduce first in vinext's own test suite. Add a test that navigates between App Router pages and verifies prefetch requests are made. Confirm it fails.

  2. Study the Next.js segment cache implementation. This is a large subsystem. Search .nextjs-ref/packages/next/src/ for segment cache, prefetch, and RSC flight payload serving. Understand the endpoint format, request/response protocol, and how segments are keyed.

  3. This is a significant new feature. Consider scoping an initial implementation that handles the basic prefetch protocol (serving RSC payloads for individual segments on prefetch requests) before tackling advanced features like segment-level caching, vary-by-params, and memory pressure eviction.

  4. Note: This may be intentionally deferred given its complexity. Consider whether these tests should be skipped in the interim.

貢獻者指南