Skip to content

perf: enable Turbopack filesystem cache for agents-docs builds#2048

Merged
nick-inkeep merged 2 commits intomainfrom
feat/turbopack-cache-agents-docs
Feb 17, 2026
Merged

perf: enable Turbopack filesystem cache for agents-docs builds#2048
nick-inkeep merged 2 commits intomainfrom
feat/turbopack-cache-agents-docs

Conversation

@nick-inkeep
Copy link
Collaborator

Summary

  • Enable turbopackFileSystemCacheForBuild: true in agents-docs/next.config.ts
  • Add dedicated GHA actions/cache step in CI workflow to persist agents-docs/.next/cache
  • Uses separate cache key (nextjs-docs-build) from agents-manage-ui to avoid interference

Motivation

agents-docs cold build is the single largest CI bottleneck: 3.7-6.3 minutes, consuming 40-56% of total CI time. This applies the same Turbopack incremental caching approach shipped for agents-manage-ui in #2045.

Cache key design

key: {os}-nextjs-docs-build-{lockfile-hash}-{source-hash}
restore-keys:
  {os}-nextjs-docs-build-{lockfile-hash}-
  {os}-nextjs-docs-build-
  • lockfile-hash: Invalidates when Next.js version changes
  • source-hash: Covers agents-docs/content/** and agents-docs/src/**
  • Restore-key fallback: Any previous build's cache works as warm start for incremental builds

Expected impact

Based on agents-manage-ui results (~45% speedup with warm cache), expecting agents-docs build to drop from ~6min cold to ~3min warm on subsequent runs.

Test plan

  • CI workflow passes (first run is cold — verifies no build regression from the flag)
  • GHA cache save succeeds for agents-docs/.next/cache
  • Subsequent CI run restores cache and shows faster build time

🤖 Generated with Claude Code

Enable turbopackFileSystemCacheForBuild in agents-docs and persist
.next/cache in CI via a dedicated GHA cache step. This targets the
largest CI bottleneck (agents-docs cold build: 3.7-6.3min, 40-56% of
CI time) with the same incremental caching approach used for
agents-manage-ui in #2045.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2026

⚠️ No Changeset found

Latest commit: 02ee05c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agents-api Ready Ready Preview, Comment Feb 17, 2026 0:27am
agents-docs Ready Ready Preview, Comment Feb 17, 2026 0:27am
agents-manage-ui Ready Ready Preview, Comment Feb 17, 2026 0:27am

Request Review

Copy link
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Summary

(0) Total Issues | Risk: Low

💭 Consider (1) 💭

Inline Comments:

  • 💭 Consider: .github/workflows/ci.yml:72 Cache key differs from agents-manage-ui pattern (omits packages/agents-core/src/**)

✅ APPROVE

Summary: Clean, low-risk infrastructure optimization that follows the established pattern from PR #2045. The Turbopack cache flag and GHA cache step are correctly implemented. The only observation is a minor inconsistency in cache key composition vs. the agents-manage-ui pattern — but this doesn't affect correctness, just cache invalidation behavior. Ship it! 🚀

Discarded (3)
Location Issue Reason Discarded
.github/workflows/ci.yml:69 Action pinned to mutable tag v4 instead of SHA Pre-existing pattern across all actions in this workflow; not introduced by this PR
agents-docs/next.config.ts Experimental flag correctly mirrors pattern Informational note confirming correctness; no issue identified
Cypress workflow Does not include agents-docs cache Acceptable — Cypress only tests agents-manage-ui, so no agents-docs cache is needed
Reviewers (1)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-devops 4 0 0 0 1 0 3
Total 4 0 0 0 1 0 3

@github-actions github-actions bot deleted a comment from claude bot Feb 17, 2026
@nick-inkeep
Copy link
Collaborator Author

Re: cache key consistency — accepted. Added packages/agents-core/src/** to the agents-docs cache key hash to match the agents-manage-ui pattern, since agents-docs imports from agents-core.

Add packages/agents-core/src/** to agents-docs cache key source hash
for consistency with agents-manage-ui pattern, since agents-docs
imports from agents-core.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot deleted a comment from claude bot Feb 17, 2026
@nick-inkeep nick-inkeep merged commit 9644f5d into main Feb 17, 2026
9 checks passed
@nick-inkeep nick-inkeep deleted the feat/turbopack-cache-agents-docs branch February 17, 2026 00:34
@github-actions
Copy link
Contributor

🔎💬 Inkeep AI search and chat service is syncing content for source 'Inkeep Agent Framework Docs'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant