Skip to content

v8 N-19: port v7-line fixes from main - #669

Closed
tlgimenes wants to merge 9 commits into
v8-18-check-colorsfrom
v8-19-port-main-fixes
Closed

tlgimenes wants to merge 9 commits into
v8-18-check-colorsfrom
v8-19-port-main-fixes

Conversation

@tlgimenes

@tlgimenes tlgimenes commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #668 (v8-18-check-colors). This brings over the fixes that landed on main (the 7.x line) after the v8 stack branched off, so the squash merge into main doesn't regress them. Each port is its own commit and links to the original commit. Where the original had tests, they're ported too, and each one fails without its fix.

What this PR ports

main What it fixes Here Verdict
#581 (054c0355, 7.77.4) orderForm calls sent without ?sc=, so VTEX priced the cart on the account's default sales channel apps-vtex vtexClient.ts Ported (adapted). v8 was worse than v7: checkout.orderForm, addItems, updateItems, addCoupon and attachment sent no sc at all. Each now takes VtexCheckoutOptions.salesChannel and falls back to the client's salesChannel. With neither set, there's no sc (never an empty ?sc=). The request init goes through pick(), so salesChannel never reaches fetch. The v7 test is now a vtexClient.test.ts case.
25c2e134 (#637, 7.77.2) _-prefixed props (__title, _id, hidden __type literals) were missing from the form; const had no default v8/cli/schema/typeToSchema.ts Ported. The code was copied from the v7 generator and is the same. Only __resolveType is skipped now, and a string literal is written { const, default }. One adaptation in the test: v8 deliberately drops a loader-backed @options, so the _id case checks only the field and its format.
6cb3bfa2 (7.77.2) a hidden prop with a default was dropped from required same Ported.
25a7ffb9 (7.77.2) a recursive type (submenu?: Link[]) collapsed to {type:"object"}; @tag: text became a description starting with ": " same, plus tsProgram.ts Ported (adapted). When the cycle guard fires, it looks through the [] / | null wrapper and returns the existing ctx.namedDefinition $ref. Anonymous and generic cycles keep the old fallback, and there's a new test for that case. Tags written with a colon are ignored. The tsProgram facade now exposes a tag's text for this.
#647 (44952cbe, 7.77.12), self-redirect half a redirect whose to is the path it matches loops forever v8/matchRoute.ts Ported (adapted). Rules like /a→/a, /a/→/a, /x→/x?utm=1 and /p/:id→/p/:id are now dropped when the trie is built, in both the flat and the legacy nested shape. Matching is still case-sensitive (/Calca/p → /calca/p is kept), and an off-site to never counts. matchRoute stays at 150 code lines (RI-06).
#647 (44952cbe), query-scoped half a redirect source with a query (/calcados?map=c,ft) never matched v8/matchRoute.ts, new v8/routeTrie.ts Ported (PO-approved, 5c1f8ced). Same semantics as v7's matchExactRedirect (pathname + search before pathname, as Fresh's router): the request's query string must equal the source's byte for byte (same order, no extra parameter, not decoded), and a scoped source wins over a path-only one whatever the array order. Any other query falls through to the path-only source. The path part matches like any v8 source (templates, splats, trailing slash), which v7's exact-only map had no equivalent for. One redirect trie per scoped query plus the path-only one. The self-redirect guard also drops a scoped source whose to would match it again (/x?a=1 → /x with the query carried over); deco check only reports two sources scoped to the same query as a conflict. The generic trie moved to routeTrie.ts: matchRoute.ts is now 102 code lines and routeTrie.ts 77, and RI-06 checks both. Docs: deco-sites/docs-tanstack#9 (13cd034, router-internals, routing, built-in blocks).

Not applicable to the v8 packages

v8 removed the code these fixes touch (1e679e0c, 20083472, 5574a6ce). They stay on 7.x:

Sites that vendored pre-fix v7 code may still want these: VTEX PDP absolute canonical (7.77.10), Image CDN sizes (7.77.1), Set-Cookie dedupe (7.77.6), keeping empty search values (7.77.8), blog JSON-LD dates (7.77.3), and VTEX ?page= below 1 (7.77.14, opt-in). That's for each store's cutover checklist, not this package.

Skills (main's #621, 08b47d81; bbb4e36e)

  • Infra ported: scripts/skills-check.ts, scripts/skills-readme.ts, .github/workflows/skills-check.yml, .agents/skill-template, the generated .agents/skills/README.md (intro adapted to v8), and the skills:check / skills:readme / skills:readme:check scripts. .claude/skills is a symlink to .agents/skills again.
  • v7-only skills removed (each says "v7 only (7.x branch)" and targets packages v8 doesn't ship; they stay on 7.x and in decocms/migrations): deco-to-tanstack-migration, decocms-v6-to-v7-upgrade, deco-next-package-migration, deco-reconcile-snapshot, vtex-cart-v2, deco-migrate-script, run-migration. .cursor/skills goes too, as chore(skills): one skills folder, one skill per package, tuned so the model loads them #621 did on main (they moved to decocms/skills); otherwise the squash would bring them back to main.
  • deco-v7-to-v8-migration within budget, nothing dropped: SKILL.md 14.1 KB → 9.9 KB, now an index with a "When to load what" table. The script steps, manual steps and verification moved to reference/ word for word, and gotchas.md (25.7 KB) split into ten subject files (rendering, framework code, server functions, caching and privacy, Next.js, hosted releases, content, telemetry, running the script, sibling ports). A line-by-line check shows every old line is still there; only the headings and cross-references changed. The description is quoted and starts with the package. No private site is named (the three sites it names are public), and the "one QueryClient per router" line stays because it's generic advice.
  • CLAUDE.md and README.md describe the v8 skills setup.
  • bun run skills:check: skills ok — 1 skill(s), 19 markdown file(s), all within budget. bun run skills:readme:check: README ok — index matches 1 skill(s) on disk.

Verification

  • Typecheck passes for every package, the migration skill's scripts and tests/. biome is clean and knip is clean.
  • vitest, run one package at a time: all of apps-* (90 tests), tests (205, 56 skipped) and the migration skill (40) pass.
  • blocks: 1,774 pass, including 7 new query-scoped redirect cases and a conflict case. The one failure, schema.test.ts › is deterministic, is a 5 s timeout when the whole suite runs. It also fails on the base (c319a88f, along with a timing-flaky HRI-3), and it passes in about 0.85 s run alone, both before and after this PR.
  • Schema golden on a v7 storefront (storefront-tanstack at blocks-cli 7.77.1), comparing v8 output before and after this PR:
    • 59 leaf paths change, all from these ports: recursive ImageObject/VideoObject/nav children now use a $ref, and preloadStrategy literals gained a default.
    • Compared with the same site's meta.gen.json regenerated by main's fixed generator, the ProductDetails mismatch is gone.
    • The other golden mismatches already existed and are unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig


Summary by cubic

Ports v7-line fixes that landed on main after the v8 stack branched, so the squash merge into main doesn't regress them. It also carries over the release config and changelog updates main made after the branch point.

Bug Fixes

  • VTEX checkout calls now send a sales channel (?sc=) via VtexCheckoutOptions.salesChannel, falling back to the client's salesChannel, so carts aren't silently priced on the account default channel.
  • The schema generator keeps _-prefixed props (__title, _id), only dropping the framework-owned __resolveType.
  • String literals pair const with an equal default, and hidden props with a default stay in required.
  • Recursive types use $ref to their shared definition instead of collapsing to { type: "object" }, and JSDoc tags written with a colon are ignored.
  • Redirects whose to matches their own from path are dropped when the trie is built, so they can't loop.

Release and docs

Not ported: query-scoped redirect sources (/x?map=ft), which would change v8's documented matching algorithm and need a product decision. Several other 7.x fixes (async rendering, resolver injection, Shopify sync, apps-nuvemshop) target code v8 removed, so they stay on 7.x.

Written for commit 03efde7. Summary will update on new commits.

View guided diff Turn on auto-fix

tlgimenes and others added 7 commits October 12, 2026 14:02
v8's vtexClient sent the sales channel only on simulation and regions.
checkout.orderForm, addItems, updateItems, addCoupon and attachment went
out with no sc at all, so VTEX priced the cart against the account default
channel, silently, with a 200 and a well-formed orderForm.

Each orderForm call now takes VtexCheckoutOptions.salesChannel and falls
back to the client's salesChannel; with neither, the URL has no sc (never
an empty ?sc=). Request init is narrowed through pick(), so salesChannel
never leaks into the fetch init.

Ported from main 054c035 (#581, blocks-v7.77.4); the v7 test
checkout-sales-channel.test.ts becomes a vtexClient.test.ts case (fails
without the fix).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…ult (port of 25c2e13)

deco schema skipped every property whose name starts with `_`, a rule
copied from the v7 generator. Those are site data in deco-cx/deco sites,
and the editor edits them:

- `__title` labels a list entry (`@title {{__title}}`);
- `_id` keys a dynamic-options picker;
- hidden literal discriminators (`/** @hide true */ __type: "image"`).

Skip only `__resolveType`, the block-reference discriminator the
framework owns. Also emit `default` next to the `const` of a string
literal, as deco-cx/deco does, so the editor writes the discriminator
into a new entry.

Ported from main 25c2e13 (#637, blocks-v7.77.2) into
src/v8/cli/schema/typeToSchema.ts; its tests become schema.test.ts
cases (both fail without the fix). Adapted: v8 drops a loader-backed
`@options` by design, so the `_id` case asserts the field and its
format only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…cb3bfa)

Hidden props were always dropped from `required` so the form could not
deadlock on a field the user cannot see. A hidden literal now carries
its value as `default` (the editor fills it in), so there is no deadlock
to avoid, and deco-cx/deco lists it as required. Hidden props without a
default stay optional.

Ported from main 6cb3bfa (blocks-v7.77.2) with its tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…rt of 25a7ffb)

A recursive prop type (`interface NavigationPillLink { submenu?:
NavigationPillLink[] }`) hit the generator's cycle guard and came out as
`{ type: "object" }`, so the editor edited the submenu as an object
instead of a list of links. deco-cx/deco emits such a type once as a
definition and `$ref`s it from inside the cycle.

When the cycle guard fires, look through the array / `| null` wrapper it
fired on and return the type's shared definition (ctx.namedDefinition,
which v8 already has for the inline branch and shareNamed). Anonymous and
generic types keep the `{ type: "object" }` fallback.

Also ignore a JSDoc tag written with a colon (`@description: text`).
deco-cx/deco reads tags with /@(\w+)\s+/, so such a tag never reached
the editor; the TS parser turned it into a description starting with
": ". The tsProgram facade exposes the tag's text for that.

Ported from main 25a7ffb (blocks-v7.77.2) with its tests, plus a
generic-cycle fallback case.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…lf-redirect half)

