The Quality Gate
The deterministic checks that must pass before a theme goes live.
Every publish runs through the Quality Gate — the same rules in three places
so they can never drift: the CLI’s theme validate, the test suite, and the
server’s publish endpoint. If the gate fails, the publish is rejected with an
itemized error and the live store keeps serving the last good version.
Tier 1 — deterministic (blocks publish)
| Check | What it enforces |
|---|---|
| Theme contract | Banned patterns are absent (see below) and layout.liquid outputs the three required tags. |
| SDK version | theme.json declares a known "sdk" contract version. |
| Section catalog | Every section your theme.json declares ships its partial at views/sections/<path>.liquid — a declared-but-missing section would 500 the page when placed. |
| Release pinning | Release snapshots are well-formed and correctly versioned (see Versioning). |
| i18n completeness | Every locale has the same key set — no half-translated strings. |
| Bundle budget | Storefront JS stays under the per-page byte budget. |
Banned patterns
The contract rejects markup/JS that reintroduces platform behavior a theme may not own:
fetch(/salla.— callcartisto.*, never the API directly.- Hardcoded platform
<script src>— the platform injects those. - Pre-namespace element names — use
<cartisto-add-to-cart>/<cartisto-wishlist>/<cartisto-auth-modal>. - The old listing engine,
addToWishlist,changeMainImage,"cartUpdated", barewindow.productData/window.storeTheme— all replaced by platform seams.
Required layout tags
layout.liquid must output {{ platform_head }}, {{ content }}, and
{{ platform_body }}. Miss one and the storefront loses SEO, the SDK, or the
page body — so the gate refuses to save it.
Tier 2 — quality signals (live-store checks)
Run against a live store (the platform runs these; you can too):
- Accessibility — axe audits of home, listing, PDP, and the cart drawer; fails on serious/critical.
- RTL — no horizontal overflow under
dir=rtlat mobile/tablet/desktop. - Performance — LCP / CLS / TBT budgets under mobile-lab throttling.
Running it yourself
cartisto theme validate # Tier 1, offline, over your local files
The publish path uses the same module
There is no “publish anyway.” The server validates the post-publish file set
with the identical contract before promoting the draft. Passing validate
locally is how you guarantee the publish succeeds.