================================================================================ SETUP — a store running version 1.0 ================================================================================ 3 files under version control · config.php and spool/ excluded PASS the shop's own files are not under version control an update must never overwrite settings or a queued slip ================================================================================ T1 A clean install ================================================================================ installed 4 files, verified 4 PASS the install reports success only after verifying PASS the files really changed on disk the thing that silently did not happen, twice PASS a new file was added PASS the shop's config was left alone PASS the queued slip survived the update a slip waiting for a printer is a customer's bill PASS the previous version was kept ================================================================================ T2 THE FAILURE THAT BIT TWICE — a copy that does not happen ================================================================================ PASS an incomplete package is refused the staged files do not match the manifest (0 changed, 4 missing) — nothing has been installed PASS and nothing live was touched still on 1.1 — the check runs on the STAGED tree, before the swap PASS contents that do not match the manifest are refused the staged files do not match the manifest (1 changed, 0 missing) — nothing has been installed ================================================================================ T3 Verifying a tree that has drifted ================================================================================ PASS a healthy tree verifies 4 files checked PASS a hand-edited file is detected someone "fixing" a file on a live store is a real thing that happens PASS a missing file is reported separately from a changed one they mean different things: bad copy versus incomplete install PASS a leftover file from an older version is reported still reachable, still executable, and nobody remembers it ================================================================================ T4 Rollback ================================================================================ restored 3 files from .previous PASS rollback puts the previous version back PASS and it is genuinely the old code the updater calls this when the invariant check fails ================================================================================ T5 A package is attacker-supplied input ================================================================================ PASS path traversal in a package is refused package contains an unsafe path: ../../etc/cron.d/rx PASS an absolute path is refused: /etc/passwd PASS an absolute path is refused: C:\windows\system3 PASS a corrupt package is refused this package is not readable PASS pack and unpack round-trip exactly 3 files ================================================================================ RESULT ================================================================================ 21 passed, 0 failed