matchRoute served a redirect whose `to` names the path its `from`
matches, so the browser followed it back into the same rule forever:
`/a` → `/a`, `/a/` → `/a` (a trailing slash is dropped before matching),
`/x` → `/x?utm=1` (the query isn't part of the match), `/p/:id` →
`/p/:id`. Such a rule can never be served; it is now dropped when the
redirect trie is built, for both the flat and the legacy nested shape, as
Fresh's redirect loader skipped `from === to` and main's redirects.ts
does since #647. Matching stays case-sensitive, so `/Calca/p` →
`/calca/p` is kept, and an off-site `to` never counts.

Ported from main 44952cb (#647, blocks-v7.77.12). Not ported: the
query-scoped source (`/x?map=ft`), which changes v8's documented match
algorithm (the query is dropped before matching); left for a PO call.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
The 7.x release branch had no channel, so semantic-release used the
branch name. npm refuses any dist-tag that parses as a semver range
(7.x, v7 and v7.x all do), so the first 7.x publish would have failed.
latest-7 follows npm's own convention (npm has latest-6, latest-7).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
The v8 line never edited CHANGELOG.md, so the squash onto main would
have dropped the two entries main added after the branch point.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
@tlgimenes

Copy link
Copy Markdown
Contributor Author

Two more commits for the release (pushed as a fast-forward):

This branch's top 03efde72 is now the tree of the squash PR #671.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

tlgimenes and others added 2 commits October 12, 2026 15:09
A redirect `from` can carry a query (`/calcados?map=c,ft`). As on main
(`matchExactRedirect`: `pathname + search` before `pathname`, Fresh's
`hrefRoutes[pathname + search] ?? hrefRoutes[pathname]`), it matches only
when the request's query string is exactly that one: byte for byte, same
order, no extra parameter, not decoded. It wins over a path-only source,
whatever the array order; any other query falls through to the path-only
source. The path part matches like any source (templates, splats, trailing
slash), which v7's exact-only map had no equivalent for.

matchRoute keeps one redirect trie per scoped query plus the path-only one.
The self-redirect guard now also drops a scoped source whose `to` would
match it again (`/x?a=1` -> `/x` with the query carried over). deco check
only reports two sources as a conflict when they're scoped to the same
query. The generic segment trie moves to routeTrie.ts (matchRoute.ts is
102 code lines, routeTrie.ts 77; RI-06 now checks both files).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
…ain's #621)

Ports main's skills infrastructure (08b47d8) to v8:

- scripts/skills-check.ts and scripts/skills-readme.ts, the skills-check
  workflow, .agents/skill-template, the generated .agents/skills/README.md
  (intro adapted to v8's packages) and the skills:check, skills:readme and
  skills:readme:check scripts;
- .claude/skills is a symlink to .agents/skills again.

Removes the v7-only skills, which stay on 7.x and in decocms/migrations:
deco-to-tanstack-migration, decocms-v6-to-v7-upgrade,
deco-next-package-migration, deco-reconcile-snapshot, vtex-cart-v2,
deco-migrate-script and run-migration (each one says "v7 only (7.x
branch)" and targets v7 packages v8 doesn't ship). Removes .cursor/skills,
as #621 did on main: they moved to decocms/skills, and the squash would
otherwise bring them back to main.

deco-v7-to-v8-migration fits the budgets without losing content:
SKILL.md (14.1 KB -> 9.9 KB) is an index with a "When to load what"
table; the script steps, manual steps and verification move to
reference/ verbatim, and gotchas.md (25.7 KB) splits into ten subject
files. The description is quoted and trigger-first. CLAUDE.md and the
README describe the v8 skills setup.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
tlgimenes added a commit that referenced this pull request Oct 12, 2026
Same tree as v8-19-port-main-fixes at bbb4e36, which adds two ports
from main on top of 03efde7: query-scoped redirect sources in
matchRoute (#647's second half, 5c1f8ce) and the skills-check gate
with the v7-only skills removed (#621, bbb4e36).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig
tlgimenes added a commit that referenced this pull request Oct 12, 2026
The whole v8 stack as **one squash commit** onto main. Merging it
publishes **8.1.0 on npm `latest`** for the 8 v8 packages, so `npm
install @decocms/blocks` gives v8. v7 keeps releasing from the `7.x`
branch.

**Draft until release day.** Don't mark it ready or merge it outside the
runbook below; the product owner names this PR when approving the merge.
Nothing has been merged, tagged or published yet.

## What's in it

The tree of this branch is exactly the top of the v8 stack, #669
(`v8-19-port-main-fixes` at `bbb4e36e`): `git diff bbb4e36
v8-release-squash` is empty. The branch is two commits on main's head
`0d125f10` (`blocks-v7.78.0`): the squash of the stack (`e151895d`), and
`ab3d3864`, which brings its tree up to #669's latest head without
rewriting history. Squash and merge folds both into one commit.

- **@decocms/blocks is one package:** the content protocol, the core SDK
(`createCMS`, resolver, lazy, built-ins, `matchRoute`, drafts), the
`deco` CLI (schema, content, check, serve), OTLP telemetry, analytics,
instrumented fetch and hosted mode (CDN releases, CDN drafts, site token
telemetry). Published as per-file tsc output, with no bundler.
- **The commerce apps are thin clients:** apps-shopify, apps-vtex (with
retry and a circuit breaker), apps-wake, apps-magento, apps-algolia,
apps-resend and apps-sfmc-personalization.
- **What v7's framework packages did is now site code.** TanStack Start
and Next.js sites follow the guides, and the `deco-v7-to-v8-migration`
skill moves a v7 site over.
- **The v7-only packages leave main:** tanstack, nextjs, blocks-admin,
blocks-cli, eitri, apps-commerce, apps-blog, apps-website,
apps-salesforce and apps-nuvemshop. They keep releasing from `7.x` on
`latest`, since they have no 8.x.
- **Fixes main gained after the branch point are ported** (#669):
apps-vtex sends `sc` on every orderForm call; the schema keeps
`_`-prefixed props, gives a string `const` a `default`, keeps a hidden
prop with a default in `required`, and turns recursive types into
`$ref`s; `matchRoute` drops a redirect to the path it matches and
matches query-scoped redirect sources (`/calcados?map=c,ft`) as #647
does on v7: the request's query string must equal the source's exactly,
and a scoped source wins over a path-only one (docs:
deco-sites/docs-tanstack#9). apps-nuvemshop stays v7-only.
- **Release config:** the `7.x` entry in `.releaserc.json` now has
`"channel": "latest-7"`. Without it the channel defaults to the branch
name `7.x`, which npm refuses as a dist-tag. `release.yml` triggers on
main again (#670 pauses it for the cut).

- **Skills:** the skills check from #621 is ported (`skills:check`,
`skills:readme`, `skills-check.yml`, `.agents/skill-template`, the
`.claude/skills` symlink), and it passes: one skill,
`deco-v7-to-v8-migration`, now an index of 9.9 KB with its gotchas split
into subject files.

**Leaves main with it:** main's v7 skills (`apps-vtex`,
`apps-nuvemshop`, `deco-caching`, `deco-cms-route-config`,
`deco-server-functions-invoke`, `deco-storefront-egress-guardrails`,
`deco-migrate-script`, `run-migration`) and v7 docs. They describe
packages that leave main, so they stay on `7.x`.

### Folded PRs

Each one gets closed with a pointer here after the merge.

| PR | What |
|---|---|
| #602 | N-01: content protocol |
| #603 | N-02: core SDK (createCMS, resolver, lazy, built-ins,
matchRoute, drafts) |
| #605 | N-03: secret built-in and the legacy v7 alias bridge |
| #604 | N-04: the deco CLI (schema, content, check, serve) |
| #606 | N-05: telemetry (OTLP), analytics, instrumented fetch, hosted
and KV loaders |
| #607 | N-08: TanStack binding and the descriptor-guide example |
| #608 | N-09: Next.js example rebuilt from the guide |
| #609 | N-10a: Shopify thin client |
| #610 | N-10b: VTEX thin client with retry and circuit breaker |
| #611 | N-10c: apps-blog and apps-website are v7-only |
| #612 | N-10d: Wake and Magento thin clients |
| #613 | N-10e: Algolia, Resend and Marketing Cloud Personalization
clients |
| #614 | N-11: v7 to v8 migration tool |
| #615 | N-12: docs-conformance gate |
| #616 | N-13: v7 leaves the v8 line (one package, thin clients,
migration is a skill) |
| #617 | N-14: per-file tsc output (TypeScript 7, no bundler) |
| #618 | N-15: preview a forced variant through the draft pointer |
| #619 | N-16: drafts are the fast-preview pointer |
| #634 | N-17: hosted mode (CDN releases, CDN drafts, site token
telemetry) |
| #668 | colour `deco check` output |
| #669 | N-19: port the v7-line fixes from main (including #647's
query-scoped redirects), the skills check from #621, the `latest-7`
channel and main's CHANGELOG entries |

## Release mechanics

The version comes from semantic-release (`.releaserc.json`, angular
preset, one shared tag `blocks-v${version}` for every package). Three
facts decide it, and each was reproduced with semantic-release 25.0.5
dry runs in a local sandbox (no tokens, nothing pushed):

- **A seed tag is required.** Without one, this `feat:` squash computes
**7.79.0** on `latest`. A major marker would compute 8.0.0, which npm
refuses (E403) because a deprecated 8.0.0 already exists.
- **The seed goes on #670's merge commit**, not on today's head. With
the lightweight tag `blocks-v8.0.0` there, this squash computes
**8.1.0**, channel `latest`, and publishes `blocks apps-algolia
apps-magento apps-resend apps-sfmc-personalization apps-shopify
apps-vtex apps-wake` with `--tag latest`. On today's head the tag would
also sit in `7.x`'s history, and every 7.x release would fail with
`EINVALIDMAINTENANCEMERGE`.
- **#670 pauses main's release trigger** between the seed and this
merge. Otherwise any v7 `fix:` merged to main in that window would ship
as **8.0.1** on `latest`.

**v7 after the cut:** `7.x` is cut from today's main, plus four commits:
the release config; the migrator fix that keeps newly migrated sites on
7.x (it also refuses an 8.x answer from npm); and v7 install docs that
ask for `@decocms/blocks@latest-7`, since a plain `@decocms/blocks` next
to `@decocms/tanstack` would install two copies of it. @decocms/blocks
and the six apps that also ship in v8 publish on the dist-tag
**`latest-7`**. npm refuses `v7` and `7.x` as dist-tags, because they
read as version ranges. The ten v7-only packages keep `latest`. The
first 7.x release is **7.78.1**.

**The squash commit message is this PR's title and body** (repo setting:
PR title + PR body). This body therefore contains no major-version
marker and no CI-skip token; keep it that way when editing.

**Publishing** goes through npm Trusted Publishing (OIDC) from
`release.yml`, with no stored token. **apps-sfmc-personalization has
never been published by the workflow**, only by hand, so check its
trusted publisher on npmjs.com before merging. If that check is skipped
and its publish fails, the tag already exists and a re-run releases
nothing; see "If it goes wrong".

## Merge-day runbook

Run it in one sitting, with merges to main frozen. Each step has a
check; stop at the first one that fails.

| # | Step | Command | Check | Rollback |
|---|---|---|---|---|
| 0 | Before the day: trusted publishers for all 18 packages
(`decocms/blocks`, `release.yml`, no environment); the PO names #670 and
this PR | npmjs.com → package → Settings → Trusted publishing | every
package lists `release.yml` | — |
| 1 | Freeze merges to main | announce | `git describe --exact-match
--tags origin/main` prints the latest `blocks-v7.*` (today
`blocks-v7.78.0`) | unfreeze |
| 2 | Cut `7.x` at main's head (fast-forward from `762d99c7`) |
`M0=$(git rev-parse origin/main); git merge-base --is-ancestor
origin/7.x $M0 && git push origin $M0:refs/heads/7.x` | no Release run
starts (that commit's workflow triggers only on main) | nothing to undo
|
| 3 | Merge #670 (pause) as a squash, title unchanged | GitHub | no
Release run; `M1=$(git rev-parse origin/main)` | revert as `chore:`,
after step 5's rollback |
| 4 | M1 is main-only | `! git merge-base --is-ancestor $M1 origin/7.x`
| exits 0 | — |
| 5 | Push the seed | `git tag blocks-v8.0.0 $M1 && git push origin
refs/tags/blocks-v8.0.0` | `git ls-remote --tags origin blocks-v8.0.0`
shows `$M1`. Optional: Actions → Release → Run on main, dry run, logs
`Found git tag blocks-v8.0.0` | `git push origin
:refs/tags/blocks-v8.0.0` |
| 6 | Turn on 7.x: push the four prepared commits | `git push origin
<prepared 7.x head>:refs/heads/7.x` | Release run on 7.x publishes
**7.78.1**: `npm view @decocms/blocks dist-tags` shows `latest-7:
7.78.1`, `latest: 7.78.0`; `npm view @decocms/blocks-cli dist-tags`
shows `latest: 7.78.1`. Expected side effect: the run first adds 7.78.0
to the `latest-7` channel (a git note and a bot comment on #655),
publishing nothing | a failed run publishes nothing; fix on 7.x |
| 7 | Retarget the open v7 PRs to `7.x`; protect `7.x` like main (a
ruleset with the deletion, force-push and pull-request rules) | `gh pr
edit <n> --base 7.x` | none of them targets main | — |
| 8 | Bring this branch onto main without changing its tree | `git merge
-s ours --no-edit origin/main && git diff --quiet bbb4e36 HEAD && git
push` | the PR diff restores `release.yml`'s `main` trigger; without `-s
ours`, git silently keeps #670's pause | — |
| 9 | Final dry run on this exact tree | semantic-release `--dry-run` in
a local sandbox (a `file://` copy of the repo with #670's merge, the
seed and this tree squashed on top; no tokens) | `next=8.1.0
channel=null`, `--tag latest`, the 8 packages, and the real
`blocks-v8.0.0` on GitHub equals #670's merge commit (the sandbox adds
its own seed, so it checks the real one separately) | stop |
| 10 | Mark ready; an engineering-deco member who did not push step 8
approves (the ruleset dismisses earlier approvals on push and requires
approval of the last push); resolve every review thread; **Squash and
merge** (not merge or rebase) with the title `feat: Deco CMS v8 — one
squash of the v8 stack` | `gh pr ready <this PR>` | Release run: tag
`blocks-v8.1.0`, 8 × `npm publish --tag latest`, GitHub release Latest |
see below |
| 11 | Verify npm | `for p in blocks
apps-{algolia,magento,resend,sfmc-personalization,shopify,vtex,wake}; do
npm view @decocms/$p dist-tags; done` | `latest: 8.1.0` for all 8;
v7-only packages still have `latest: 7.78.1` | see below |
| 12 | Unfreeze; close the folded PRs | `gh pr close <n> --comment
"Folded into #<this PR>, released as 8.1.0"` | — | — |
| 13 | Bump Studio's pins to `8.1.0` exactly; docs and the serve command
go back to plain `@decocms/blocks`; move `next` to 8.1.0; reword 8.0.0's
deprecation | see the runbook | — | — |
| 14 | Communicate | — | — | — |

**If it goes wrong:**

- **Wrong version in step 9:** don't merge. Re-check the seed (`git
ls-remote --tags origin blocks-v8.0.0` must equal #670's merge commit)
and this body (no marker).
- **Wrong version published in step 10** (7.79.0, 8.0.1, 9.0.0…):
  1. Stop all merges.
2. Point `latest` back for each of the 8 packages: `npm dist-tag add
@decocms/<pkg>@7.78.1 latest`.
3. Deprecate the bad version: `npm deprecate @decocms/<pkg>@<bad>
"Published by mistake; use 7.78.1 or 8.1.0+"`.
4. Don't unpublish, and don't `git revert` on main: a revert is itself a
`revert:` commit and would release.
5. Pause main again (#670's change as a new `chore:` PR) before fixing
forward.
- **One package failed to publish** (for example
apps-sfmc-personalization without a trusted publisher): the tag exists,
so a re-run releases nothing. Fix the trust, then publish that one
package by hand from the tag: `git checkout blocks-v8.1.0 &&
VERSION=8.1.0 node scripts/sync-versions.mjs && bun install && bun run
build && cd packages/<pkg> && npm publish --access public --tag latest`.
That copy has no provenance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01WNwbSEePYNcY5YCgqZURig

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Ships Deco CMS v8 as one squash commit onto main. Merging publishes
8.1.0 on npm `latest` for the eight v8 packages, and v7 keeps releasing
from the `7.x` branch. The PR stays a draft until release day and merges
only through the runbook in the body.

**What changes**
- `@decocms/blocks` becomes one package: content protocol, core SDK
(`createCMS`, resolver, lazy, built-ins, `matchRoute`, drafts), `deco`
CLI, telemetry, analytics, instrumented fetch and hosted mode —
published as per-file tsc output with no bundler.
- The commerce apps become thin clients: apps-shopify, apps-vtex (retry,
circuit breaker), apps-wake, apps-magento, apps-algolia, apps-resend and
apps-sfmc-personalization.
- v7's framework packages become site code; sites follow the
TanStack/Next.js guides, and the `deco-v7-to-v8-migration` skill moves a
v7 site over.
- The v7-only packages (tanstack, nextjs, blocks-admin, blocks-cli,
eitri, apps-commerce, apps-blog, apps-website, apps-salesforce,
apps-nuvemshop) leave main and keep releasing from `7.x`; their agent
skills are dropped from the tree, and the skills-check gate stays on
main.
- Ports the v7-line fixes from main: apps-vtex sends `sc` on every
orderForm call, the schema keeps `_`-prefixed props and turns recursive
types into `$ref`s, and `matchRoute` drops a redirect to the path it
matches, including the query-scoped redirect sources.

**Migration and release**
- Releases 8.1.0 on `latest`: the `blocks-v8.0.0` seed tag sits on the
merge commit that pauses main's release trigger, and the squashed commit
message carries no version marker — anything else publishes a wrong
version.
- The `7.x` branch is cut from main with the config for the `latest-7`
dist-tag on `@decocms/blocks` and the six shared apps; the v7-only
packages keep `latest`.
- Sites move with `deco-v7-to-v8-migration`: a one-time script rewrites
content (block map with legacy aliases, vendored app loaders, secret
re-encryption, import report) and then lists the manual steps it can't
do.

<sup>Written for commit ab3d386.
Summary will update on new commits.</sup>

<a href="https://cubic.dev/pr/decocms/blocks/pull/671?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="View guided diff"
src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>
<a
href="https://www.cubic.dev/action/auto-fix/pr/decocms/blocks/671?returnTo=https%3A%2F%2Fgithub.com%2Fdecocms%2Fblocks%2Fpull%2F671&source=description"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"><img
alt="Turn on auto-fix"
src="https://www.cubic.dev/buttons/turn-on-auto-fix-light.svg"></picture></a>

<!-- End of auto-generated description by cubic. -->

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@tlgimenes

Copy link
Copy Markdown
Contributor Author

Released in 8.1.0 via #671 (one squash of the v8 stack).

@tlgimenes tlgimenes closed this Oct 12, 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