cloudflare/vinext

RSC segment cache prefetch protocol not implemented

Open

#1,335 opened on May 20, 2026

View on GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (329 forks)github user discovery
adapter-api-e2ehelp wanted

Repository metrics

Stars
 (8,120 stars)
PR merge metrics
 (Avg merge 1d 1h) (462 merged PRs in 30d)

Description

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.

Contributor guide