cloudflare / cloudflare/vinext

RSC segment cache prefetch protocol not implemented

Open
#1,335 3 comments 0 reactions 0 assignees View on GitHub
adapter-api-e2e
Dominant language
TypeScript
Stars
8.8k
Forks
406
Avg merge
2d 6h
Merged PRs (30d)
120

Description

> *This issue was created by an agent analysing CI failures from the [Next.js Deploy Suite](https://github.com/cloudflare/vinext/actions/runs/26163751905) (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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.