IOC Retail 0.1.0 — verification report
Build date: 2026-10-05
Environment: current Windows x64 host, real bundled PHP/MariaDB, isolated data dirs.

AUTOMATED API SCENARIOS (tests/integration.mjs)
1. Fresh web installation creates schema, administrator, warehouse, cash register,
   and optional demo catalog. Repeated installation returns HTTP 410.
2. Shift opens; another open shift on same register is rejected.
3. Sale 2 × 650.00 less 10% = 1170.00, cash 500.00 + card 670.00,
   immutable cost 900.00; inventory goes from 100.000 to 98.000.
4. Same UUID/payload returns same sale ID and only one stock decrement.
   Same UUID with different payload is rejected.
5. Sale exceeding stock rolls back completely.
6. Partial return of 1 unit refunds 585.00, restores inventory, rejects over-refund.
7. Inventory posting validates document version and is safe to repeat.
8. Inventory posting rejects stock changed after its snapshot.
9. Product optimistic version rejects stale edits; prior sale price/cost stay fixed.
10. Warehouse transfer preserves combined stock.
11. Cashier cannot edit products, manage users, make backups, or replay another user's sale.
12. CSRF and untrusted Host requests are rejected.
13. Expected cash 1500.00 vs counted 1490.00 produces difference -10.00.
14. SQL backup contains schema/data and matches stored SHA-256.
15. Sale, refund, document posting, shift closure and backup appear in audit.

CONCURRENCY (tests/concurrency.php)
• Two separate PHP processes sell the last unit: exactly one succeeds.
• Two processes submit the same UUID: both resolve to one sale ID; only one unit moves.
• The test found a race in the initial implementation. It was corrected by
  rechecking UUID under the shift lock and using READ COMMITTED with row locks.

TENANT ISOLATION (tests/isolation.php)
• Product listing, foreign warehouse read and foreign product update were checked
  against a separately created company. Cross-company access is rejected/filtered.

BROWSER / OFFLINE
• Login, dashboard, POS, opening a shift, product selection and checkout exercised.
• Stopped the entire local server, saved one Pepsi sale into the browser queue,
  reloaded the page while still offline, confirmed queue remained at one.
• Restarted installed application: automatic sync drained queue to zero.
• Database verified exactly one 620.00 sale and stock reduced from 100.000 to 99.000.
• Russian/Kazakh dictionaries have identical top-level key sets.

BACKUP RESTORE
• Executed installed Restore-Backup.ps1 with server stopped.
• Cold database copy and safety SQL backup created before restore.
• Restore finished, sessions revoked, original sale count/inventory verified,
  and backup.restored audit entry verified.

PACKAGING / RUNTIMES
• PHP and MariaDB ZIPs verified against upstream SHA-256.
• MariaDB source tarball verified against upstream SHA-256.
• C# launcher, bridge, installer and uninstaller compiled for x64.
• EXE installer executed in silent test mode into a clean directory; embedded
  payload hashes verified. Test installation avoids shortcuts/registry changes.
• Installed launcher starts bundled database, web server and bridge.
• Tested installation and database paths containing spaces and Cyrillic characters.
  PHP extension loading was changed to an application-relative path to support them.
• Device Bridge unauthenticated health request returns 403; authenticated health
  and printer enumeration succeed.
• PHP syntax checks and JavaScript syntax check pass.

NOT VERIFIED / NOT CLAIMED
• A separate clean Windows VM and all Windows builds; real USB/COM/POS hardware.
• Real printer output, scale/cash drawer protocols, certified fiscal services,
  bank payments, public internet deployment or independent security audit.
• Installer GUI interaction, shortcut creation, Windows autorun and uninstaller
  execution were not automated; code compiled and packaging paths inspected.
• Production load, all browser/phone combinations, long-duration fault injection.
• Features marked absent in FEATURES.txt are not represented as implemented.
