test: preserve static params during Cache Components migration - #98209
Merged
Conversation
Contributor
Tests PassedCommit: a83ffe6 |
aurorascharff
marked this pull request as ready for review
September 3, 2026 08:39
icyJoseph
approved these changes
Sep 3, 2026
icyJoseph
pushed a commit
that referenced
this pull request
Sep 7, 2026
eps1lon
pushed a commit
that referenced
this pull request
Sep 7, 2026
- docs: explain origin matching for allowedOrigins and allowedDevOrigins (#97805) - docs: improve discovery summaries (#97982) - docs(skills): preserve prefetched UI during Partial Prefetching adoption (#97712) - docs: add layout stability guidance for videos and iframes (#98070) - docs: document preloading with Cache Components (#97864) - docs: note that experimental.taint taints process.env (#98145) - docs: add API reference pages for skipProxyUrlNormalize and skipTrailingSlashRedirect (#97967) - docs: keep generateStaticParams during Cache Components migration (docs part of #98209) - docs: Remove version label from Turbopack in Pages Router (#98316) --------- Co-authored-by: Rich Haines <hello@richardhaines.dev> Co-authored-by: Aurora Scharff <66901228+aurorascharff@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an agent eval covering migration of the legacy on-demand ISR pattern:
force-static,revalidate, and an emptygenerateStaticParamsresult.The assertions require the agent to enable Cache Components, preserve the
generateStaticParamsexport, and replace its empty result with at least one parameter instead of deleting the function. The fixture also runs the Cache Components adoption skill with the established 30-minute timeout.Updates the Cache Components migration guide to link each legacy route segment config to its migration instructions. The
generateStaticParamssection now explains that removing the export opts a dynamic route out of ISR and links to the ISR with Cache Components guide.Eval results
Before the guide change
generateStaticParamsand returned a real seed.generateStaticParams, incorrectly treating omission as equivalent to returning an empty array.generateStaticParamsand returned a real seed.The failed treatment was classified as a model failure. It read the bundled migration guide but concluded that deleting
generateStaticParamspreserved the defer-all-paths-to-runtime behavior. The eval catches that loss of on-demand ISR semantics.The full run used the identical fixture immediately before its numeric identifier was changed from
agent-044to the finalagent-054name. The fixture and assertions were unchanged.After the guide change
generateStaticParams, returnedFEATURED_EVENT_SLUG, and compared the migrated route with the original behavior.generateStaticParams, and returnedFEATURED_EVENT_SLUG.generateStaticParams, returnedFEATURED_EVENT_SLUG, and verified the build and representative routes in development.In the first controlled pair, the bundled-docs treatment changed from failing to passing. Its final migration kept the route eligible for ISR, preserved the 60-second revalidation behavior with
use cacheandcacheLife, and produced a passing build.Additional variance check
The bundled-docs treatment was run once more against each guide version:
The second pre-change sample shows that the previous wording could still lead the agent to the correct migration. The revised wording passed both observed samples, suggesting that the explicit ISR consequence improves reliability. Two samples per version are not enough to claim a stable pass rate.
Verification
pnpm --filter=next buildpnpm eval agent-054-cache-components-empty-static-params --drypnpm eval agent-054-cache-components-empty-static-params