Files
back_end_oudelaa/postman/MOBILE-COMPATIBILITY-VALIDATION.md

4.0 KiB

Local validation — 2026-11-14

Scope: updated local working tree based on d936446, not a deployed release certificate.

Check Result
npm.cmd run build Passed: API Gateway, notification service, legacy TypeScript build and entrypoint copy
ESLint on changed backend TypeScript and new tests Passed, no warnings/errors
Selected Jest regression tests 11 suites, 128 tests passed
node scripts/run-isolated-e2e.js 3 suites, 29 tests passed against private temporary MongoDB replica sets
npm.cmd run perf:marketplace after build Passed response equality checks on 6,000 listings; local home average 1,445.15 → 51.32 ms, reads 16 → 3
Postman regeneration and validation Passed; all maintained collections checked for structure, API prefix and JavaScript syntax
Follow-up public checks Health/catalog GET reads on A measured; reports/options returned 404. Deployed revision and B/C unverified
Actual Flutter model parsing/build/runtime Not tested; Flutter source is outside this workspace
Firebase push delivery/project/token continuity Not tested; no sender implementation found in this repository

Selected Jest coverage includes post-drafts.service.spec.ts, mobile-compatibility.http.spec.ts, reports.controller.spec.ts, shop-response.spec.ts, marketplace.service.spec.ts, auth.service.spec.ts, auth-refresh-compatibility.spec.ts, devices.service.spec.ts, chat.gateway.spec.ts, notifications.gateway.spec.ts, and posts.service.spec.ts.

The isolated end-to-end suites cover application smoke flows, Marketplace HTTP/MongoDB transactions and asynchronous video. Added assertions exercise the existing three-stage signup with repeated Multipart arrays, real JWT authentication for draft saving/report options, no draft visibility in published profile posts, and validation-vs-auth error status for refresh. Separate HTTP tests use stand-in authentication to isolate Multipart routing, upload fields, repeated array parsing, forged ownership rejection and strict DTO validation. Those stand-in tests do not substitute for JWT verification.

The Marketplace optimization adds home/pagination checks for disabled and missing owners, legacy/null categories, inactive products, empty offset pages, integer page sizes and search length. Home concurrency tests verify shared in-flight reads, distinct parameter keys, fresh reads after completion and recovery after database failures. The performance comparison is direct local service/database time, not deployed HTTP latency; see ../docs/performance/MARKETPLACE-OPTIMIZATION-2026-11-14.md.

Draft unit tests verify separation from the published-post collection, ownership from the authenticated account, empty drafts, upload persistence, validation before writes and cleanup after upload/database failures. Marketplace tests cover identity/image aliases for both populated owners and raw ObjectIds. Refresh tests use actual JWT signing/verification to exercise expiration and invalid signatures.

To refresh captured examples locally, run in PowerShell:

$env:MARKETPLACE_CAPTURE_EXAMPLES = '1'
$env:MOBILE_CAPTURE_EXAMPLES = '1'
node scripts/run-isolated-e2e.js
node scripts/build-marketplace-postman.js
node scripts/sync-postman.js
node scripts/validate-postman.js

The capture flags only affect fixture export. The test runner starts its own local MongoDB replica set and never targets an application database. MongoDB's mongod binary must be installed or provided through MONGOD_BINARY. Example records are synthetic; signup/access/refresh token values in the mobile handoff examples are redacted. Captured examples are not production evidence.

No production deployment, migration, existing-user session transfer, external notification send or modification of Flutter was performed. Deployment owners still need to verify the release image/revision, public gateway mapping, Socket.IO proxy settings, configured response envelope, retained session storage/secrets and any external Firebase sender before switching the mobile base URL.