RSC segment cache prefetch protocol not implemented
#1.335 aberto em 20 de mai. de 2026
Métricas do repositório
- Stars
- (8.120 stars)
- Métricas de merge de PR
- (Mesclagem média 1d 1h) (462 fundiu PRs em 30d)
Description
This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext
mainvs Next.jsv16.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.tstest/e2e/app-dir/app-prefetch-static/*.test.ts
Recommendation
-
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.
-
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. -
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.
-
Note: This may be intentionally deferred given its complexity. Consider whether these tests should be skipped in the interim.