Skip to content
decodecodeveloper docs
Storefront → Templates → Migration validation

parity run

Compare two URLs (prod × cand) and produce a parity report — with module selection for focused runs (SEO, visual, cache, vitals, DOM/CSS).

parity run is the flagship command: it drives two URLs — prod (the source of truth) and cand (the migrated site / PR preview) — through the same flows and checks, then reports what differs.

# Fast smoke (~30s, no LLM) — validate the URLs respond and render
parity run --prod https://old.com --cand https://new.dev --preset smoke --open
 
# Full audit with visual diff (needs an LLM key)
parity run --prod https://old.com --cand https://new.dev --preset full --open

Presets

PresetWhat it runs
smokeHomepage, mobile only, no LLM, no visual/vitals crawl. ~30s — cheap enough to ping after every deploy.
fullPurchase-journey + search + cart-interactions, both viewports, vitals-pages 10 / visual-pages 5. Deep audit.
ciPurchase-journey, mobile, vitals-pages 5 / visual-pages 3, --only e2e,html,console. Tuned for CI.

Your explicit flags always win over the preset.

Output

A run writes parity-output/runs/<runId>/report.json (the machine-readable source of truth) and report.html. Key report.json fields:

  • verdict — status (pass/warn/fail), score (0–100), severity counts, modulesRun. The score reflects only the modules that ran and rises as issues are fixed.
  • topIssues — LLM-ranked, de-duplicated (5–10 items); each has a severity, check, and suggestedFix.
  • moduleVerdicts[] — per-module score/status + pagesAnalyzed.
  • visualDiff — per-page prod/cand screenshots, a pixelmatch heatmap, sections missing in cand, and (with an LLM) semantic diffs. visualDiff.parityOk is the binary "is it rendering right?" signal.

Use --json runs.jsonl to stream one line per check as it completes, and parity report <runId> --section <name> --json to extract one tab as structured JSON — both are designed for agents driving parity in a loop.

Focused runs

Every check belongs to exactly one module. Select what runs with --only / --skip; the score reflects only what ran. --why prints the selection reasoning.

ModuleFocusExample
e2ePurchase journey, search, cart, login, PDP/PLP--only e2e
seoMeta tags, deep SEO audit, 404, pagination, HTTP status--only seo
visualPixel-perfect — visual regression + pixelmatch heatmap + LLM Vision diff--only visual
vitalsWeb Vitals (LCP/FCP/TTFB/INP/CLS)--only vitals
cacheCache coverage / MISS opportunities--only cache
consoleConsole errors + hydration warnings--only console
htmlComponent DOM/CSS — structural diff, lazy sections, image dims--only html
networkRequest-count / payload deltas--only network
# Only SEO
parity run --prod ... --cand ... --only seo
 
# Everything except visual (skip the LLM Vision cost)
parity run --prod ... --cand ... --skip visual
 
# One specific check, plus explain the selection
parity run --prod ... --cand ... --only check:meta-seo-parity --why

For the deepest pixel-perfect loop on a single section (screenshots + heatmap + computed styles + an LLM-ready prompt), use parity fix / parity section instead of a full run.

Picking pages

By default run samples a representative set from prod's sitemap. Force exact coverage with --pages "/,/account,/p/known" or --pages-file targets.txt. These scope the visual-diff / vitals passes; the flows crawl always runs.

Key flags

FlagDefaultWhat it does
--prod / --candrequiredThe two URLs to compare
--preset—smoke | full | ci
--only / --skip / --why—Module/check selection (see above)
--viewportsmobile,desktopViewports to test
--no-visual-diffvisual onSkip the visual-diff pass
--no-cache / --bypass-cachecache onIgnore / wipe the cross-run verdict cache
--fail-oncriticalExit 1 when an issue at/above this severity is hit
--llmautoanthropic | openrouter | claude-code | none | auto
--jsonoffStream JSONL of check results

See also