Skip to content

docs: correct the fast-deploy contract - #552

Merged
JonasJesus42 merged 1 commit into
mainfrom
docs/fast-deploy-contract
Sep 29, 2026
Merged

JonasJesus42 merged 1 commit into
mainfrom
docs/fast-deploy-contract

Conversation

@JonasJesus42

@JonasJesus42 JonasJesus42 commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Quatro coisas em circulação estavam erradas ou desatualizadas.

1. As chaves de KV. CLAUDE.md dizia decofile:current + index:revision. Nenhuma das duas existe. As chaves são por deployment id: decofile:<id>, index:revision:<id>, index:live, index:deployments (packages/blocks/src/cms/blockSource.ts:113-145). E isso não é cosmético — um ponteiro único mutável entregaria conteúdo novo para código velho ainda no ar durante um rolling deploy.

2. wrangler.toml. O docs/fast-deploy.md documentava a config em toml. O tooling lê e escreve wrangler.jsonc; nada emite toml (o parser toml existe só para repos legados).

3. "O snapshot bundlado é o fallback de KV". No modo bundle-stub não é — ensureBlocksHydrated falha alto em vez de servir um site vazio que o edge cacharia. Esse modo, os números de memória por trás dele (três cópias do decofile por isolate, ~27 MB para um decofile de 9.2 MB contra teto de 128 MB sem botão de GC) e o porquê de ser gated na pipeline declarar que semeia agora têm seção própria.

4. loadRedirects module-level. Listado como limitação não-fast-deployável; o workerEntry.ts:2082-2097 já rechaveia o mapa de redirects por revisão. Só vale para código de site que iça o próprio loadRedirects(loadBlocks()).

De quebra: os pré-requisitos de site agora apontam para a automação que passou a cobri-los (SITE_CREATE + o scaffold de migração, D7), e o requisito de chamar setupTanstackFastDeploy() — que não estava documentado em lugar nenhum e é a diferença entre um publish funcionar e escrever nada em silêncio.

Fecha a pilha: #548 → #549 (+ infra#333) → #550 → #551 → este.

🤖 Generated with Claude Code


Summary by cubic

Corrects the fast-deploy docs in CLAUDE.md and docs/fast-deploy.md to match the actual tooling contract.

  • KV keys are per deployment id (decofile:<id>, index:revision:<id>, index:live, index:deployments), never a single mutable pointer that would feed new content to old code mid-rollout.
  • The config is wrangler.jsonc; nothing emits toml, though it is still parsed for legacy repos.
  • Bundle-stub mode removes the bundled snapshot fallback — ensureBlocksHydrated fails loudly rather than serving an empty site, and the mode is gated on the pipeline declaring it seeds the KV key before activation.
  • The module-level loadRedirects limitation no longer applies to the framework's own redirects; it only affects site code that hoists its own loadRedirects(loadBlocks()).
  • Site prerequisites now point at the automation that provisions them, and the previously undocumented setupTanstackFastDeploy() call is recorded as required.

Merge after #550 and #551 — the prerequisites section references D7, SITE_CREATE, and the scaffolded setupTanstackFastDeploy() call, which only exist once those land.

Written for commit 586fbf0. Summary will update on new commits.

Review in cubic


Merge after #550 and #551 — the prerequisites section references D7, SITE_CREATE and the scaffolded setupTanstackFastDeploy() call, which only exist once those land.

@JonasJesus42
JonasJesus42 requested a review from a team September 14, 2026 18:28
@JonasJesus42
JonasJesus42 force-pushed the docs/fast-deploy-contract branch from 6443e69 to 7bfb8b1 Compare September 29, 2026 17:45
Four things in circulation were wrong or stale:

- CLAUDE.md said the keys were `decofile:current` + `index:revision`.
  Neither exists. Keys are per deployment id — `decofile:<id>`,
  `index:revision:<id>`, `index:live`, `index:deployments` — and that is
  not cosmetic: a single mutable pointer would feed new content to
  still-live old code during a rolling deploy.
- docs/fast-deploy.md documented the config as `wrangler.toml`. The
  tooling reads and writes `wrangler.jsonc`; nothing emits toml.
- Both claimed the bundled snapshot is always the KV fallback. In
  bundle-stub mode it is not — `ensureBlocksHydrated` fails loudly instead
  of serving an empty site the edge would cache. That mode, why it is
  gated on the pipeline declaring it seeds, and the memory numbers behind
  it now have a section.
- The "module-level loadRedirects won't see KV updates" limitation no
  longer applies to the framework's own redirects; workerEntry rebuilds
  the map on a revision change. It still applies to site code that hoists
  its own.

Also points the site-prerequisites list at the automation that now covers
it (SITE_CREATE + the migration scaffold, D7) and records the
`setupTanstackFastDeploy()` requirement, which was undocumented and is the
difference between a publish working and silently writing nothing.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@JonasJesus42
JonasJesus42 force-pushed the docs/fast-deploy-contract branch from 7bfb8b1 to 586fbf0 Compare September 29, 2026 19:05
@JonasJesus42
JonasJesus42 merged commit f45ec1c into main Sep 29, 2026
1 check passed
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