Skip to content

perf(cache): serve /cli and /developers from the edge cache - #502

Merged
harlan-zw merged 1 commit into
mainfrom
perf/edge-cache-cli
Oct 6, 2026
Merged

harlan-zw merged 1 commit into
mainfrom
perf/edge-cache-cli

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

/cli and /developers read no data and no session, yet every view rendered in the Worker and set the __nkpv version cookie. Both now carry an edgeCache rule like the other launch pages.

They change only on deploy, and a deploy starts a new cache key, so the rule keeps a copy fresh for an hour and stale for nine more. The 36000s total matches the window nuxt-skew-protection keeps old chunks for. The /cli rule matches only /cli, so /cli/authorize stays uncached.

pnpm production:edge-cache now proves /cli, /developers and /skills/demos after each deploy. /skills/demos already had a rule but no proof.

Time to first byte from Sydney on 2026-10-07, three requests each:

  • /cli: 126 to 252 ms, cf-cache-status: BYPASS, and a __nkpv cookie on each answer.
  • /developers: 112 to 225 ms, the same way.
  • Cached launch pages (/, /skills/demos, a Skill page): 65 to 77 ms on a HIT.

Workers Cache does not run under wrangler dev, so the cached timing for these two pages exists only after deploy.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

Both pages read no data and no session, yet every view rendered in the Worker and set a version cookie. The post-deploy proof now covers them and /skills/demos.
@harlan-zw harlan-zw added the harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. label Oct 6, 2026
@harlan-zw

Copy link
Copy Markdown
Collaborator Author

Agent check (Claude Code, Harlan Agent Kit), since CI cannot cover it:

  • checkEdgeCache against production for /skills/demos, /cli and /developers today: /skills/demos passes; /cli and /developers fail with sets-cookie (__nkpv), which this rule removes.
  • The branch build under wrangler dev answers /cli and /developers with cloudflare-cdn-cache-control: public, max-age=3600, stale-while-revalidate=32400 and no Set-Cookie. Before, each answer set __nkpv.
  • radix3 1.1.2 matches the /cli rule for /cli and /cli/ only, never /cli/authorize.

@harlan-github-agent harlan-github-agent Bot added harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-review Pull request triage requires an adversarial Review. Adding this label manually always forces one. labels Oct 6, 2026
@harlan-github-agent

harlan-github-agent Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-10-06 17:11 UTC.

GitHub merged this pull request.

No material findings were recorded.

9e03ad6a-03e7-4060-9fbc-21f8b2bbc29d

@harlan-github-agent harlan-github-agent Bot added harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Oct 6, 2026

@harlan-github-agent harlan-github-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Harlan Agent Kit posted this automated review. AI open source policy.

Automated Review: READY.

Read the Review results

@harlan-zw
harlan-zw merged commit ab0d784 into main Oct 6, 2026
7 checks passed
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Oct 6, 2026
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