Some checks failed
Caterium QA / qa (push) Failing after 8m8s
Clients: every page load re-sent all clients (72 requests for 18 clients) because pushAll ran from several startup events at once, never skipped unchanged clients, and overlapping saves of one client read the same stale version, so ~40% ended in 409 conflicts. The payload also carried a fresh updatedAt, so even identical re-sends bumped the server version and wrote a change event, which made other devices' next save conflict too. - Remember what the server holds per client (content fingerprint, scoped to the workspace) and skip unchanged clients; seed it from the server snapshot so a device that is already in sync sends nothing. - Serialise saves per client and make pushAll single-flight. - Load the server snapshot before the startup push instead of racing it. - Drop the volatile updatedAt from the payload (server keeps updated_at). Error log: a record the server refuses (Access denied for a workspace the user is not in) stayed in the IndexedDB queue forever, was re-sent on every flush and could block newer records behind it. Records from another workspace are now dropped, others after 3 attempts. Adds tests/client-sync-v1780.mjs (fake server enforcing the SQL conflict rule; fails on the old module) to test:static, and bumps the cache-busting versions of performance.js / app-runtime.js. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
25 lines
2.6 KiB
JSON
25 lines
2.6 KiB
JSON
{
|
|
"name": "caterium-app",
|
|
"private": true,
|
|
"version": "17.7.3",
|
|
"type": "module",
|
|
"scripts": {
|
|
"check:syntax": "node --check public/core/catalog-pricing.js && node --check public/app-runtime.js && node --check public/service-worker.js && node --check public/legacy/bootstrap.js && node --check public/core/sun-safe.js && node --check public/core/account-center-v1780.js && node --check public/core/performance.js && node --check public/core/auth-security-v1774.js && node --check public/core/trial-promo-developer-v181.js && node --check public/core/order-enhancements-v1775.js && node --check public/core/data-layer-v1773.js && node --check public/core/server-automation-v1770.js && node --check public/core/hotfix-v1763.js && node --check public/core/ops-ux-v1762.js && node --check public/core/ux-fixes-v1764.js && node --check public/core/pdf-engine.js && node --check public/core/classic-offer-pdf-v1767.js && node --check public/core/signature-offer-pdf-v18.js && node --check public/core/developer-console-v1768.js && node --check public/core/offer-workspace-v1769.js && node --check public/core/brand-theme.js && node --check public/core/company-branding.js && node --check public/core/import-archive.js && node --check public/core/access-policy.js && node --check public/core/banquet-menu.js && node --check public/core/cloud-transport.js && node --check public/core/trial-demo.js && node --check public/core/proposal-layout.js && node --check public/core/mobile-order.js && node --check public/core/help-center.js",
|
|
"test:static": "node tests/static-security.mjs && node tests/auth-security-v1774.mjs && node tests/employee-create-v1774.mjs && node tests/html-integrity-v1774.mjs && node tests/edge-security-v1774.mjs && node tests/branding-v1774.mjs && node tests/order-enhancements-v1775.mjs && node tests/client-sync-v1780.mjs",
|
|
"check:release": "node tests/release-check.mjs",
|
|
"check:deploy": "npm run check:syntax && npm run test:static && npm run check:release && node tests/backend-cutover.mjs && npm run test:db",
|
|
"test:db": "node tests/recovery/validate.mjs --smoke",
|
|
"build:recovery": "node tests/recovery/bundle.mjs",
|
|
"test:e2e": "playwright test --config=tests/playwright.config.mjs",
|
|
"test": "npm run check:deploy",
|
|
"deploy:cloudflare-backup": "wrangler deploy",
|
|
"build:demo": "node ops/demo/build-trial-demo.mjs && node ops/demo/build-trial-banquet.mjs && node ops/demo/build-trial-extras.mjs"
|
|
},
|
|
"devDependencies": {
|
|
"@electric-sql/pglite": "0.5.8",
|
|
"@playwright/test": "^1.51.0",
|
|
"http-server": "^14.1.1",
|
|
"wrangler": "4.131.0"
|
|
}
|
|
}
|