Skip to content

CM1: the storefront on Workers - #2

Merged
pullely merged 1 commit into
mainfrom
orun/CM-2-the-storefront-on-workers
Oct 14, 2026
Merged

pullely merged 1 commit into
mainfrom
orun/CM-2-the-storefront-on-workers

Conversation

@pullely

@pullely pullely commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

CM1 — the storefront on Workers. apps/web is Vercel's Next.js Commerce with the Workers build around it: next build (standalone output, traced from the monorepo root; experimental.useCache carries upstream's "use cache" / "use cache: private" / cacheTag / cacheLife / revalidateTag / updateTag surface) then opennextjs-cloudflare build, whose Worker exports the two cache Durable Objects. open-next.config.ts names the R2 incremental cache, the Durable Object queue and the sharded Durable Object tag cache (baseShardSize: 12); wrangler.template.jsonc carries the bucket binding as a wiring token, the two Durable Object bindings with their migration, the WORKER_SELF_REFERENCE service binding and the non-secret vars, and is rendered per environment to a git-ignored wrangler.jsonc (wiring.fixture.json feeds the verify lane and pnpm run wire:fixture). The three Shopify facts are Worker secrets (.dev.vars.example). tests/web exercises lib/utils, lib/type-guards, the Shopify client's request shape and reshaping with a mocked fetch, and the webhook's revalidate (22 tests).

Verified locally: wire, typecheck, lint, test and build green; wrangler dev over the built Worker with an empty local bucket and no store: / 200 ("Next.js Commerce", the un-configured storefront), /search 200, /product/x 404, /robots.txt 200, /opengraph-image 200 (a 1200×630 PNG), CSS and favicon 200, /sitemap.xml and /[page] 500 (upstream's unguarded store reads); POST /api/revalidate answers {"status":401} without the secret and, with dummy secrets in .dev.vars, {"status":200,"revalidated":true} for product and collection webhooks (tag cache Durable Object writes and R2 puts observed). Departures from upstream, recorded in IMPLEMENTATION-STATUS.md in the closing PR: experimental.useCache instead of experimental.ppr (Next 16 merges it into cacheComponents, which hangs on the adapter — opennextjs-cloudflare#1450), stable cacheLife/cacheTag imports, baseUrl honouring a SITE_URL var, the next/og font read through ASSETS from public/fonts, moduleResolution: bundler, React 19.2, an ESLint config (upstream has none; its prettier check fails on its own HEAD and is not wired into test).

🤖 Generated with Claude Code

apps/web is Vercel's Next.js Commerce with the Workers build around it:
next build (standalone, traced from the monorepo root; experimental.useCache
carries upstream's "use cache" directives), opennextjs-cloudflare build
(the Worker exports the DOQueueHandler and DOShardedTagCache classes).
open-next.config.ts names the R2 incremental cache, the Durable Object queue
and the sharded Durable Object tag cache; wrangler.jsonc is rendered per
environment from wrangler.template.jsonc — the bucket name from the
cloudflare-r2 root's wiring document, the two Durable Object bindings with
their migration, the Worker's self-reference, the non-secret vars — and is
git-ignored; wiring.fixture.json feeds the verify lane. The Shopify facts
are Worker secrets. tests/web exercises lib/utils, lib/type-guards, the
Shopify client with a mocked fetch and the revalidation webhook (22 tests).

Departures from upstream, recorded in the epic: experimental.useCache
instead of experimental.ppr (Next 16 merges it into cacheComponents, whose
staged render hangs on the adapter), stable cacheLife/cacheTag imports,
baseUrl honouring SITE_URL, the next/og font read through ASSETS from
public/fonts, moduleResolution bundler, React 19.2, an ESLint config.

Orun-Task: CM-2
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@pullely
pullely merged commit 2662955 into main Oct 14, 2026
3 checks passed
@pullely
pullely deleted the orun/CM-2-the-storefront-on-workers branch October 14, 2026 20:29
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.

2 participants