Prestashop Upgrade Toolbox Integrity
ASecurityProve a migrated or rebuilt PrestaShop storefront lost nothing, then run the cutover. Use when a shop has been migrated to a new version or had its front rebuilt and you need to verify it before going live: compare the outgoing links of each template between old and new site, check CMS pages exist AND that templates link the right ones, compare URL inventories before and after, detect soft 404s, reconcile orders/invoices/payments/stock between source and target, count product images on disk, ...
- 6 stars
- 0 votes
- 0 copies
- 0 views
- Added December 1, 2026
Works with
Security analysis
100/100Pro scans all 20 files and shows the line behind each finding
npx -y skills add PrestaShopCorp/PrestaShop-Upgrade-Toolbox --skill prestashop-upgrade-toolbox-integrity --agent claude-codeAre you the author of Prestashop Upgrade Toolbox Integrity?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/prestashopcorp-prestashop-upgrade-toolbox-integrity)---
name: prestashop-upgrade-toolbox-integrity
description: >
Prove a migrated or rebuilt PrestaShop storefront lost nothing, then run the cutover. Use when
a shop has been migrated to a new version or had its front rebuilt and you need to verify it
before going live: compare the outgoing links of each template between old and new site, check
CMS pages exist AND that templates link the right ones, compare URL inventories before and
after, detect soft 404s, reconcile orders/invoices/payments/stock between source and target,
count product images on disk, compare configuration, back office permissions and database
schema, smoke-test critical routes, check customer passwords still work, sweep for residual
personal data and plain-text secrets; then freeze the source, run the go/no-go gate, switch over
and keep a rollback. Covers phases 7 and 8. NOT for the pre-decision audit (see
prestashop-upgrade-toolbox-audit), NOT for moving the data (see prestashop-upgrade-toolbox-data), NOT for
porting the modules (see prestashop-upgrade-toolbox-modules).
---
# Integrity checks and cutover (phases 7–8)
Shared context and conventions: **`prestashop-upgrade-toolbox-core`**. Read it first — in particular
the rule that a control which has never been made to fail is not a control.
**Dossier:** write as you go in `migration/04-integrity.md` and `05-cutover.md` for the cutover, and what a reader must know in `migration/page/04-integrity.html` and `page/05-cutover.html` — the runbook of the day as it unfolds (`prestashop-upgrade-toolbox-core`, "The migration dossier").
## Three questions, not one
An acceptance pass spontaneously answers *"do the pages respond?"*. That is the easiest question
and the least covering. You need three.
| Question | What it catches | What it lets through |
|---|---|---|
| 1. Do the **URLs** answer? | 404s, broken routes | a page served but empty; a link gone from the menu |
| 2. Is the **navigation** intact? | template elements lost (menu, header, footer) | a link that is present but points at the wrong page |
| 3. Are the **destinations** right? | links to a duplicate, a stub, an impoverished page | — |
> 🔴 The classic mistake is to have asked only the first. A URL inventory can prove that not one
> indexed page is lost while an entry point in the header has silently vanished from the rebuilt
> front — the page still exists and still answers 200. That gets found by the merchant, looking
> at their own site.
Full method, seven axes: [references/site-acceptance.md](references/site-acceptance.md).
Access continuity, personal data and secrets:
[references/access-and-data-checks.md](references/access-and-data-checks.md).
The cutover itself: [references/cutover-runbook.md](references/cutover-runbook.md).
## The controls
Independent controls, each on a different axis. None of them subsumes another, and the gaps
*between* them are where damage hides — so the table below is also the coverage map: read it by
**kind of damage** and hunt the empty cells
(`prestashop-upgrade-toolbox-core/references/control-self-audit.md`).
| Control | Kind of damage | Script and declaration |
|---|---|---|
| Template links | navigation, destinations | `scripts/audit_template_links.py` |
| URL inventory before/after, exhaustive | SEO routes | `scripts/seo-inventory.py` |
| Route smoke test **and soft 404s** | HTTP, empty pages | `scripts/smoke.py` |
| Accounting reconciliation | rows, money | `capture-metrics.py` + `compare-captures.py`, `metrics/accounting.tsv` |
| Real customer e-mails, production only | addresses lost, or anonymised by mistake | same pair, `metrics/emails.tsv` |
| Business configuration, source vs target | settings both versions share | same pair, `metrics/config-crossversion.tsv` |
| Configuration equivalence, target vs target | replay of the validated front state | same pair, `metrics/config.tsv` |
| Environment values | substitutions actually applied | same pair, `metrics/environment.tsv` |
| Multistore topology | per-shop rows and scoping | same pair, `metrics/shop.tsv` |
| Back-office access | employees, profiles, permissions, API accounts | same pair, `metrics/access.tsv` |
| Served files | images, downloads, uploads, mail templates | same pair with a **shell** interpreter, `metrics/files.tsv` |
| Schema drift, same database | structure before/after a hop or a reload | same pair, `metrics/schema.tsv` |
| Schema vs a vanilla install | vanilla tables/columns the target lacks | `capture-sets.py` + `compare-sets.py`, `metrics/schema-sets.tsv` |
| Password lineage | customer access | `prestashop-upgrade-toolbox-data/scripts/check-password-lineage.py` |
| Functional perimeter, hop by hop | modules, hook attachments and global switches changed with no decision | `capture-sets.py` + `scripts/state_diff.py compare`, `metrics/module-state-sets.tsv` |
| Modules on money and customer hooks | a payment module nobody asked for, or one missing | `scripts/state_diff.py expect` on `hook_modules`, against a list written in advance from the source's own (`displayPayment` on 1.6, `paymentOptions` from 1.7) |
| Carriers offered | a carrier lost, added or switched off | `scripts/state_diff.py expect` on `carriers` (`metrics/module-state-sets.tsv`, keyed by `id_reference`), against the source's enabled carriers |
| URL families known from outside | a URL shape engines indexed that the rebuild does not serve | `scripts/url_families.py`, with `metrics/route-sets.tsv` to explain a broken family |
| Surfaces called without a page | feeds, direct scripts, module endpoints third parties use | `prestashop-upgrade-toolbox-audit/scripts/access_surfaces.py`, on the target's logs after the switch |
| Containment restored | a guardrail still cut in production, or one that never cut anything | `prestashop-upgrade-toolbox-data/scripts/containment_check.py verify --state live` |
| Staging carry-over | validated configuration overwritten by the final import | `scripts/staging_delta.py plan` then `final` (runbook §0) |
| Staging frozen, ids free | a change made on staging after J-2; rows created on staging whose ids the source reused since | `scripts/staging_delta.py frozen` and `ids` |
| Source frozen | an order written after the freeze snapshot | the freeze captured twice, five minutes apart, `compare-captures.py` |
| Leftovers after an import | menu entries of absent modules, ghost modules, entities missing a translation or a shop | `prestashop-upgrade-toolbox-data/scripts/landing_check.py leftovers`, after the transplant, after acceptance, on the day |
| What production served, on the new production | a cookie banner, an analytics tag, a feed or a partner domain gone | `prestashop-upgrade-toolbox-audit/scripts/served_fingerprint.py` at the freeze and on the new shop, then `state_diff.py compare` |
| URLs at the freeze, decided losses only | a URL lost that nobody decided, or a decided loss that did not happen | `scripts/seo-inventory.py compare --expected` |
| Staging domain and test values | links to staging, a test bank account, a test mode, `robots.txt` blocking the shop | `scripts/forbidden_values.py` |
**Capture then compare** is deliberately two steps: at a cutover the source is a dump, not a live
database, so the source is captured **once at the freeze** and the target compared against that
archived reference as many times as needed.
**Cells and sets are different tools, on purpose.** A metric collapses to one value, so the
verdict is a string equality — perfect for "did this move?". A *set* keeps its rows, so the
verdict is a difference you can read. Use sets wherever the two sides legitimately differ in bulk:
comparing a real target's schema to a vanilla install as hashes gives seven permanent reds and
nothing to read, which is the "cries wolf on a correct run" failure that gets a control switched
off.
**Each declaration states its own scope, and the runner enforces it.** A file carrying
`#!scope target-only` refuses to be captured on the source, so `--side source|target` is required
whenever a scope is declared. That is not bureaucracy: `config.tsv` reads
`<prefix>_shop.theme_name` and `<prefix>_translation`, neither of which exists on a 1.6 source, and
the symptom of pointing it at the wrong side is a *"table doesn't exist"* error that reads like
missing **data** instead of the wrong **side**. Today: `accounting.tsv`, `emails.tsv`,
`config-crossversion.tsv`, `shop.tsv` and `files.tsv` are `source-and-target`; `config.tsv`,
`access.tsv` and `environment.tsv` are `target-only`; `schema.tsv` is `any` (the same database,
before and after). Environment-specific values are separated for a different reason — the
transplant substitutes them, so comparing them across environments differs by design.
**Capture through the dossier.** `dossier.py capture --dir migration --env <env>` runs every
declaration allowed on that environment's side with the values of its profile
(`migration/<env>.local.env`: client, prefix, newsletter table, sample modulus, excluded status
modules, anonymisation domain, root), into `migration/captures/<label>/`, and says which
declarations the profile cannot serve. `dossier.py run --step 04-integrity` (or `05-cutover`) then
executes the gate rows and writes their dated results — see `prestashop-upgrade-toolbox-core`, "The
migration dossier". Two values must be the **same on both sides** or the comparison is meaningless:
`SAMPLE_MOD`, and `EXCLUDE_STATE_MODULES` — the payment modules installed on the target create
their own order statuses, excluded by module name so that a status added or lost on the source
stays visible. `emails.tsv` is compared in production only: on an anonymised copy its count is 0 by
design, and "no real address left" is a containment probe there, not a comparison.
**Use `--diagnose` on the first run against any new shop.** A capture aborts on the *first* empty
metric, which is right on the day and wrong when you are setting up: a declaration whose version
cannot serve five of its metrics takes six runs to reveal them one at a time, each re-executing
everything that already worked. `--diagnose` evaluates them all, prints each one with the database
client's own message, and **writes no capture** — a diagnostic must never be mistakable for a
reference. Then re-run without it to capture.
Every one of these ships with stubbed tests in `tests/` that force it to go **red** — an
unreachable site, a query returning nothing, two hollow captures, unequal metric sets, a verifier
that accepts anything. Run them after any change: they need no database, no server and no
container.
What has run on real data and what only on stubs is kept in one place: the README, "What has and
has not been proven". Read it before trusting a verdict, and treat the first run on a new shop as
part of the work.
## Reference captures rot
A metric declaration grows: the day you add a metric, every older capture stops being comparable.
`compare-captures.py` **fails** on unequal metric sets rather than comparing the intersection.
That is the intended behaviour, and it means one thing operationally: **re-capture the reference
whenever the declaration changes**, before you need it.
And be honest about what a reference *is*. A capture taken from the target after a dry run and
some manual fixes measures **drift between runs** — it is not an independently validated
**oracle**, the reference of truth a result is judged against. Say which of the two you have.
## Then the cutover
Rehearsal at J-2 → staging frozen → on the day: integrations stopped, freeze proven, chain
replayed, **staging carried over** and the final diff, the day's gestures (images, caches and CDN,
sitemaps), the merchant's third-party switches → **go/no-go gate on the new production** → open →
J+1. Who does what, the rollback and the accounting decision on invoice numbering:
[references/cutover-runbook.md](references/cutover-runbook.md).
What the scripts never do, by design: switch the DNS or the document root, open the shop to the
public, touch a server's scheduled jobs, CDN, backups or PHP settings, change a setting on a third
party's side, tell third parties their integrations are suspended, copy a backup off the machine.
Those are the merchant's or the host's boxes; the controls check their effect.
## Done
- `dossier.py check` at `STATUS: consistent`, with `04-integrity` marked done and every gate row proven, and `05-cutover` likewise after the switch — its gate run on the **new production**, and every blocking before/after check with both cells proven;
- the J+1 check written, a payment method with no real order yet marked as waiting, never as checked;
each line's result cites its log — `dossier.py check` refuses `05-cutover` done otherwise;
- the three questions answered, not just the first;
- every control run, each **read** rather than merely green, with its sample size — and
`SOFT404_GUARD=on` in the smoke output, or a written reason why not;
- password lineage proven through the target's runtime, not through a text file;
- the files measured on both sides, not assumed;
- every URL family known from outside reachable on the target (`url_families.py`,
`STATUS: reachable`), and the modules on payment and carrier hooks exactly the expected ones
(`state_diff.py expect`, `STATUS: as-expected`);
- multistore either covered or declared out of scope in writing;
- personal-data and secret sweeps re-run after the last import;
- what could **not** be tested written down as a **hole in the acceptance**, not as a finishing
touch — a payment tunnel with no sandbox is the usual one;
- results delivered as a three-column table: finding / verdict (**regression** · **decision** ·
**pre-existing**) / action. An audit that does not separate those three is unusable, and the
merchant cannot act on it.
Files in this skill
- SKILL.md
- references/access-and-data-checks.md
- references/cutover-runbook.md
- references/site-acceptance.md
- scripts/audit_template_links.py
- scripts/capture-metrics.py
- scripts/capture-sets.py
- scripts/compare-captures.py
- scripts/compare-sets.py
- scripts/forbidden_values.py
- scripts/metrics/access.tsv
- scripts/metrics/accounting.tsv
- scripts/metrics/config-crossversion.tsv
- scripts/metrics/config.tsv
- scripts/metrics/emails.tsv
- scripts/metrics/environment.tsv
- scripts/metrics/files.tsv
- scripts/metrics/module-state-sets.tsv
- scripts/metrics/route-sets.tsv
- scripts/metrics/schema-sets.tsv
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.