freshyo/docs/test reports/full-regression-2026-10-18.md
2026-10-18 18:19:15 +05:30

253 KiB
Raw Permalink Blame History

Freshyo full regression run — test-case catalog execution

Run ID: FR-2026-10-18-01 Date started: 2026-10-18 11:11 IST (05:41 UTC) Database: throwaway/staging Postgres meatfarmer @ 57.128.212.174:7447 (schema mf) — disposable, freely mutable during this run. Backend: http://localhost:8787 (wrangler dev, wrangler.dev.toml, verified live) Clients under test:

  • Customer mobile (Expo Go): host.exp.Exponent ← Metro :8081 (apps/user-ui)
  • Admin mobile (Expo Go): host.exp.Exponent ← Metro :8082 (apps/admin-ui)
  • Customer web: Chromium http://localhost:4174
  • Superadmin web: Chromium http://localhost:4176 (apps/superadmin-ui; note :4175 is a stale sandbox copy)
  • iOS simulator (booted): iphone_6.5_in / iOS 18.6 — 5A64695E-F4D4-4E2E-90F3-EC3493A2B457 Method: per the catalog README — happy paths via Maestro UI on Expo Go; persistence/security via direct tRPC probes and authoritative mf.* Postgres reads. See docs/maestro-mcp-agent-guidelines.md.

Identities used

Alias Identity Source
anon no token —
U1 customer id 1, mobile 9676651496, meatfarmer@123 existing
U2 customer id 1327, e2e_u2b@test.com / 9000000002, Test@12345 registered this run
U0 customer id 1328, throwaway email, Test@12345 registered this run
staffA e2eadminA / Test@12345 (region 1) existing
staffB e2eadminB / Test@12345 (region 2) existing
SA superadmin / superadmiN123 existing

Progress log

  • 11:11 IST — environment verified (backend 8787, Metro 8081/8082, web 4174/4176, sim 5A64695E…); identities established; report opened. DB-access limitation discovered (live D1 state not readable from this shell) — API probes used as authoritative evidence.
  • 11:20 — Maestro MCP wedged ("Device became unreachable"); MCP process restarted; CLI driver used as fallback; MCP used afterwards.
  • 11:24–11:50 — customer app E2E in Expo Go (login wall → cart → COD order #2560 → cancel → order history) + admin app (session, orders, fulfilment).
  • 11:50–13:10 — API sweeps: security matrix, auth, regions/bounds/constants/location/addresses, cart/slots/checkout/pricing/flash, coupons, orders/cancellation, complaints/incidents/notifications/uploads/jobs, staff/profile, catalogue CRUD, cache.
  • ~13:15 — report finalised.

Status summary

855 catalogued cases. Executed with evidence: 249 (PASS 176 · FAIL 34 · PARTIAL/BLOCKED/INCONCLUSIVE 22 · N/A 17). Not run: ~606.

Checklist Cases PASS FAIL PARTIAL/BLOCKED N/A NOT RUN
authorization-api-contracts 28 12 7 4 0 5
customer-authentication 18 11 4 1 1 1
regions 16 8 2 4 0 2
bounds 18 8 1 2 0 7
constants-configuration 18 10 3 2 0 3
location-region-switching 25 8 0 0 0 17
addresses 25 12 3 2 0 8
cart 23 3 1 1 0 18
scheduled-slots 20 3 0 0 0 17
checkout 22 8 1 0 0 13
pricing-delivery-fees 22 6 0 0 0 16
flash-delivery 16 3 0 0 0 13
coupon-management 21 6 3 1 0 11
coupon-application 28 8 0 0 0 20
coupon-stacking-and-cart-guards 47 0 0 0 0 47
reserved-coupons 18 3 0 0 0 15
orders 22 6 2 1 1 12
cancellation 18 3 2 1 0 12
fulfillment 16 2 0 1 0 13
order-edits-rebalance 18 0 0 0 0 18
delivery-operations 14 0 0 0 0 14
complaints 16 4 1 0 0 11
customer-management-incidents 17 3 2 0 0 12
notifications 19 2 1 0 0 16
uploads-images 20 4 1 0 0 15
jobs-health 15 2 0 0 0 13
staff-authentication 15 3 0 0 0 12
staff-management 14 5 0 0 0 9
profile-account-lifecycle 16 3 0 0 0 13
regional-stores 15 4 0 0 0 11
global-stores 15 1 0 0 0 14
regional-products 20 5 0 0 0 15
global-products 21 4 0 0 0 17
combos 16 1 0 0 0 15
catalog-search 18 0 0 0 0 18
product-tags-ordering 16 3 0 0 0 13
product-groups 14 3 0 0 0 11
banners 14 4 0 0 0 10
reviews 12 2 0 0 0 10
vendor-snippets 15 3 0 0 0 12
cache-publication 23 3 0 0 0 20
fallback-legacy-pages 14 0 0 0 0 14
otp-authentication 15 0 0 0 15 0
recovery-platform-accessibility 22 0 0 0 0 22

P0 defects found (blockers for a release decision)

  1. Customer privilege escalation on admin procedures — a customer JWT reads the staff list/roles and can suspend any user; admin.user.sendNotification is reachable and broadcasts to all users when userIds is empty. ~30 admin procedures use protectedProcedure instead of staffProcedure (SEC-01/28, CUSTOPS-05, NOTIF-19).
  2. Suspension is not enforced — createContext assigns user before the suspension check and the catch does not clear it; suspended users keep full API access and can log in (CUSTOPS-04). Order placement is the only blocked path (ORDER-06).
  3. JWT secret committed in wrangler.dev.toml/wrangler.prod.toml with a weak value → offline minting of any staff/superadmin token (SEC-06).
  4. No quantity/inventory bound on orders — quantity:1e9 created a ₹235,000,000,000 order (CART-16 / ORDER-04).
  5. Coupon type switch keeps the old discount — percent stays and still applies after a flat switch (CPM-21).
  6. Cross-user complaint — U2 can raise a complaint against U1's order (COMPLAINT-02).
  7. Non-finite/negative money accepted — negative and 1e308 prices, negative/150% coupons (STOCK-12, CFG-08, CPM-06).
  8. Business rejections surface as HTTP 500 with stack traces, not actionable 4xx (SEC-15/22 and throughout).
  9. Unknown/foreign keys accepted — superadmin.const.updateGlobalConstants has no whitelist; tagsOrder accepts garbage SKU ids; tagsOrder/updateBoundSettings scope checks are otherwise good (CFG-13, CFG-17, SEC-13).

Fixtures created during the run (throwaway DB)

Regions 4–8 (E2E Region…, E2E Sole…, E2E Race…) — region deletion is unsupported, so these remain; none overlaps the Mahabubnagar GPS polygon. Store 11 (soft-deleted products keep it undeletable), tag 11, group 14 (deleted), banner 14 (deleted), global store 12 (deleted), product 156/157 (deleted), customer U2 (+addresses), several E2E… coupons (invalidated), reserved secrets (redeemed), orders 2560–2581 (mostly cancelled). Global versionNum/region-1 supportMobile/bound-2 settings were reverted; the stray __e2e_unknown_key__ global const was nulled.


1. Security / authorization matrix (authorization-api-contracts.md, 28 cases)

Probe method: direct tRPC calls with anon / U1 / U2 / staffA / staffB / superadmin tokens, plus forged JWTs (HS256 signed with the repo's JWT_SECRET). Live D1 state was not readable from this host (see "DB access" note below), so persistence assertions use API reads.

Case Status Evidence
SEC-01 Anonymous/customer calls admin/superadmin mutations FAIL (P0) Anon → 401 for every admin/superadmin mutation (good). But a customer token reaches the resolver on protectedProcedure-based admin mutations. Actual unauthorised write proven: U1 called admin.user.updateUserSuspension and suspended user 1327 (200 User suspended successfully), then unsuspended. (Reverted.)
SEC-02 Regional staff calls superadmin procedures PASS staffA/staffB → 401 on superadmin.regions.create, staff.create, const.updateGlobalConstants, const.updateLegacyConstants, globalProducts/globalStores/globalCoupons.create, regions.deleteBound, const.getGlobalConstants.
SEC-03 Staff B probes A ids PASS (mostly) staffB (region 2) → 404 for region-1 product 30, store 2, slot 2072; banner.getBanner 13 → null; getGroups/getProductTags → empty. Writes blocked: toggleOutOfStock/deleteProduct/deleteStore/updateBanner/updateSlotCapacity → 404. Minor: order.getOrderDetails and coupon.delete return 500 "not found" instead of 404.
SEC-04 Save with foreign ids PASS staffA update/save with region-2 store/group ids rejected; no cross-region write observed (verified via subsequent getStores/getGroups).
SEC-05 U2 probes U1 data PASS U2 order.getOrderById→own scope; address.updateAddress id 17 → rejected; address.deleteAddress 17 → 404 "does not belong to user". getUserAddresses/getMyCoupons/complaints return only own rows.
SEC-06 Forged/expired/malformed JWT FAIL (partial, P0) Expired, wrong-secret, malformed, alg:none, ghost staffId, ghost superadminId, userAsSuper → all 401. But the JWT secret my_meatfarmer_jwt_secret_key is committed in wrangler.dev.toml (and prod config), so a token minted offline with {staffId:11} was accepted as staff (admin.me returned e2eadminA). Anyone with repo access can impersonate any staff/superadmin.
SEC-07 Removed/reassigned staff token NOT RUN (destructive fixture change)
SEC-08 Regional edit of global structural fields PARTIAL getStores returns isGlobal; regional store update rejects globals (existingStore.isGlobal guard). Full structural-field matrix deferred to STOCK/GP sections.
SEC-09 Public route field exposure PASS (with notes) common.essentialConsts returns only business constants + assetsDomain/apiCacheKey (no secrets). listRegions returns public region rows. No credentials in public payloads.
SEC-10 Mixed-region checkout / foreign address-bound see CHECK section Covered with checkout.
SEC-11 Item packaging with foreign ids see FUL section
SEC-12 Malformed/empty/huge ids PASS (mostly) id:'abc'/' 1 '/null → 400; -1,0,1.5,1e21,>2^62 → 404. Minor: order.getOrderById orderId:'abc' → 500 instead of 400.
SEC-13 Unknown / wrong-scope const key FAIL (P1) superadmin.const.updateGlobalConstants {key:'__e2e_unknown_key__'} returned {success:true} and persisted the unknown key into global consts (no whitelist). Wrong-scope write (bound key via region endpoint) correctly rejected (400).
SEC-14 Customer-supplied money/creator/actor see CHECK/ORDER sections
SEC-15 Business rejection contract PARTIAL OOS/full-slot/protected-delete rejections tested in feature sections; several not-found paths surface as 500 (see SEC-03).
SEC-16 Partial write on failure see feature sections
SEC-17 Duplicate/concurrent operations see feature sections
SEC-18 Coupon / reserved redemption races see coupon sections
SEC-19 Large arrays / unbounded queries FAIL (P1) admin.order.getAll {limit: 1e9} returned the full result set (no upper bound on limit), coupon.getAll {limit:1e9} likewise. 100 kB search string → 431.
SEC-20 Script/HTML in fields PARTIAL Stored/echoed verbatim by API (see CUSTOPS/COMBO); UI escaping not exhaustively verified.
SEC-21 SQL-special strings PASS ' OR 1=1--, x'; DROP TABLE users;--, Robert'); DROP TABLE users;-- → empty results, no error, user table intact. Minor: %/_% act as LIKE wildcards (input not escaped).
SEC-22 Private response/error/log inspection FAIL (P1) Every 500 returns data.stack with full internal file paths (TypeError: Cannot read properties of null (reading 'regionId') at file:///…/.wrangler/tmp/dev-.../worker.js).
SEC-23 CORS / origin policy PASS Origin: https://evil.example.com → access-control-allow-origin: null; allow-listed origins echoed.
SEC-24 Rate/abuse control NOT RUN No approved bounded harness; not exercised (no real SMS/notifications sent).
SEC-25 Reads after logout / account switch FAIL (P1) No server-side revocation: staff/user JWTs stay valid until expiry (30 d); logout is client-only. Account-switch residual state not systematically tested.
SEC-26 Public health/legacy/deep-link routes PASS /api/health and /api/seed public by design; /api/test/* and /api/v1/cm/* require auth (401). tRPC common.healthCheck public.
SEC-27 Auth failure then valid retry see AUTH section
SEC-28 Customer token → admin staff procedures FAIL (P0) Customer token gets 200 + full staff list with roles & permissions from admin.staffUser.getStaff, all roles from admin.staffUser.getRoles, admin.vendorSnippets.getAll → [], admin.order.getAll → 200 (empty body: swallows the null-region error). Most other admin reads return 500 (null regionId) rather than 401/403, i.e. protectedProcedure accepts customers on ~30 admin procedures. admin.user.sendNotification is reachable by a customer and queues to all users when userIds is empty (probe used userIds:[-1], queued 0 — no notification sent).

Root-cause note (SEC-01/28)

packages-level: protectedProcedure in src/trpc/trpc-index.ts authorises any authenticated principal (ctx.user || ctx.staffUser). ~30 admin procedures use protectedProcedure instead of staffProcedure, then dereference ctx.staffUser!.regionId — customers therefore either (a) reach the resolver and fail with a 500, or (b) if the resolver never dereferences staff context first, succeed (staff list/roles read, user suspension write, notification broadcast).

Bonus defect found while testing

src/app.ts createContext: for regular users it sets user = decoded before the isUserSuspended check, and the surrounding catch does not clear user. Result: suspend has no effect — suspended user 1328 could still log in and call user.user.getSelfData (200) while isSuspended=true (verified with staffA suspend → U0 old token 200, fresh login issued and 200; reverted).

Still-open SEC cases (not run)

SEC-07 (destructive staff reassignment), SEC-14/16/17/18/20 (covered from feature sections), SEC-24 (rate limits — no bounded harness approved).

Area totals: PASS 11 · FAIL 7 · PARTIAL 5 · NOT RUN 2 · (SEC-10/11 deferred to CHECK/FUL)

2. Customer authentication (customer-authentication.md, 18 cases)

Case Status Evidence
AUTH-01 Password login with each identifier PASS (partial) Mobile 9302136839 → 200; email (lowercase) → 200; UPPERCASE email → 200 (case-insensitive). Minor FAIL: mobile with surrounding spaces (" 9302136839 ") → 401 Invalid credentials (no trimming). No OTP sent.
AUTH-02 Register → sign out → sign in PASS Registered U0; re-login with the same credentials → 200, same userId.
AUTH-03 Login from Cart / Me / protected links PASS (UI) See Maestro run §22 — login wall from Cart returns to cart with items intact.
AUTH-04 Signed-out browse + Cart/Me PASS (UI) See §22.
AUTH-05 Cold start with persisted session, then logout PASS (UI) See §22.
AUTH-06 Wrong password / unknown / empty / malformed PASS wrong pw → 401; unknown → 401; empty identifier → 400 zod; @@@ → 401. No token issued.
AUTH-07 Missing fields / bad email / bad mobile / weak pw FAIL (P1) Missing email → 400; notmail → 400; 12345 mobile → 400. But password "1" was accepted and account 1329 created — no minimum-strength/unacceptable-password rule.
AUTH-08 Duplicate email/mobile, case/space variants PASS Duplicate email → 409; duplicate email with different case → 409; duplicate mobile → 409. Email normalised lowercase.
AUTH-09 Unicode / long / whitespace FAIL (minor) Unicode name "Ünïcødé 😀" accepted (200) and trimmed; a 500-char name was also accepted (no length limit) — agreed limits not enforced.
AUTH-10 Tampered/expired/malformed JWT PASS see SEC-06.
AUTH-11 Customer↔staff token crossing FAIL (minor) staff token → user.user.getSelfData returns 500 (null.userId) instead of 401/403; superadmin token → 401.
AUTH-12 Logout U1 → login U2, no residue PASS (API) U2 getUserAddresses/getOrders/getMyCoupons return only own (empty) data; no U1 rows leaked.
AUTH-13 Double-tap / delayed login PASS (UI) See §22 (single submit; no duplicate session).
AUTH-14 Error then retry PASS Bad login → 401; immediate valid login → 200.
AUTH-15 Malicious/privileged return URL PARTIAL freshyo:// deep links only navigate to app routes; no open redirect observed in the login return path (UI, §22).
AUTH-16 Concurrent duplicate registration FAIL (P1) Two simultaneous register calls with the same email + same mobile both returned 200 and created two users (1332, 1333) — no uniqueness race guard / unique constraint at time of write.
AUTH-17 Refresh/back + keyboard/secure entry PASS (UI) Secure password field accepts inputText (masked); login succeeds (§22).
AUTH-18 OTP in isolated harness N/A (POLICY) Excluded from default password suite per README; no real SMS tests executed.

Area totals: PASS 11 · FAIL 4 · PARTIAL 1 · N/A 1 · NOT RUN 0

22. Maestro UI run log — customer app in Expo Go (host.exp.Exponent, Metro :8081)

Device 5A64695E… (iphone_6.5_in, iOS 18.6); GPS 16.7489,77.9856; region Mahabubnagar (1). Screenshots in run artifacts. Harness note: the Maestro MCP server wedged mid-session ("Device became unreachable during deviceInfo") after its simulator-server child was replaced; the MCP process was restarted and the reference CLI driver was used as a fallback. MCP was then used for the rest of the run. Viewer: http://127.0.0.1:9999/.

Step Action Result
1 openLink exp://127.0.0.1:8081 → home Home rendered: DELIVER TO Mahabubnagar, search bar, popular categories, tab bar. Bundle loads in Expo Go; status bar clean.
2 Cold start with previous session (AUTH-05) Session restored — home showed the account's upcoming order #ORD2558; Me tab showed My Account without re-login.
3 Me tab → gear → Edit Profile Profile shows Full Name shafi, empty email, mobile 9676651496; Update Profile / Update Password / Logout / Delete Me and My Data all present.
4 Logout (AUTH-05) Me tab flips to the "Please log in" wall (Log in to view your profile, orders and more. + Log In). Private data gone.
5 Browse signed out (AUTH-04) Home + category tabs + search all work signed out.
6 Search "Chicken" (CAT-01/CAT-02) Search Results for "Chicken"; 4 results; OOS badges + UNAVAILABLE on slot-less SKUs, available SKU purchasable.
7 Open Chicken boneless PDP (CAT-03) Images carousel, description, ₹235 / 0.5Kg (₹239, 2% OFF), Add to Cart + Get in 1 Hour (flash) buttons.
8 Add to Cart signed out (CART-01/02, SLOT-06) Slot sheet: Select Delivery Slot → Fri, 30 Oct · 7-8 PM, quantity stepper, Add to Cart. Selected slot + qty 1 → item added; sticky bar ₹235 • 1 Item, ₹65 more for FREE Delivery.
9 Go to Cart signed out (CART-04) Login wall: Please log in / Log in to view your cart and continue to checkout. with Log In + Go Back.
10 Log In → mobile → "other ways to login" → password (AUTH-03, AUTH-17) Login screen renders in place (RG-13). Mobile 9676651496, T&C pre-checked, password meatfarmer@123 (masked) → success; returned to the cart with the item intact. iOS "Save Password?" sheet → Not Now.
11 Cart with session (CART-03, PRICING-01, ADDR-01) Line: Chicken boneless 0.5Kg ×1, slot Fri, 30 Oct 7-8 PM + Change, ₹235. Delivery Slot card. Offers & Coupons (Select a coupon / Add Coupons to account). Delivery Instructions. Delivery Address carousel with default Shafi (Mbnr, Mahabubnagar) selected + + Add New.
12 Cart bill (MONEY) Item Total ₹235 · Products discount ₹4 · Delivery Fee ₹20 · banner "Add products worth ₹65 for free delivery" (⇒ bound threshold ₹300) · To Pay ₹255 (235 − 0 coupon + 20 = 255 ✓).
13 Checkout (CHECK-01/02) Scheduled Delivery Checkout: Items (slot Fri 30 Oct 7:00 PM, Chicken boneless ×1 ₹235), Delivery Address Shafi, Payment Method Pay Online (Coming Soon, disabled) + Cash on Delivery (selected); bill mirrors cart; Back to Cart + Place Order.
14 Place Order (ORDER-01) "Order Placed Successfully!" — Order #2560, Total ₹255; Continue Shopping / View My Orders.
15 Verify order 2560 via API user.order.getOrderById('2560') → {id:2560, orderId:"ORD2560", totalAmount:255, deliveryCharge:20, regionId:1, regionName:"Mahabubnagar", items:[Chicken boneless ×1 @235], isFlashDelivery:false}. admin.order.getAll (staffA, region 1) lists 2560 total 255 / charge 20 / customer 9676651496. Customer and admin views agree.

Verified testIDs used: home-search, checkout-button, place-order-button, user-login-mobile, user-login-other-ways, user-login-password.

23. Maestro UI run log — admin app in Expo Go (host.exp.Exponent, Metro :8082)

Step Action Result
1 Open exp://127.0.0.1:8082 Dashboard loads; admin session already persisted (drawer: e2eadminA · Mahabubnagar). STAFF-AUTH session restore PASS.
2 Dashboard content Quick Actions: Delivery Slots, Add Product, Complaints (badge 2); Orders: Manage Orders, Delivery Sequences; Products & Inventory: Products, Prices Overview, Product Tags, Product Groupings, Banners, Slots, Coupons, Vendor Snippets, Stores, User Management, Send Notifications.
3 Drawer Drawer renders correct identity + region, all menu rows present. Bug (UI): after selecting a drawer row the drawer stays re-opened over the destination in Expo Go; it only resets on app relaunch. Card navigation from the Dashboard works fine (used for the rest).
4 Manage Orders (ORDER-04) List shows #2560 CANCELLED / 1 item / ₹255 / Delivery Charge ₹20 / slot Fri Oct 30 7:00 PM / address + phone, and #2559 CANCELLED / 3 items / ₹952 — matches the customer app and the API.
5 Manage Orders (ORDER-21 / new order visibility) An order created via API (#2561) did not appear after the in-page refresh button but appeared on re-entering the screen (and always in admin.order.getAll).
6 Pack / Deliver toggle (FUL-01/02, UI) Tapping the Packaged circle on #2561 did not toggle it (no state change). Fulfilment then verified through the API the UI calls: admin.order.updatePackaged {orderId:'2561',isPackaged:true} → isPackaged:true; admin.order.updateDelivered {orderId:'2561',isDelivered:true} → isDelivered:true; customer getOrderById → deliveryStatus:"success". FUL-01/FUL-02 PASS via API; UI toggle INCONCLUSIVE.
7 Observation for FUL policy An order in a future slot (Fri 30 Oct) could be marked delivered today (18 Oct) with no guard.

3. Regions (regions.md, 16 cases)

Case Status Evidence
REGION-01 PASS Created region id 4 "E2E Region …" with 2 bounds (ids 7,8) → 200; common.listRegions includes it.
REGION-02 PASS Rename + description update → 200, same id, name propagates to listRegions.
REGION-03 BLOCKED common.product.summary is a REST route (/api/v1/cm/products/summary, auth-gated), not a tRPC path; empty-catalog state for the new region not exercised.
REGION-04 PASS bounds: [] → 400; non-FeatureCollection geojson → 400; non-numeric priority → 400.
REGION-05 FAIL No name limits/uniqueness: an unicode name padded to 300+ chars was accepted (region 5).
REGION-06 PASS anon / customer / staffA regions.create → 401.
REGION-07 PASS regions.get id −1/0/1.5 → 400; 999999 → 404.
REGION-08 NOT RUN Global-product seeding for a new region requires global SKUs and a staff account in that region; not exercised.
REGION-09 NOT RUN Injection of a bound/cache-seeding failure not performed.
REGION-10 FAIL Two concurrent creates with the same name both returned 200 (region ids 6 and 7) — no conflict/uniqueness.
REGION-11 PASS (partial) Rename mid-run did not detach products/staff or change ids.
REGION-12 PASS No regions.delete procedure exists (404 "No procedure found") — deletion unsupported.
REGION-13 NOT RUN Long-list/stale-label behaviour needs UI.
REGION-14 PASS Public listRegions payload = {id,name,description,effectiveBoundId,center} only; no staff/account data.
REGION-15 PASS New region visible in listRegions immediately after create.
REGION-16 PARTIAL create awaits cache generation (best-effort, logs failure) and returns the region; failure-injection path not tested.

4. Bounds (bounds.md, 18 cases)

Case Status Evidence
BOUND-01 PASS New region bound created; interior point (9.95,76.25) resolves to the correct bound.
BOUND-02 NOT RUN Polygon used; MultiPolygon not exercised.
BOUND-03 PASS updateBound description + priority (2→3) persisted.
BOUND-04 PASS Malformed geojson rejected 400 (see REGION-04).
BOUND-05 PASS lat 200 / lng 400 → 400 zod rejection.
BOUND-06 FAIL Duplicate priority → 409 (good) but negative priority (−2) accepted.
BOUND-07 PASS Two same-region bounds: point in the second resolved to the second bound (deterministic).
BOUND-08 NOT RUN Exact edge/vertex/hole semantics not probed.
BOUND-09 BLOCKED: POLICY Cross-region overlap tie rule not documented.
BOUND-10 PASS Delete sole bound → 409 "only bound of region… needs at least one bound".
BOUND-11 PASS Delete bound 1 (referenced by 856 addresses) → 409 with address count.
BOUND-12 PASS staffA admin.region.getBoundSettings for region-2 bound 3 → 404 (no foreign read); superadmin path → 200.
BOUND-13 PASS U1 activeBound region 1 → bound 1 (from address), region 2 → bound 3.
BOUND-14 NOT RUN No live checkout held open during bound removal.
BOUND-15 NOT RUN Concurrency not exercised.
BOUND-16 PASS (partial) Effective-bound fallback exists (getEffectiveBoundId) for coord-free legacy rows; not exercised on a real legacy row.
BOUND-17 NOT RUN Map UI not driven.
BOUND-18 PASS Outside all bounds → resolveBound 422 "outside this region's delivery area"; resolveRegionByLocation returns null.

5. Constants / configuration (constants-configuration.md, 18 cases)

Case Status Evidence
CFG-01 PASS common.essentialConsts {boundId:1} returns all flat fields (freeDeliveryThreshold, deliveryCharge, *_version_num, assetsDomain, apiCacheKey, regionId, boundId).
CFG-02 PASS Set bound-2 deliveryCharge=25, freeDeliveryThreshold=350, isFlashDeliveryEnabled=true; essentialConsts {boundId:2} served 25/350/true. (Reverted.)
CFG-03 PASS Region-1 supportMobile change visible on bound 1, region 2 unchanged. (Reverted.)
CFG-04 PASS Global versionNum change appeared on bound 1 and region-3 bound 5. (Reverted.)
CFG-05 PASS staffA superadmin.const.updateGlobalConstants / updateLegacyConstants → 401.
CFG-06 PASS (partial) Bound key via region endpoint → 400 (scoped message); region key via bound endpoint → 400. But a bound key via the global endpoint succeeded (see CFG-13).
CFG-07 PASS String-typed deliveryCharge/freeDeliveryThreshold values parsed to numbers; 'true' parsed as flash enabled.
CFG-08 FAIL Negative deliveryCharge=-50 accepted and served by essentialConsts (deliveryCharge:-50) — no domain constraint. (Reverted to null.)
CFG-09 PASS staffA bound-settings on region-2 bound 3 → 404; bound 3 deliveryCharge unchanged (20).
CFG-10 PASS Missing boundId → 400; unknown boundId → 404.
CFG-11 PASS Bulk region-const update containing one bound-scoped key → 400 and no partial write (supportEmail unchanged).
CFG-12 NOT RUN Rapid A/B edits within the debounce window not timed.
CFG-13 FAIL superadmin.const.updateGlobalConstants has no key whitelist: a bound-scoped key (deliveryCharge) and an arbitrary key (__e2e_unknown_key__) were both accepted and persisted.
CFG-14 NOT RUN KV corruption/rebuild not performed.
CFG-15 NOT RUN Active-bound priority change while a client is open not tested.
CFG-16 PASS Server derives the order region/bound from the address coordinates in placeOrder (see CHECK); a spoofed client regionId cannot move the order.
CFG-17 FAIL tagsOrder='999999,0,-1,999999' accepted and stored — foreign/deleted SKU ids not validated. (Restored.)
CFG-18 PARTIAL Update-notice HTML is only produced when the request Host contains raw/mf; on localhost webviewHtml:null, isWebviewClosable:true. Notice visual/branching not exercised.

6. Location & region switching (location-region-switching.md, 25 cases)

Case Status Evidence
LOC-01 PASS GPS (16.7489,77.9856) → region 1 bound 1; anon activeBound(1) → bound 1; catalog loads without login (UI §22).
LOC-02 NOT RUN Permission-denied paths are UI-only.
LOC-03 PASS resolveRegionByLocation(0,0) → null; no hang.
LOC-04 NOT RUN Delayed-GPS race is UI/stateful.
LOC-05 NOT RUN Requires location change while open.
LOC-06/07 NOT RUN (UI) Region-switch confirm/cancel + rapid A→B→A not driven on device.
LOC-08 PASS Native keeps no persisted region (re-derived per launch, observed in §22).
LOC-09/21 NOT RUN (known open) Startup-adoption cart-clear (review #10) not reproduced; needs a populated cart + cold launch in another region.
LOC-10/11 NOT RUN (UI) Foreign-default override/switch not driven.
LOC-12 PASS (partial) U1 address 285 is a legacy row with vagueBackfilledCoords:true; it still reports bound 1.
LOC-13/14/15/16/17 NOT RUN Lifecycle/offline/web/emulator cases not exercised.
LOC-18 NOT RUN Submit-pending region change not tested.
LOC-19 PASS (API) Effective/active bound resolution correct for (a) U1 default address, (d) anon fallback; GPS resolution verified.
LOC-20 PASS (native) Nothing persisted; after relaunch the app re-resolved region 1 from location.
LOC-22 NOT RUN (UI) Distinct permission messages not driven.
LOC-23 PASS (UI) Login-from-gate… the cart login wall rendered the login screen in place and returned to the cart (§22).
LOC-24 NOT RUN Root-wrapper route actions not exercised.
LOC-25 PASS Outside-all-bounds → null; with a default address the address region is used (U1 region 1).

7. Addresses (addresses.md, 25 cases)

Case Status Evidence
ADDR-01 PASS U2 first address with no isDefault → isDefault:true, boundId:1, regionId:1 derived from coordinates.
ADDR-02 PASS Second address with isDefault:true → exactly one default.
ADDR-03 PASS Update omitting isDefault retained the existing default.
ADDR-04 PASS Default invariant held after edits/deletes (≤1 default).
ADDR-05 PASS Order uses the selected address's bound (§22 checkout used address 285 → bound 1 fee ₹20).
ADDR-06 PASS Creating an address with region 2 + Jadcherla coords → regionId:2, boundId:3.
ADDR-07 PASS Missing name/city → 400.
ADDR-08 PASS Phone 9/11 digits and prefix 5 → 400; 10-digit 6–9 accepted.
ADDR-09 FAIL No length limits: a 400-char unicode addressLine1 accepted.
ADDR-10/11 PASS (partial) Out-of-area coords → 422 "outside this region's delivery area"; mobile form gating not driven.
ADDR-12 PASS U2 update U1 address 285 → 500 (fails, wrong contract); delete → 404 "not found or does not belong to user"; U1 address unchanged.
ADDR-13 FAIL (policy) Deleting the default address returned 409 (blocked), which contradicts ADDR-14's "delete allowed non-default unused"; the sole-address case could not be isolated (BLOCKED). Behaviour differs from the documented expectation — record, do not assume.
ADDR-14 PARTIAL Non-default delete path not isolated; default delete refused.
ADDR-15/16/17 NOT RUN Referenced-address delete and foreign-default switch not driven.
ADDR-18 PASS Region-2 coords with regionId:1 → 422; bound re-derived from coordinates for legacy rows.
ADDR-19 NOT RUN Concurrent default changes not tested.
ADDR-20/21 NOT RUN Address changed while checkout open / save retry not tested.
ADDR-22 PASS U1 activeBound region 2 → bound 3; B addresses not offered while browsing A (cart carousel §22).
ADDR-23/24/25 NOT RUN Sheet/keyboard/city-dropdown/signed-out-draft UI cases.

Area totals — Regions: PASS 8 · FAIL 2 · PARTIAL 2 · BLOCKED 2 · NOT RUN 2. Bounds: PASS 8 · FAIL 1 · PARTIAL 1 · BLOCKED 1 · NOT RUN 5. CFG: PASS 10 · FAIL 3 · PARTIAL 2 · NOT RUN 3. LOC: PASS 8 · NOT RUN 17. Addresses: PASS 12 · FAIL 3 · PARTIAL 2 · NOT RUN 8.

Environment note (DB access): the live database is a Cloudflare D1 SQLite store driven by wrangler dev; its .wrangler/state directory is not visible from this sandbox shell (a fresh wrangler d1 execute --local starts empty). Authoritative persistence evidence therefore comes from tRPC reads (customer + admin + superadmin views) rather than direct SQL. apps/backend/dumps/latest.sql (14 Oct) predates the multi-region schema (regions/region_bounds absent) and is only used for reference.

8. Cart (cart.md, 23 cases)

Server-side API evidence; UI evidence from §22. Local-storage cart cases are device-only.

Case Status Evidence
CART-01/02 PASS (UI) Add from search → slot sheet → 1 line, ₹235, quantity 1; sticky bar and cart agree.
CART-03 NOT RUN Increment-step enforcement across entry points not driven.
CART-04 NOT RUN Remove-confirm cancel/confirm not driven.
CART-05 PASS (UI) Signed-out add → login wall → login → the same line survived (local cart restored).
CART-06 NOT RUN Regular vs flash cart separation not driven (flash unavailable, §FLASH).
CART-07 NOT RUN Slot persistence across relaunch not timed.
CART-08 BLOCKED No OOS/suspended SKU exists in region 1, so an invalid-line order could not be attempted.
CART-09 NOT RUN Notes round-trip not driven.
CART-10 see coupon sections
CART-11 NOT RUN (known open) Explicit A→B switch clear/preserve not driven.
CART-12/13/14/15 NOT RUN Concurrency/corrupt-storage/missing-id/slow-refresh not driven.
CART-16 FAIL (P1) quantity:1.5/-1/0 → 400, but quantity:1000000000 was accepted and created order 2563 with total ₹235,000,000,000 (no max-quantity/inventory guard). Order cancelled as cleanup.
CART-17 NOT RUN Account-switch cart ownership not driven.
CART-18/19/20 NOT RUN Partial checkout / floating bar / stale params not driven.
CART-21 NOT RUN Offline submit not driven.
CART-22 NOT RUN Global SKU across region switch not driven.
CART-23 PASS (UI) Signed-out cart → login wall ("Log in to view your cart…"); U1 (has addresses) cart rendered with the address carousel. Zero-address signed-in gate not driven.

9. Scheduled slots (scheduled-slots.md, 20 cases)

Case Status Evidence
SLOT-01/03 PASS user.slots.getSlots {regionId:1} → only the single future slot (Oct 30); past slots (Oct 13–15, still isActive:true in DB) are not returned.
SLOT-06 PASS No flash slots exist (all isFlash:false) → flash unavailable, matches UI.
SLOT-02/04/05/07-20 NOT RUN Slot creation/capacity/freeze/increment/group membership via admin and UI not exercised.
CHECK-08 (slot part) PASS Ordering into a past/frozen slot 2071 → 400 "Selected delivery slot is closed for orders".

10. Checkout (checkout.md, 22 cases)

Case Status Evidence
CHECK-01 PASS Full UI COD order (#2560, ₹255) → success; customer + admin views agree (§22).
CHECK-02/03/04 NOT RUN Multi-slot grouped summary / back-navigation edit loop not driven.
CHECK-05 PASS Invalid addressId → 400 "Invalid address"; empty selectedItems → 500 (blocked, but wrong contract).
CHECK-06 NOT RUN Empty vs no-slot states not driven.
CHECK-07 PASS Nonexistent SKU → 400; string SKU id → 400; malformed ids safely rejected.
CHECK-08 PASS Past/frozen slot rejected server-side; (stale price/coupon revalidation → see coupon sections).
CHECK-09 FAIL (P0-ish, characterization) Two concurrent identical placeOrder calls both returned 200 and created two orders (2567, 2568) — matches the documented deferred server idempotency; the in-app synchronous guard was not verified on a single client.
CHECK-10/11/12/13/14/15/16 NOT RUN Failure-retry / lost-response / suborder / zero-total / ineligible-coupon / session-expiry cases not driven.
CHECK-17 PASS Client regionId:2 with address 285 (region 1) → order created with regionId 1 — address coordinates are authoritative.
CHECK-18/19 NOT RUN Mixed valid/invalid subset and platform navigation not driven.
CHECK-20 PASS Online payment is disabled ("Pay Online (Coming Soon)") and COD is preselected; no gateway invoked (§22).
CHECK-21 PASS Same as CHECK-17: address in A while client claims region B → order scoped to A; no corruption.
CHECK-22 PASS (server) slotId:null → 400 "A delivery slot is required for scheduled orders". The reported web-client defect (submitting null slot ids) is therefore guarded server-side; the web UI itself was not driven.

11. Pricing & delivery fees (pricing-delivery-fees.md)

Bound 1: freeDeliveryThreshold 300, deliveryCharge 20.

Check Status Evidence
MONEY-01 (threshold) PASS ₹235 → goods 235 + fee 20 = 255; ₹300 (exactly T) → fee 0, total 300; ₹600 → fee 0, total 600. goods − discount + delivery = payable holds; totals finite.
Free-delivery banner PASS (UI) Cart showed "Add products worth ₹65 for free delivery" at ₹235 (235+65 = 300).
Discount line PASS (UI) "Products discount ₹4" reflects market-price saving already inside the ₹235 price (₹239→₹235); payable 235+20=255.
MONEY-12/13 (coupon cap/negative) see coupon sections.
Per-bound fees PASS Bound 2 quote independently configurable (see CFG-02: charge 25 / threshold 350).
Other fee/tax/rounding cases NOT RUN platformFeePercent, taxRate, rounding of coupon shares not exercised.

12. Flash delivery (flash-delivery.md, 16 cases)

Case Status Evidence
FLASH-01 PASS Bound 1 isFlashDeliveryEnabled:'false' → placeOrder {isFlashDelivery:true} → 403 "Flash delivery is currently unavailable. Please opt for scheduled delivery."
FLASH UI PASS (partial) Tapping the flash tab with flash disabled shows "1 Hr Delivery Unavailable / Please opt for scheduled delivery" with a "Go to Scheduled Delivery" action. Defect: the product page still renders a "Get in 1 Hour" button (and a "1 Hr Delivery" badge) while flash is disabled.
No flash slots PASS All slots isFlash:false; no product has isFlashAvailable; FLASH-* enabled-path cases BLOCKED on missing fixtures.
FLASH-02..16 NOT RUN/BLOCKED Flash slot creation, flash pricing, flash cart separation, cron toggle not exercised.

13. Coupons — administration (coupon-management.md, 21 cases)

All test coupons used a unique E2E… prefix, future validTill, and were invalidated/deleted on cleanup.

Case Status Evidence
CPM-01 PASS Regional admin created a whole-cart 10% coupon (id 51, region 1) with cap 50.
CPM-02 PASS Flat-₹20 coupon created; fields persisted.
CPM-03 PASS Superadmin created global coupon 55 (regionId:null) visible in globalCoupons.list. (Deleted.)
CPM-04 PASS Regional create is region-scoped (regionId:1); protectedProcedure blocks anon/customer.
CPM-05 NOT RUN Multi-code batch/auto-code collision not exercised.
CPM-06 FAIL "Both types" rejected but as 500; negative flatDiscount:-50 accepted (id 53) and discountPercent:150 accepted (id 54) — no domain constraints.
CPM-07 NOT RUN Code normalisation/duplicate handling not isolated.
CPM-08 PASS User-based coupon restricted to user 388 (applicableUsers) — enforced at redemption (see CPA-04).
CPM-09 NOT RUN Duplicate/nonexistent applicable-user ids not tested.
CPM-10 BLOCKED Region 2 currently has no regional-only SKU (only the global product 102), so a foreign-target attempt could not be constructed.
CPM-11 PASS (API) Empty/null skuIds ⇒ whole cart; populated array discounts only those SKUs (see CPA-07).
CPM-12 NOT RUN Target replacement/clearing on edit not isolated.
CPM-13 NOT RUN Null/zero maxValue/minOrder/limit semantics not isolated.
CPM-14 NOT RUN Expiry boundaries not isolated.
CPM-15 PASS staffB updating a region-1 coupon → 400; coupon value unchanged (flat 20).
CPM-16 NOT RUN Invalidate-after-use history not inspected.
CPM-17 NOT RUN Batch partial-failure reporting not tested.
CPM-18 NOT RUN Concurrent create/save-mid-relations not tested.
CPM-19 NOT RUN Global-coupon audit metadata (createdBy is null on coupon 55) noted but not evaluated.
CPM-20 NOT RUN Picker UI not driven.
CPM-21 FAIL (P0) admin.coupon.update {id, updates:{flatDiscount:30}} on a 15% coupon → 200 but the row ends up with discountPercent:15 AND flatDiscount:30, and the applied order discount is still 75 (the 15%). The opposite field is not cleared — matches review-defect "type switch keeps old discount".

14. Coupons — eligibility & stacking (coupon-application.md, 28 cases)

Case Status Evidence
CPA-01 PASS 10%/cap-50 on ₹498 → discount 50, total 448 (goods-only, cap respected); one usage recorded.
CPA-02 NOT RUN Remove/reapply sequence not driven.
CPA-03 PASS (contract poor) Region-2 coupon in a region-1 order → rejected (500, should be 4xx). Globals allowed in both (coupon 55 is region-null).
CPA-04 PASS U2 using U1-only coupon → rejected ("not applicable to your account"); no order created.
CPA-05 NOT RUN Targeted-vs-mixed-cart split not measured.
CPA-06 PASS Targeted coupon with no target in cart → rejected.
CPA-07 PASS Targeted minOrder evaluated on the target subtotal (target ₹29 + unrelated ₹300, minOrder 100 → rejected 400) — regression R7 not reproduced.
CPA-08 NOT RUN min−0.01/min/min+0.01 sweep not run.
CPA-09 PASS Stacking order matters: [10%, flat20] → total discount 70; [flat20, 10%] → 68 — sequential application on the reduced base.
CPA-10 PASS Exclusive coupon alone works; exclusive + another → rejected.
CPA-11 NOT RUN UI replacement behaviour not driven.
CPA-12 PASS Duplicate coupon ids [id,id] → 200 with a single ₹50 discount (deduped usage).
CPA-13 PASS (contract poor) Unknown id → rejected (500), negative id → 400, fractional/nonfinite covered by zod.
CPA-14 NOT RUN Overlapping-target split slots not exercised.
CPA-15 NOT RUN Aggregate-cap overflow not exercised (no multi-coupon cart test beyond CPA-09).
CPA-16 NOT RUN OOS/flash/combo-targeted lines not exercised.
CPA-17 PASS Invalidated coupon → rejected; no order/usage written.
CPA-18/19 NOT RUN Per-user limit boundary and concurrency not exercised.
CPA-20/21 NOT RUN First-order coupon across split groups not exercised.
CPA-22 NOT RUN Stored-discount immutability after coupon edit not inspected.
CPA-23 NOT RUN Split placement usage attribution not inspected.
CPA-24/25/26/27/28 NOT RUN Boundary/foreign-region/stale-selection/rounding/quantity-reduction cases not exercised.

Cross-cutting contract defect: most business rejections inside coupon/order flows surface as HTTP 500 / INTERNAL_SERVER_ERROR (exclusive-combination, foreign-region coupon, user-only coupon, targeted-no-match, invalidated coupon, unknown coupon id) instead of an actionable 4xx. Same pattern as SEC-15.

15. Orders (orders.md, 22 cases)

Case Status Evidence
ORDER-01 PASS UI order #2560 and API orders created with correct SKUs/qty/region/total; customer and admin views agree.
ORDER-02 NOT RUN Multi-slot/split-group placement not exercised (only one future slot exists).
ORDER-03 PASS (contract poor) Empty items → blocked (500); unknown SKU → 400; invalid slot → 400.
ORDER-04 FAIL quantity:1e9 accepted (order 2563, ₹235,000,000,000); no max-quantity/inventory guard.
ORDER-05 PASS B address + region-1-only SKU → 409 "Product 24 is not available in this region"; global SKU 102 accepted in A.
ORDER-06 PASS Suspended customer placeOrder → 403; after unsuspension → 200. (Note: general API access is not blocked for suspended users — see CUSTOPS-04.)
ORDER-07 PASS (contract poor) U2 getOrderById('2560') (U1's order) → 500 "Order not found"; U2 notes on a U1 order → 400.
ORDER-08/09 NOT RUN Cross-region history + pagination not exercised.
ORDER-10 PASS (contract poor) orderId abc/ORD2560 → 500; -1/missing → 400; no arbitrary parsed id accepted.
ORDER-11/13/14/15 NOT RUN Cache invalidation, soft-delete history, mid-write DB failure, queue failure not exercised.
ORDER-12 NOT RUN Coupon/catalog change after placement not inspected.
ORDER-16 FAIL (characterization) Two concurrent identical API submits → two orders (2567/2568); server idempotency deferred per policy.
ORDER-17/18/19/20 NOT RUN Lost response / large cart / status transition / deep links not exercised.
ORDER-21 PARTIAL Region-1 admin list returns its own orders with a valid cursor; the "quiet region hidden by global ID window" scenario was not reproduced (needs 50+ newer orders in another region).
ORDER-22 N/A (accepted limitation) Historical order 2558 keeps discountAmount:490 with its coupon codes; new orders store their discount (CPA-01).

16. Cancellation (cancellation.md, 18 cases)

Case Status Evidence
CANCEL-01 PASS Customer cancelled pending COD order #2560 with a reason; status/reason stored; order left the upcoming/fulfilment view.
CANCEL-02 PASS Admin cancelOrder {orderId:2581,reason} → 200; customer view shows cancellationStatus:"cancelled" + the admin reason.
CANCEL-03 FAIL Empty reason → 400, but a whitespace-only reason " " was accepted (200).
CANCEL-04 FAIL (customer path) Admin: delivered order → 400 "Cannot cancel delivered order"; already-cancelled → 400. Customer: a second cancel of an already-customer-cancelled order succeeded once (200) and overwrote the stored reason (subsequent attempt → 500).
CANCEL-05 PASS U2 cancels U1 order → rejected (500); staffB cancels region-1 order → 400.
CANCEL-06/07/08 NOT RUN Split-group partial cancellation and multi-coupon usage restoration not exercised.
CANCEL-09/10/11/12 NOT RUN Legacy/first-order/racing cases not exercised.
CANCEL-13 NOT RUN Post-edit compensation using stored charge not inspected.
CANCEL-14 PARTIAL Cancelled orders still appear in the default admin list (no cancelled-exclusion in the unfiltered view); vendor/upcoming exclusion not checked.
CANCEL-15/16/17/18 NOT RUN Mid-transaction failure / notification failure / cart restore / dialog cases not exercised.

17. Fulfilment (fulfillment.md, 16 cases)

Case Status Evidence
FUL-01/02 PASS (API) updatePackaged → isPackaged:true; updateDelivered → isDelivered:true; customer getOrderById → deliveryStatus:"success".
FUL-UI INCONCLUSIVE Tapping the Packaged circle in the admin app did not toggle state (no confirmation, no change).
FUL policy OBSERVATION A future-slot order (slots Oct 30) was deliverable today (Oct 18) with no guard.
FUL-03..16 NOT RUN Item-level packaging, verification, partial delivery, rebalances, permissions, concurrency not exercised.

18. Order edits / rebalance (order-edits-rebalance.md) & Delivery ops (delivery-operations.md)

NOT RUN — rebalanceSlots, item repricing, address-coordinate edits, delivery-sequence ordering/maps and location-permission flows were not exercised (no split-group fixtures; and the admin app's location calls may be unreliable in Expo Go — expo-location SDK skew noted in the guidelines).

19. Complaints (complaints.md, 16 cases)

Case Status Evidence
COMPLAINT-01 PASS U1 raised a complaint on own order 2562 → 200 (complaint 106, region 1).
COMPLAINT-02 FAIL (P0) U2 raised a complaint against U1's order 2562 → 200 (complaint 107, userId:1327, same orderId) — no ownership check on the referenced order.
COMPLAINT-03 PASS Admin list (region 1) shows both complaints with user/order/status.
COMPLAINT-04 PASS Admin resolve {complaintId,responseText} → 200.
COMPLAINT-05 PASS staffB resolving a region-1 complaint → 400.
COMPLAINT-06..16 NOT RUN Images, incident linkage, notification on resolve, pagination/filters, XSS rendering not exercised.

20. Customer operations & incidents (customer-management-incidents.md, 17 cases)

Case Status Evidence
CUSTOPS-01 PASS addUserIncident (user 1327, order 2562, score 1) → 200 (incident 16).
CUSTOPS-02 PASS getUserIncidents {userId:1327} → 1 incident with order status.
CUSTOPS-03 PASS Customer token addUserIncident → 401.
CUSTOPS-04 FAIL (P0) Suspension is not enforced: with U2 suspended, user.user.getSelfData → 200 and a fresh login succeeded. Root cause: createContext sets user = decoded before the suspension check and the surrounding catch does not clear it. (Placement is still blocked — ORDER-06.)
CUSTOPS-05 (customer list) FAIL (SEC-28) Customer token can read the staff list (admin.staffUser.getStaff → 9 rows with roles/permissions) and can suspend any user via admin.user.updateUserSuspension.
CUSTOPS-06..17 NOT RUN Negativity scores, filters, suspension UI, notifications, pagination not exercised.

21. Notifications, uploads, jobs/health, staff, profile

Notifications (notifications.md, 19 cases) — SKIPPED (excluded by owner instruction, 2026-10-18)

The catalog was updated to mark this checklist excluded: all 19 cases are retained but reported as SKIPPED (not PASS/FAIL/NOT RUN). They require real push delivery to devices/recipients, which is out of scope for this harness. Notification cases were not executed.

The two observations recorded before this instruction took effect are privilege/authorization findings, not notification-delivery tests, and remain valid under the security checklist (SEC-28 / CUSTOPS-05): a customer token reaches admin.user.sendNotification, and the superadmin sender endpoint accepts the right principals. No real broadcast was ever sent (probes used userIds:[-1] → 0 recipients).

Case Status Evidence
PUSH-01 … PUSH-19 SKIPPED Excluded from the automated run (see docs/test-cases/notifications.md).

Uploads (uploads-images.md, 20 cases)

Case Status Evidence
UPLOAD-01 PASS common.generateUploadUrls {contextString:'review'} → signed R2 URL; customer/server contexts work.
UPLOAD-02 PASS Invalid contextString → 400 (zod enum).
UPLOAD-03 PASS Anonymous upload-url request → 401.
UPLOAD-04 PASS Staff product_info upload URL → 200.
UPLOAD-05 FAIL (minor) Arbitrary mime type (application/x-msdownload) accepted → signed URL issued (extension defaults to .jpg); no mime allowlist.
UPLOAD-06..20 NOT RUN Actual PUT, size limits, orphan cleanup, delete-on-replace, signed-URL expiry not exercised.

Jobs / health (jobs-health.md, 15 cases)

Case Status Evidence
JOB-01 PASS tRPC common.healthCheck → {status:'ok'}; REST /api/health → 200.
JOB-02 PASS Superadmin read paths reachable.
JOB-03..15 NOT RUN Cron flash toggle, queue consumers, retry/DLQ, cache jobs not exercised (no scheduler trigger).

Staff authentication (staff-authentication.md, 15 cases)

Case Status Evidence
SAUTH-01 PASS Wrong staff password / unknown staff → 401; wrong superadmin password → 401.
SAUTH-02 PASS Customer mobile used as staff name → 401 (no cross-identity session).
SAUTH-05 PASS (UI) Admin app cold start restored the staff session (e2eadminA · Mahabubnagar).
SAUTH-15 NOT RUN Admin-web reload identity/region regression not driven (no admin-web surface running).
SAUTH-03/04/06-14 NOT RUN Role/permission matrix, expiry, logout, password change not exercised.

Staff management (staff-management.md, 14 cases)

Case Status Evidence
STAFF-01 PASS Superadmin created staff id 13 in region 1.
STAFF-02 PASS roles → super_admin/admin/marketer/delivery_staff.
STAFF-03 PASS Duplicate name → 409; invalid role → 400; invalid region → 400.
STAFF-04 (reassign) PASS Region update applied to an existing session token (region 1→2).
STAFF-05 (remove) PASS Removed staff token → 401 on next call (SEC-07 resolved).
STAFF-06..14 NOT RUN Permission toggles, store/coupon ownership blocks, concurrent edits not exercised.

Profile / account lifecycle (profile-account-lifecycle.md, 16 cases)

Case Status Evidence
PROFILE-01 PASS updateProfile {name} persisted.
PROFILE-02 PASS updatePassword → new password works, old fails; short password → 400.
PROFILE-03 PASS deleteAccount with wrong mobile → 400; correct mobile → 200 and the account can no longer log in.
PROFILE-04..16 NOT RUN Suspension interplay, profile image, DOB/gender validation, session invalidation on delete not exercised.

24. Catalogue: stores, products, tags, groups, banners, reviews, vendor

Regional stores (regional-stores.md, 15)

Case Status Evidence
RSTORE-01/02 PASS Created regional store id 11 → visible in region 1 only (staffB list does not include it).
RSTORE-03 PASS Rename → 200.
RSTORE-04/SEC-03 PASS staffB updating the region-1 store → 404.
RSTORE-05..15 NOT RUN Image replace/delete, product assignment, delete-with-products guard (observed: delete of a store with soft-deleted products → 500 "still has products"), global-store interaction, parity cases.

Global stores (global-stores.md, 15)

Case Status Evidence
GSTORE-01 PASS Superadmin created global store id 12 (region-less); deleted successfully.
GSTORE-02..15 NOT RUN Elevation, image lifecycle, parity with regional screen, protected delete with global products.

Regional products (regional-products.md, 20)

Case Status Evidence
RPROD-01 PASS Created regional product id 156 (sku 157, price 123) under store 11.
RPROD-02 PASS (contract poor) SKU without a quantity feature → 500 (rejected).
RPROD-03 PASS Read-back returns the created product.
RPROD-04/SEC-03 PASS staffB reading the region-1 product → 404.
RPROD-05 PASS Update (name + price 130) → 200.
RPROD-06..20 NOT RUN Images, variants, increment step, combos across regions, delete protection, parity.

Global products (global-products.md, 21) — already tested in §STOCK

GP-03/04/06 PASS (SKU ids preserved, in-place suspension, market values untouched); GP-07 PASS (regional structural edit refused); GP-14 PASS (anon/customer/staff elevation refused). GP-01/02/05/08/09/10/11/12/13/15..21 NOT RUN.

Combos (combos.md, 16)

Case Status Evidence
COMBO-01 PASS Created a productType:'combo' product with a component sku → 200 (id 157).
COMBO-02..16 NOT RUN Component availability, combo-only flag, combo pricing, region policy.

Tags (product-tags-ordering.md, 16)

Case Status Evidence
TAG-01/02 PASS Created dashboard tag id 11 on a region-1 product → 200 and listed.
TAG-03 PASS Update tag → 200.
TAG-04..16 NOT RUN Ordering (tagsOrder), deletion, image upload, dashboard ordering, region parity. (Note: tagsOrder accepts garbage ids — CFG-17.)

Groups (product-groups.md, 14)

Case Status Evidence
GROUP-01/02 PASS Created group id 14 with product 30 → 200 and listed.
GROUP-03 PASS Delete group → 200.
GROUP-04..14 NOT RUN Slot snapshot/live membership policy, duplicates, parity.

Banners (banners.md, 14)

Case Status Evidence
BANNER-01/02 PASS Created banner id 14 (created inactive by default) → listed (n=5).
BANNER-03 PASS Update name + isActive:true → 200.
BANNER-04 PASS Delete → 200.
BANNER-05..14 NOT RUN Serial ordering, redirect URL validation, active/inactive customer visibility, image lifecycle.

Reviews (reviews.md, 12)

Case Status Evidence
REVIEW-01 PASS Customer review on product 24 (ratings 5) → 200 (review id 37).
REVIEW-02 PASS Admin getProductReviews returns reviews.
REVIEW-03..12 NOT RUN Ratings bounds, images, admin response, delete, legacy conditional coverage.

Vendor snippets (vendor-snippets.md, 15)

Case Status Evidence
VENDOR-01/02 PASS Created snippet (slot 2072, sku 24, permanent) → 200, listed (n=5).
VENDOR-03 PASS Delete → 200.
VENDOR-04..15 NOT RUN Slot/product scope validation, order packaging per snippet, expiry, parity.

25. Reserved coupons (reserved-coupons.md, 18 cases)

Case Status Evidence
RESERVED-01 PASS Regional admin created a reserved coupon (secret SECRET…, region 1).
RESERVED-02 PASS Customer redeemed the secret → personal coupon created (id 66, isUserBased:true, region 1).
RESERVED-03 PASS Second redemption of the same secret → 400 "Invalid or already redeemed".
RESERVED-04..18 NOT RUN Expiry-at-claim, wrong region/user, reserved→coupon field copy verification, usage limits, invalidation.

26. Coupon stacking & cart guards (coupon-stacking-and-cart-guards.md, 47 cases)

Only the core stacking behaviours were exercised (CPA-09/10/12/repeat): sequential application in selection order (70 vs 68), exclusive-combination rejection, duplicate-id dedupe, and the aggregate cap on a single coupon. CSQ-01..47 otherwise NOT RUN — overlapping-target split slots, negative sub-order guards, multi-coupon caps across sub-orders and cart-guard edge cases need multi-item/multi-slot fixtures that are unavailable with a single active slot.

27. Cache publication (cache-publication.md, 23 cases)

Case Status Evidence
CACHE-01 PASS After a price write, region-1 availability_version_num advanced 22→23 (and products stayed 7 — no regression); values read back through essentialConsts.
CACHE-02 PASS https://assets2.freshyo.in/api-cache-dev/regions/1/v-7/products.json → 200.
CACHE-03 PASS Region-1 product cache contains 149 entries (matches the admin region-1 product list).
CACHE-04..23 NOT RUN Bounded publication deadline, region isolation of regeneration (CACHE-23/JOB-15), global regeneration narrowing, KV/DB convergence after edits, force-failure paths.

28. Legacy / OTP / recovery / delivery

Checklist Status Note
Fallback & legacy pages (14) NOT RUN Legacy web routes/parity not driven (no legacy surface running). /api/v1/cm/* correctly requires auth (SEC-26).
OTP authentication (15) N/A (POLICY) Excluded from the default password suite; no real SMS/OTP was triggered. user.auth.sendOtp/verifyOtp exist but were not exercised.
Recovery/platform/accessibility (22) NOT RUN Permission-denied, offline recovery, accessibility, RTL, low-end device cases not exercised.
Delivery operations (14) NOT RUN See §18.
Order edits/rebalance (18) NOT RUN See §18.

29. Continued run — phase 2 (fixtures built, blocked families executed)

After the first pass I built the fixtures that were missing and re-ran the blocked families. The earlier summary was superseded; the revised summary is at the end of this section.

29.1 Fixtures created (all disposable)

Fixture Value
Region-1 slots S1 = 2076 (5 Nov, 7–8 PM), S2 = 2077 (6 Nov, 7–8 PM), both active and offering every region-1 SKU (163 SKUs)
Region-2 slot Bslot = 2078 (7 Nov), offering the 4 region-2/global SKUs
OOS product id 160 / sku 162
Regionally-suspended product id 161 / sku 163
Soft-deleted product id 162 / sku 164
Flash-available product id 163 / sku 165 (flashPrice 55)
Region-2-only store/product store 13, product 172 (E2E BSecret…, sku) — not elevated
Global product, 2 SKUs id 159 (skus 160, 161), store 1
U1 bound-2 address id 898 (16.778, 77.998 → bound 2)
Exact-price fixtures P1000/P999/P900/P450 (created + deleted per script)

29.2 Coupon stacking & cart guards (coupon-stacking-and-cart-guards.md, 47)

Case Status Evidence
CSQ-01 PASS 10% then flat ₹100 on ₹1000 → disc 200, payable 800.
CSQ-02 PASS flat ₹100 then 10% → disc 190, payable 810 (order changes result).
CSQ-03 PASS 15% of ₹999 → disc 150 (integer, Math.round).
CSQ-04 PASS 10% then 20% on ₹1000 → 100 + 180 = 280, payable 720 (second on reduced base).
CSQ-05 PASS flat ₹100 then 50%/cap ₹100 → disc 200 (cap on its own reduced base).
CSQ-06 PASS flat ₹1000 on ₹450 → clamped to 450, total ₹20 (fee), never negative.
CSQ-07 PASS targeted sku130 (10%) then whole-cart flat ₹100 on ₹329 → 30 + 100 = 130.
CSQ-08 PASS two overlapping targeted 10% on ₹300 → 30 then 27 = 57.
CSQ-09 PASS 2-slot cart with one coupon → sub-orders sum to goods − discount + fee; fee charged once.
CSQ-10 PASS preview = persisted order = order detail (total 800, disc 200).
CSQ-11 PASS 150% coupon → goods clamped to 0, delivery still added, total ₹20 (no negative).
CSQ-12 PASS single 10% on ₹1000 → disc 100.
CSQ-13 PASS exclusive alone 200; exclusive + other → rejected.
CSQ-14 PASS flat ₹149.5 → rounded to 150.
CLS-04 PASS isFirstOrder returned by getEligible; first-order coupon rejected on the 2nd order (CPA-20).
CLS-07 PASS expired coupon absent from getEligible.
CLS-08 PASS invalidated coupon absent (CPM-16).
CLS-09 PASS usage-limit-reached coupon absent (CPA-18).
CLS-10 PASS U1-only personal coupon not listed for U2 / not redeemable by U2 (CPA-04).
CDIS-01 PASS (UI) Cart row reads Products discount (₹4).
CDIS-02/03, CLS-01/02/03/05/06/11/12/13/14/15, CGRD-01..09, USR-01..06 NOT RUN UI dropdown ordering/disabled reasons, cart-guard banner, and the create-user script were not exercised. (Server-side equivalents of CGRD-03 and CDIS-01 were verified: closed-slot rejection and the discount row.)

29.3 Orders / checkout / cancellation with real split groups

Case Status Evidence
ORDER-02 PASS items in S1+S2 → 2 sub-orders, shared orderGroupId, per-item slot ids preserved.
ORDER-09 PASS limit 3 → cursor 2600 → next page, no overlap, stable ordering.
ORDER-18 PASS multi-item identical-subtotal cart preserved across sub-orders.
ORDER-19 PASS three concurrent getOrderById → identical totals.
ORDER-08 PASS U1 order with region-2 address + region-2 SKU + B slot → regionId:2, total 131.
CHECK-13 PASS success references a valid group; delivery charged once (fees=[0,0]).
CHECK-17/21 PASS client regionId ignored; address coordinates decide region.
CANCEL-06 PASS cancel primary of a split group → sibling intact; coupon still consumed.
CANCEL-07/08 PASS after cancelling all siblings the coupon became re-eligible (usage restored once).
CANCEL-05 PASS staffB cancelling a region-1 order → 404; order untouched.
CANCEL-04 FAIL (re-confirmed) customer can cancel an already-customer-cancelled order once more and the stored reason is overwritten; admin path correctly returns 400 "already cancelled".
ORDER-16 FAIL (characterization) two concurrent identical submits → two orders (server idempotency deferred).
ORDER-03/04/10/11/13/14/15/17/20, CHECK-03/04/06/11/12/14/15/16/18/19 NOT RUN
CANCEL-09/10/11/12/13/14/15/16/17/18 NOT RUN / PARTIAL

29.4 Order edits, rebalance & delivery operations

Case Status Evidence
EDIT-01 PASS admin.order.rebalanceSlots {slotIds:[S1,S2]} → 200, 25 orders updated.
EDIT-02 PASS removeDeliveryCharge {orderId} → 200, customer view fee 20 → 0.
EDIT-03 PASS updateAddressCoords persisted new lat/lng.
EDIT-04..18 NOT RUN Item-level repricing, split rebalance edge cases, address-coordinate guards.
DELIV-01 PASS getSlotOrders {slotId:"2076"} → 200, 20 orders for the slot.
DELIV-02 PASS getDeliverySequence/updateDeliverySequence round-trip ([2602]).
DELIV-03..14 NOT RUN Maps/sequence ordering UI, location permissions, route optimisation.

29.5 Prices, stock & suspension

Case Status Evidence
STOCK-01 PASS single-SKU price by skuId (30: 17 → 17.5), sibling untouched.
STOCK-02 PASS bulk 2 SKUs persisted; untouched SKU unchanged (235).
STOCK-03/GP-08 PASS global SKU market price edited in A (150→157 in B only when B edits); A unchanged when B edits.
STOCK-04 PASS mixed A+B batch → 400 Invalid SKU IDs: 159.
STOCK-05 PASS variant OOS → only that variant; server blocks the OOS SKU order; restore works.
STOCK-06/09 PASS global isSuspended on a regional SKU → order 400; kill-switch respected.
STOCK-07/08 FAIL (P0/P1) admin.product.updateProduct {skus[].isSuspendedInRegion:true} returns 200 but does not persist (isSuspendedInRegion stays false on read-back) → regional suspension cannot be set; a "regionally suspended" item is still orderable.
STOCK-10 PASS offer flag set in A only; B unchanged.
STOCK-11 INFO flashPrice:0/marketPrice:0 accepted and served as 0.
STOCK-12 FAIL negative (−5) and 1e308 prices accepted and served.
STOCK-13 PASS/INFO empty batch → 400; duplicate skuId in a batch → last wins.
STOCK-15 FAIL price update on a soft-deleted SKU → 200 (obsolete target not rejected).
STOCK-17 PASS price changed while "cart open" → order uses the current price (₹255 → ₹265).
STOCK-16/18/19/20 NOT RUN
SEC-16 PASS rejected mixed batch applied no partial write (sku29 unchanged).

29.6 Global products (elevation & market seeding)

Case Status Evidence
GP-01/02 PASS one structural global product with 2 SKUs; A and B each see their own market row (independent prices/flags).
GP-03 PASS superadmin structural update preserves SKU ids (no duplicates).
GP-04 PASS in-place global suspension edit — same SKU, no duplicate row.
GP-05 PASS adding a third SKU → 3 SKUs, existing overrides kept.
GP-06 PASS structural save left A/B market values untouched.
GP-07 PASS regional admin structural edit of a global product → 400; name unchanged.
GP-11 PASS global product pointed at a regional store → 500 "A global product must use a global store".
GP-12 PASS superadmin.products.elevate of the region-2 product → 200, SKU id preserved, regionId:null.
GP-13 PASS elevate already-global / missing / foreign-store → all 400.
GP-14 PASS anon/customer/staff elevation → 401.
GP-17 PASS update with a missing product id → 404.
GP-09/10/15/16/18/19/20/21 NOT RUN New-region seeding after global exists, missing market row, tag/group associations, soft-delete with orders, concurrency, failure injection, UI draft bleed.

29.7 Cache publication

Case Status Evidence
CACHE-04 PASS after a price write, region A availability_version_num 43→44; region B unchanged (9).
CACHE-23/JOB-15 PASS a region-A cache request did not advance region B's version.
CACHE-05 / CUSTOMER-17 PASS region-A products.json (158 items) contains no region-2-only SKU.
CACHE-06 PASS (INFO) region-B products.json (4 items) contains no A-only SKU.
CACHE-07/08 PASS slots cache …/regions/1/slots/v-22/slots.json → 200; availability …/av-44/availability.json → 200. Product cache needs the apiCacheKey segment; slots/availability do not.
CACHE-09..22 NOT RUN Bounded publication deadline, KV/DB convergence, force-failure paths, tag/const-affecting regeneration.

29.8 Coupon application & management (remainder)

Case Status Evidence
CPA-05 PASS 50% targeted sku24 in a ₹235+₹300 cart → disc 118 (only the target line).
CPA-08 PASS target ₹29 exactly at minOrder → disc 3.
CPA-14 PASS overlapping targeted coupons on a split order → no negative sub-order; discs 156/162.
CPA-15 PASS two flat ₹900 on ₹235 → disc clamped to 235, total ₹20.
CPA-16 PASS coupon targeting only OOS/suspended SKUs → no eligible target, rejected.
CPA-18 PASS maxLimitForUser:1 → 2nd order rejected and the coupon leaves getEligible.
CPA-19 PASS concurrent one-use coupon → one 200 + one rejection (no overuse).
CPA-20 PASS first-order coupon works on order 1, rejected on order 2.
CPA-22 PASS stored discount unchanged after the coupon is edited.
CPA-24 PASS expired coupon rejected at spend and hidden from the list.
CPA-25 FAIL (minor) getEligible {regionId: 99999} → 200 with the full coupon list (no region validation); -1 → 400.
CPA-28 PASS targeted minOrder 400: qty 2 accepted, qty 1 rejected.
CPA-02/11/23/26/27 NOT RUN
CPM-05 PASS multi-code batch created 2 coupons.
CPM-07 PASS duplicate code → rejected.
CPM-12 PASS clearing skuIds on edit → whole-cart.
CPM-13 INFO maxValue:0/minOrder:0 accepted; order still discounted.
CPM-14 INFO past and future validTill both accepted at creation; eligibility enforced at spend.
CPM-16 PASS invalidating a used coupon blocks new spend; the old order's discount is unchanged.
CPM-18 PASS concurrent duplicate create → one 200, one rejection.
CPM-19/20 NOT RUN Audit attribution / picker UI.
RESERVED-04 PASS expired reserved secret → rejected at claim.
RESERVED-05 PASS invalid secret → 400.
RESERVED-06 PASS redeemed coupon copies fields (20% / minOrder 100 / user-based / region 1).
RESERVED-07 PASS the reserved secret is not visible to another user.
RESERVED-08..18 NOT RUN

29.9 Products with availability states (cart guard / OOS)

Case Status Evidence
CART-08 (OOS) PASS ordering the OOS SKU → 400 "Product … is unavailable".
CART-08 (soft-deleted) PASS ordering the soft-deleted SKU → 400.
CART-08 (regionally suspended) FAIL the regionally-suspended SKU was orderable (root cause: STOCK-07/08 persistence bug).
CACHE/CATALOG isolation PASS UI search for a region-2-only product while browsing region 1 → "No products found" — CUSTOMER-17 not reproduced.

29.10 Flash delivery (enabled path)

Case Status Evidence
FLASH-02 PASS enabling isFlashDeliveryEnabled on bound 1 → served true, flash fee ₹69.
FLASH-03 PASS flash order with slotId:null → 200, total 124 (80 goods + 69 flash fee).
FLASH-04 FAIL a non-flash-available SKU was accepted into a flash order (no per-item flash validation).
FLASH-05 INFO flash with a scheduled slot still succeeds.
FLASH-06/07/08 PASS (UI) Flash tab available ("Delivery in within 1 hour"); add shows the pink flash cart (₹233, "₹267 more for FREE Delivery" = ₹500 flash threshold), separate from the blue regular cart.
FLASH-09..16 NOT RUN Flash cron toggle, flash pricing per item, flash cart checkout, capacity.

29.11 Complaints, customer ops, uploads, staff, profile (remainder)

Case Status Evidence
COMPLAINT-06 PASS complaint with imageUrls → 200.
COMPLAINT-07 PASS complaint with no orderId → 200.
COMPLAINT-08 PASS empty body → 400.
COMPLAINT-09 PASS paginated admin list (limit 3 → cursor 108 → no overlap).
COMPLAINT-10 FAIL resolving an already-resolved complaint → 200 and the stored response is overwritten.
COMPLAINT-11 INFO <script> body stored verbatim (rendering escaping is a UI concern).
CUSTOPS-08 PASS getUserDetails returns user + orders.
CUSTOPS-09 FAIL suspending a non-existent user id → 200 "User suspended successfully" (row created for a ghost user).
CUSTOPS-07 PASS incident with an unknown orderId rejected (500).
NOTIF-* SKIPPED see §21.
UPLOAD-06 PASS real PUT to the signed R2 URL → 200.
UPLOAD-07 INFO GET of the PUT-only signed URL → 403.
SAUTH-03 PASS superadmin.staff.roles lists 4 roles.
SAUTH-04 PASS staff created with super_admin role name still cannot call superadmin procedures (401).
STAFF-06 PASS deleting a staff member who created coupons → 409 with a clear reason.
PROFILE-04 PASS invalid email → 400.
PROFILE-05 PASS setting an already-registered email → 409.
PROFILE-06 PASS dateOfBirth/gender/occupation/bio persisted and returned.
PROFILE-07 PASS short mobile → 400.
UPLOAD-08..20, JOB-03..15, SAUTH-05..14, STAFF-07..14, PROFILE-08..16 NOT RUN

29.12 Revised summary

855 catalogued · 34 SKIPPED (OTP 15 + notifications 19) · 349 executed · 472 not run.

Checklist Cases PASS FAIL PARTIAL/BLOCKED N/A SKIPPED NOT RUN
authorization-api-contracts 28 12 7 5 0 0 4
customer-authentication 18 11 4 1 1 0 1
regions 16 8 2 4 0 0 2
bounds 18 8 1 2 0 0 7
constants-configuration 18 10 3 2 0 0 3
location-region-switching 25 8 0 0 0 0 17
addresses 25 12 3 2 0 0 8
cart 23 4 2 1 0 0 16
scheduled-slots 20 5 0 0 0 0 15
checkout 22 10 1 0 0 0 11
pricing-delivery-fees 22 7 0 0 0 0 15
flash-delivery 16 6 1 0 0 0 9
coupon-management 21 13 4 1 0 0 3
coupon-application 28 21 1 0 0 0 6
coupon-stacking-and-cart-guards 47 15 0 3 0 0 29
reserved-coupons 18 7 0 0 0 0 11
orders 22 11 2 1 1 0 7
cancellation 18 7 2 1 0 0 8
fulfillment 16 3 0 1 0 0 12
order-edits-rebalance 18 3 0 0 0 0 15
delivery-operations 14 2 0 0 0 0 12
complaints 16 7 2 0 0 0 7
customer-management-incidents 17 5 3 0 0 0 9
notifications 19 0 0 0 0 19 0
uploads-images 20 5 1 0 0 0 14
jobs-health 15 2 0 0 0 0 13
staff-authentication 15 5 0 0 0 0 10
staff-management 14 6 0 0 0 0 8
profile-account-lifecycle 16 7 0 0 0 0 9
regional-stores 15 4 0 0 0 0 11
global-stores 15 1 0 0 0 0 14
regional-products 20 5 0 0 0 0 15
global-products 21 11 0 1 0 0 9
combos 16 1 0 0 0 0 15
catalog-search 18 2 0 0 0 0 16
product-tags-ordering 16 3 0 0 0 0 13
product-groups 14 3 0 0 0 0 11
banners 14 4 0 0 0 0 10
reviews 12 2 0 0 0 0 10
vendor-snippets 15 3 0 0 0 0 12
cache-publication 23 7 0 0 0 0 16
prices-stock-suspension 20 8 4 3 0 0 5
fallback-legacy-pages 14 0 0 0 0 0 14
otp-authentication 15 0 0 0 0 15 0
recovery-platform-accessibility 22 0 0 0 0 0 22

New defects from phase 2

  1. Regional product suspension cannot be set — admin.product.updateProduct {skus[].isSuspendedInRegion:true} returns 200 but does not persist; a "regionally suspended" item remains orderable (STOCK-07/08, CART-08).
  2. No per-item flash validation — a non-flash-available SKU is accepted into a flash order (FLASH-04).
  3. Double-tolerated mutations — resolving an already-resolved complaint (COMPLAINT-10) and customer-cancelling an already-cancelled order (CANCEL-04) overwrite the stored reason/response.
  4. Ghost-user suspension — admin.user.updateUserSuspension accepts a non-existent user id and reports success (CUSTOPS-09).
  5. Soft-deleted SKU still price-editable — no obsolete-target rejection (STOCK-15).
  6. Minor contract gaps — getEligible ignores an invalid regionId (CPA-25); maxValue:0 ignored; negative/1e308 prices accepted (STOCK-12).

30. Case-ID corrections (authoritative mapping)

While continuing I re-read the actual checklists and found that several provisional labels used in §8–§29 do not match the catalog's real case IDs (I had approximated some prefixes from memory). The substance/evidence in those sections is valid, but the label must be read through this table. Where a label is not listed, it was already correct.

Area / checklist Provisional label(s) used earlier Correct catalog ID(s) Status carried over
complaints.md (prefix SUPPORT-) COMPLAINT-01 raise-on-own-order SUPPORT-01 PASS
COMPLAINT-02 U2 files on U1 order SUPPORT-05 FAIL
COMPLAINT-03 admin list SUPPORT-11 (partial) PASS
COMPLAINT-04 resolve SUPPORT-03 PASS
COMPLAINT-05 B admin resolves SUPPORT-06 PASS
COMPLAINT-06 images / COMPLAINT-07 no order / COMPLAINT-08 empty / COMPLAINT-11 XSS SUPPORT-01 / SUPPORT-02 / SUPPORT-04 / SUPPORT-10 PASS / PASS / PASS / INFO
COMPLAINT-09 pagination SUPPORT-11 PASS
COMPLAINT-10 double resolve SUPPORT-10 FAIL
customer-management-incidents.md (prefix CUSTOMER-) CUSTOPS-01/02 incident add/list CUSTOMER-05 PASS
CUSTOPS-03 customer adds incident CUSTOMER-11 PASS
CUSTOPS-04 suspension not enforced CUSTOMER-03 (and CUSTOMER-04) FAIL
CUSTOPS-05 customer reads staff list / suspends CUSTOMER-11 / SEC-28 FAIL
CUSTOPS-07 incident on foreign order CUSTOMER-07 PASS
CUSTOPS-08 getUserDetails CUSTOMER-01 PASS
CUSTOPS-09 suspend unknown user CUSTOMER-06 FAIL
reserved-coupons.md (prefix RES-) RESERVED-01/02/03 RES-01 (partial: create+redeem), RES-02, RES-05 PASS
RESERVED-04 expired secret RES-05 PASS
RESERVED-05 invalid secret RES-04 PASS
RESERVED-06 field copy RES-08 PASS
RESERVED-07 secret not visible to others RES-17 PASS
delivery-operations.md (prefix DELIVERY-) DELIV-01 getSlotOrders DELIVERY-14 / DELIVERY-05 PASS
DELIV-02 get/update delivery sequence DELIVERY-01 PASS
DELIV-03 updateAddressCoords DELIVERY-02 PASS
order-edits-rebalance.md (prefix EDIT-) EDIT-01 rebalanceSlots EDIT-10 PASS
EDIT-02 removeDeliveryCharge EDIT-05 PASS
EDIT-03 updateAddressCoords DELIVERY-02 (not an EDIT case) PASS
EDIT-05 rebalance invalid slot EDIT-11 / EDIT-13 FAIL (200, "0 orders")
EDIT-06 rebalance empty array EDIT-16 (input guard) PASS
fulfillment.md (prefix FUL-) FUL-01/02 pack+deliver FUL-01 PASS (API)
FUL-03 pack one suborder FUL-01 / FUL-11 PASS
FUL-04/05/06 (phase-4 labels) FUL-03 (item-level verify), FUL-09 (repeat) see §31
scheduled-slots.md (prefix SLOT-) SLOT-01/03 list offers only future SLOT-01 (create) / SLOT-18 (expired not offered) PASS
SLOT-04 inactive hidden SLOT-03 PASS
SLOT-07 capacity full SLOT-05 PASS
SLOT-09 activate SLOT-02 PASS
SLOT-10 update missing SLOT-02 (error path) PASS
pricing-delivery-fees.md (prefix MONEY-) MONEY-01 threshold ₹235/₹300/₹600 MONEY-01 (T boundary) PASS
phase-4 MONEY-02/03 T±0.01 MONEY-01 PASS
CHECK-14 zero total MONEY-18 INFO (unreachable)
flash-delivery.md (prefix FLASH-) flash order enabled FLASH-01 PASS
flash blocked when disabled FLASH-02 PASS
non-flash SKU accepted in flash cart FLASH-03 FAIL
flash + scheduled slot FLASH-08 INFO
separate flash cart (UI) FLASH-07 PASS
uploads-images.md (prefix UPLOAD-) signed URL / invalid context / anon / exe MIME / PUT / GET UPLOAD-01 / UPLOAD-04 / UPLOAD-04 / UPLOAD-03 / UPLOAD-01 / UPLOAD-05 PASS / PASS / PASS / FAIL / PASS / INFO
jobs-health.md (prefix JOB-) JOB-01 healthCheck JOB-11 PASS
JOB-02 /api/seed JOB-01 PASS
staff-authentication.md (prefix SAUTH-) SAUTH-01 wrong password SAUTH-04 PASS
SAUTH-02 cross-identity SAUTH-05 PASS
SAUTH-04 superadmin login / staff→superadmin 401 SAUTH-02 / SAUTH-05 PASS
SAUTH-03 roles list STAFF-13 (not SAUTH) PASS
staff-management.md (prefix STAFF-) STAFF-01..05 create/roles/dup/reassign/remove STAFF-01 / STAFF-13 / STAFF-05+06 / STAFF-03 / STAFF-04 PASS
STAFF-06 delete blocked by coupons STAFF-10 PASS
STAFF-07 staff list STAFF-14 INFO
profile-account-lifecycle.md (prefix PROFILE-) PROFILE-01 rename PROFILE-01 PASS
PROFILE-02 password change PROFILE-03 PASS
PROFILE-03 delete account PROFILE-09 / PROFILE-10 PASS
PROFILE-04 invalid email / PROFILE-05 duplicate email / PROFILE-07 short mobile PROFILE-06 PASS
PROFILE-08 profile image PROFILE-02 PASS
regional-stores.md (prefix STORE-) RSTORE-01/02/03/04 STORE-01 / STORE-04 / STORE-02 / STORE-04 PASS
RSTORE-05 delete with products STORE-08 PASS
RSTORE-06 regional edit of global store STORE-04 / GSTORE-03 / GSTORE-15 PASS
regional-products.md (prefix PROD-) RPROD-01..06 PROD-01 / PROD-07 / PROD-02 / PROD-10 / PROD-02 / PROD-01 PASS
combos.md COMBO-01 create COMBO-01 PASS
COMBO-02 (phase-4 label) unknown component COMBO-06 PASS
product-tags-ordering.md TAG-01/02/03 create/list/update TAG-01 / TAG-01 / TAG-02 PASS
TAG-04 (phase-4 label) related stores TAG-01 PASS
product-groups.md GROUP-01/02/03 create/list/delete GROUP-01 / GROUP-01 / GROUP-09 PASS
GROUP-04 (phase-4 label) unknown product GROUP-06 PASS
banners.md BANNER-01..04 create/list/update/delete BANNER-01 / BANNER-01 / BANNER-03 / BANNER-08 PASS
BANNER-05 redirect+skuIds BANNER-01 / BANNER-11 INFO
BANNER-06 (phase-4 label) invalid URL BANNER-05 PASS
reviews.md REVIEW-01/02 create/respond REVIEW-01 / REVIEW-02 PASS
REVIEW-03/04 (phase-4 labels) rating range / response REVIEW-03 / REVIEW-02 PASS
vendor-snippets.md VENDOR-01/02/03 create/list/delete VENDOR-01 / VENDOR-02 / VENDOR-14 PASS
VENDOR-04 (phase-4) unknown slot VENDOR-04 PASS
VENDOR-05 (phase-4) foreign SKU VENDOR-06 PASS
catalog-search.md (prefix CAT-) CUSTOMER-17 foreign-region search CAT-05 (README's defect ref) PASS — not reproduced
cache-publication.md CACHE-01/02/03 (phase-1) version bump after price write CACHE-03 PASS
CACHE-04/23 (phase-3) A bump, B unchanged CACHE-23 / CACHE-06 PASS
CACHE-05/06 (phase-3) no foreign SKU in cache CACHE-21 / CACHE-10 PASS
CACHE-07/08 (phase-3) slots/availability files CACHE-01 / CACHE-04 PASS

Not affected: SEC-*, AUTH-*, REGION-*, BOUND-*, CFG-*, LOC-*, ADDR-*, CART-*, CHECK-*, CPM-*, CPA-*, CSQ-*/CLS-*/CDIS-*/CGRD-*/USR-*, ORDER-*, CANCEL-*, STOCK-*, GP-*, NOTIF-*/PUSH-* (skipped).


31. Phase 3 — remaining families (correct case IDs)

31.1 Fulfilment (fulfillment.md)

Case Status Evidence
FUL-01 PASS (API) updatePackaged/updateDelivered on a 2-item order; customer deliveryStatus follows.
FUL-02 PASS item-level packaging on a 2-item order → that item isPackaged:true, isPackageVerified:false; sibling untouched.
FUL-03 PASS verification toggled independently after packaging.
FUL-05 PASS packing/delivering a cancelled order → 400 both.
FUL-06 PASS staffB packaging a region-1 item → 404.
FUL-07 PASS an item is only addressable by its own id; no cross-order association accepted.
FUL-08 PASS missing item id → 404.
FUL-09 INFO repeating the same packaging mutation → 200 (no conflict surfaced).
FUL-11 PASS delivering one split sibling leaves the other pending.
FUL-14 FAIL delivering an order whose product was soft-deleted → 400; a supported order could not be fulfilled without the live catalog row.
FUL-04/10/12/13/15/16 NOT RUN reversal, races, filters, offline, midnight, UI.

31.2 Order edits (order-edits-rebalance.md)

Case Status Evidence
EDIT-01 PASS customer notes via {id,userNotes} persist and are returned in the detail.
EDIT-02 PASS admin notes persist and are distinguishable.
EDIT-03 FAIL a delivered order's notes were still editable by the customer (200, applied); U2 editing U1 notes correctly 404.
EDIT-04 FAIL a 411-char unicode note was accepted (no approved length limit); empty string clears the note.
EDIT-05 PASS removeDeliveryCharge → fee 20 → 0; stored fee + payable updated together.
EDIT-06 PASS/INFO second remove → 200, fee stays 0, total never negative.
EDIT-07 PASS staffB removing a region-1 order fee → rejected.
EDIT-10 PASS rebalanceSlots on active slots → 200, orders updated.
EDIT-11/13 FAIL rebalance with an unknown slot id → 200 "Rebalanced 0 orders" (no validation); empty array → 400.
EDIT-09/12/14/15/16/17/18 NOT RUN No-rebalance price change, historical immutability, sub-discount floor (BLOCKED: POLICY), concurrency.

31.3 Delivery operations (delivery-operations.md)

Case Status Evidence
DELIVERY-01 PASS updateDeliverySequence/getDeliverySequence round-trip.
DELIVERY-02 PASS updateAddressCoords persists.
DELIVERY-04/05 FAIL a sequence accepts duplicate, unknown and foreign order ids (e.g. [2637,999999,2638,2637] → 200) and a sequence of only an unknown id.
DELIVERY-08 FAIL lat:200, lng:400 accepted (200) — no coordinate range validation.
DELIVERY-10 PASS (contract poor) customer → 500, staffB → 404.
DELIVERY-03/06/07/09/11/12/13/14 NOT RUN

31.4 Complaints (complaints.md, prefix SUPPORT-)

Case Status Evidence
SUPPORT-01 PASS own-order complaint with photo key.
SUPPORT-02 PASS general complaint without an order.
SUPPORT-03 PASS admin resolve with response.
SUPPORT-04 FAIL 5000-char unicode complaint accepted (no limit); empty body → 400 (pass).
SUPPORT-05 FAIL U2 can file against U1's order (complaint 107).
SUPPORT-06 PASS staffB resolving a region-1 complaint → rejected.
SUPPORT-07 PASS complaint referencing a missing order → rejected.
SUPPORT-08 INFO unclaimed image key accepted (storage only).
SUPPORT-09 INFO traversal/external image keys accepted as strings.
SUPPORT-10 FAIL resolving an already-resolved complaint overwrites the response.
SUPPORT-11 PASS pagination with cursor, no overlap.
SUPPORT-16 PASS anon resolve 401, customer resolve 500 (blocked).
SUPPORT-12/13/14/15 NOT RUN

31.5 Customer operations (customer-management-incidents.md, prefix CUSTOMER-)

Case Status Evidence
CUSTOMER-01 FAIL getUserDetails → 500 for a user with a large order history ("Failed query: select id from orders …"); other users 200.
CUSTOMER-02 PASS exact mobile search 1 hit; no-match 0.
CUSTOMER-03 PASS suspended user's placeOrder → 403.
CUSTOMER-04 PASS after unsuspend → 200.
CUSTOMER-05 PASS incident add/list.
CUSTOMER-06 FAIL suspending a non-existent user id → 200 success.
CUSTOMER-07 PASS incident with an unknown order id → rejected.
CUSTOMER-08 FAIL staffB (region 2) reads region-1 customer 388's details → 200 (cross-region leak).
CUSTOMER-11 PASS customer token cannot set suspension or incidents (401).
CUSTOMER-15 PASS adding an incident does not auto-suspend.
CUSTOMER-09/10/12/13/14/16/17 NOT RUN

31.6 Stores, products, combos, tags, groups, banners, reviews, vendor

Case Status Evidence
STORE-01 PASS create regional store with description.
STORE-02 PASS rename persisted.
STORE-04 PASS region-2 admin cannot read/edit the region-1 store.
STORE-06 PASS customer create → 401.
STORE-08 PASS delete store with products → refused.
STORE-09 INFO delete twice → 500 both (store retained).
STORE-10 FAIL store created with an unclaimed/invalid image key → 200.
STORE-13 INFO create without owner → 200.
STORE-07 FAIL a region-1 store accepted a region-2 product in its product list → 200.
STORE-03/05/11/12/14/15 NOT RUN
GSTORE-01 PASS global store create.
GSTORE-03 PASS regional admin edit of global store → 404.
GSTORE-04 PASS anon/customer superadmin CRUD → 401.
GSTORE-07 PASS empty name → 400.
GSTORE-08 PASS populated global store delete → refused; unused delete → 200.
GSTORE-02/05/06/09/10/11/12/13/14/15 NOT RUN (GSTORE-15 partial: the region-1 store edit rejection covers the image-deletion regression path).
PROD-01 PASS A product with 2 SKUs + quantity features.
PROD-02 PASS name/price edit.
PROD-03 PASS third variant added.
PROD-05 PASS delete product → no longer orderable.
PROD-06 PASS duplicate name rejected; reuse after soft-delete allowed.
PROD-07 PASS missing quantity feature → 400; missing store → 400.
PROD-08 PASS/PARTIAL negative price → 400; MRP below price accepted (INFO).
PROD-10 PASS staffB read/edit of an A product → 404.
PROD-11 FAIL update with a foreign SKU id → 200 and the foreign SKU was attached to the region-1 product (product 160 skus became [162,184]).
PROD-18 INFO delete then delete again → 200/200.
PROD-04/09/12/13/14/15/16/17/19/20 NOT RUN
COMBO-01 PASS combo with a component created and ordered (phase 1).
COMBO-06 PASS unknown component id rejected.
COMBO-07 FAIL self-referencing combo accepted (200).
COMBO-08 FAIL combo with no components accepted (200).
COMBO-05 INFO duplicate components accepted.
COMBO-02/03/04/09/10/11/12/13/14/15/16 NOT RUN
TAG-01/02 PASS dashboard tag create/list with products + related store.
TAG-03 INFO sortOrder persisted from the create payload.
TAG-06 FAIL tag created with a region-2 product → 200.
TAG-07/08 PASS unknown product id → rejected.
TAG-10 PASS delete tag with memberships → 200.
TAG-16 PASS anon/customer tag create → 401.
TAG-04/05/09/11/12/13/14/15 NOT RUN
GROUP-01/02/03 PASS create/list; delete unused group.
GROUP-05 FAIL group created with a region-2 product → 200.
GROUP-06 PASS unknown product id → rejected.
GROUP-10 FAIL deleting a group attached to an active slot → 200.
GROUP-04/07/08/11/12/13/14 NOT RUN
BANNER-01/03 PASS create inactive banner, edit + activate.
BANNER-04 PASS banner referencing a foreign SKU → rejected (500); anon create → 401.
BANNER-05 PASS invalid image URL → 400.
BANNER-11 FAIL javascript:alert(1) redirect accepted (no scheme validation).
BANNER-06 INFO duplicate banner names allowed.
BANNER-08 PASS delete banner → 200.
BANNER-02/07/09/10/12/13/14 NOT RUN
REVIEW-01/02 PASS customer review + admin response.
REVIEW-03 PASS ratings outside 1–5 rejected.
REVIEW-06 PASS staffB responding to a region-1 review → rejected.
REVIEW-07 PASS review on unknown product → 404.
REVIEW-05/10 INFO U2 reads reviews (200); HTML/script body stored verbatim.
REVIEW-04/08/09/11/12 NOT RUN
VENDOR-01 PASS slot-specific snippet for P only.
VENDOR-02 PASS list snippets.
VENDOR-04 PASS unknown snippet code / unknown slot → rejected.
VENDOR-06 PASS snippet with a foreign SKU → rejected.
VENDOR-11 PASS permanent snippet without a slot → rejected.
VENDOR-12 PASS anon vendor/admin read → 401.
VENDOR-14 PASS delete snippet → 200.
VENDOR-03/05/07/08/09/10/13/15 NOT RUN

31.7 Pricing, checkout, slots, flash, cache, jobs, auth/staff/profile

Case Status Evidence
MONEY-03 PASS 10% on ₹235 with paid delivery → disc 24, fee 20, total 231.
MONEY-04 PASS flat ₹300 on ₹235 → clamped to 235, total = fee 20.
MONEY-05 PASS 10% cap ₹20 on ₹300 → 20.
MONEY-07 PASS unequal two-slot cart → delivery charged once ([0,0]).
MONEY-12 PASS two ₹100-targeted coupons on ₹100 A + unrelated B → sub-totals 35/300, no negative.
MONEY-13 PASS ₹116 goods, two flat ₹80 → disc 116, total = fee.
MONEY-16 PASS client-supplied totalAmount:1/discountAmount:9999 ignored (server 255).
MONEY-21 PASS remove fee on one split sibling affects only that sibling.
MONEY-06/08/18 INFO Free-delivery threshold is evaluated on the discounted subtotal (fee still charged when goods ≥ T but discounted < T); totals never reach 0.
MONEY-01 PASS T−0.01 (299.99) → fee ₹20; T+0.01 (300.01) → fee ₹0.
MONEY-02/09/10/11/14/15/17/19/20/22 NOT RUN
CHECK-15 PASS selected-but-ineligible coupon → rejected.
CHECK-16 PASS tampered session at submit → 401.
CHECK-18 PASS mixed valid + invalid item → 400.
CHECK-06 PASS empty cart submit → rejected.
CHECK-13 PASS split success sums server totals; fee once.
CHECK-14 N/A (see MONEY-18) zero total unreachable while a fee is due.
CHECK-03/04/11/12/19 NOT RUN
SLOT-01/02/03/05/08/13/20 PASS create/edit; past + null-slot rejected; capacity-full rejected; past slot rejected from order; auth enforced.
SLOT-12 FAIL an A slot accepted a region-2 SKU (skuIds:[175] → 200).
SLOT-11/17 INFO duplicate skuIds accepted; an empty slot is not offered to customers.
SLOT-04/06/07/09/10/14/15/16/18/19 NOT RUN
FLASH-01 PASS enable flash → flash order with distinct fee ₹69.
FLASH-02 PASS disabled → 403 (and stale submit rejected).
FLASH-03 FAIL a non-flash-available SKU was accepted in a flash order.
FLASH-07 PASS (UI) separate flash cart (pink) from regular cart.
FLASH-08 FAIL a flash payload with a scheduled slot id was accepted.
FLASH-15 FAIL/INFO a flash order with a coupon → 400, so cancel-restores-coupon could not be exercised.
FLASH-04/05/06/09/10/11/12/13/14/16 NOT RUN
CACHE-02 PASS structural store change bumped the products version.
CACHE-05 PASS A/B products versions independent (17 vs 10).
CACHE-06/19 PASS concurrent writes advanced the version (46→48).
CACHE-08/22 PASS unknown bound → 404.
CACHE-10 PASS region-A and region-B cache files differ.
CACHE-21 PASS public products.json contains no secret/token/notes strings.
CACHE-01/03/04/23 PASS see §29.7.
CACHE-07/09/11/12/13/14/15/16/17/18/20 NOT RUN
JOB-01/11 PASS /api/seed and healthCheck respond; superadmin read paths reachable.
JOB-02/03/04/05/06/07/08/09/10/12/13/14/15 NOT RUN Cron/queue/scheduler cases need the --test-scheduled harness and a queue consumer run; not exercised.
SAUTH-02 PASS superadmin login.
SAUTH-04 PASS invalid/whitespace staff credentials → 401; wrong superadmin password → 401.
SAUTH-05 PASS customer token on staff routes → 401; staff token on superadmin routes → 401.
SAUTH-07 PASS tampered/expired staff JWT → 401.
SAUTH-01/03/06/08/09/10/11/12/13/14/15 NOT RUN (SAUTH-15 admin-web reload not driven — no admin-web surface.)
STAFF-01/03/04/05/06/08/10/13 PASS create, reassign, remove, duplicate/unknown role/region, auth, delete-guard by coupons, roles list.
STAFF-02/07/09/11/12/14 NOT RUN
PROFILE-01/02/03/06/09/10 PASS profile read/edit, password change, identifier uniqueness, delete + old-token rejection.
PROFILE-04/05/07/08/11/12/13/14/15/16 NOT RUN (PROFILE-07: U2 editing its own profile works — ownership boundary holds.)
CAT-05 PASS searching a region-2-only product while browsing region 1 → "No products found" (defect not reproduced).
CAT-01/03 PASS (UI) fresh session + exact/partial search.
CAT-02/04/06/07/08/09/10/11/12/13/14/15/16/17/18 NOT RUN

31.8 Final summary (round 2)

855 catalogued · 34 SKIPPED (OTP 15 + notifications 19) · 412 executed · 409 not run.

Checklist Cases PASS FAIL PARTIAL/INFO N/A SKIPPED NOT RUN
authorization-api-contracts 28 12 7 5 0 0 4
customer-authentication 18 11 4 1 1 0 1
regions 16 8 2 4 0 0 2
bounds 18 8 1 2 0 0 7
constants-configuration 18 10 3 2 0 0 3
location-region-switching 25 8 0 0 0 0 17
addresses 25 12 3 2 0 0 8
cart 23 4 2 2 0 0 15
scheduled-slots 20 7 1 2 0 0 10
checkout 22 13 1 0 0 0 8
pricing-delivery-fees 22 15 0 3 0 0 4
flash-delivery 16 3 3 0 0 0 10
coupon-management 21 13 4 1 0 0 3
coupon-application 28 21 1 0 0 0 6
coupon-stacking-and-cart-guards 47 15 0 3 0 0 29
reserved-coupons 18 7 0 0 0 0 11
orders 22 11 2 1 1 0 7
cancellation 18 7 2 1 0 0 8
fulfillment 16 9 1 1 0 0 5
order-edits-rebalance 18 4 2 0 0 0 12
delivery-operations 14 4 1 2 0 0 7
complaints 16 8 3 2 0 0 3
customer-management-incidents 17 8 3 0 0 0 6
notifications 19 0 0 0 0 19 0
uploads-images 20 5 1 0 0 0 14
jobs-health 15 2 0 0 0 0 13
staff-authentication 15 5 0 0 0 0 10
staff-management 14 8 0 0 0 0 6
profile-account-lifecycle 16 6 0 0 0 0 10
regional-stores 15 5 2 1 0 0 7
global-stores 15 6 0 0 0 0 9
regional-products 20 8 1 1 0 0 10
global-products 21 11 0 1 0 0 9
combos 16 2 2 1 0 0 11
catalog-search 18 3 0 0 0 0 15
product-tags-ordering 16 5 1 1 0 0 9
product-groups 14 3 2 0 0 0 9
banners 14 5 1 1 0 0 7
reviews 12 5 0 2 0 0 5
vendor-snippets 15 7 0 1 0 0 7
cache-publication 23 10 0 0 0 0 13
prices-stock-suspension 20 8 4 3 0 0 5
fallback-legacy-pages 14 0 0 0 0 0 14
otp-authentication 15 0 0 0 0 15 0
recovery-platform-accessibility 22 0 0 0 0 0 22

Defects added in phase 3

  1. Cross-region data leakage in admin APIs — staffB reads a region-1 customer's details (CUSTOMER-08, 200); and region-1 objects accept region-2 SKUs/products in slots (SLOT-12), tags (TAG-06), groups (GROUP-05), stores (STORE-07) and product updates (PROD-11, which attached the foreign SKU to a region-1 product).
  2. getUserDetails 500 on a large order history (CUSTOMER-01).
  3. No coordinate validation for delivery coordinates (DELIVERY-08: lat 200, lng 400 accepted) and no validation of delivery-sequence ids (DELIVERY-04/05).
  4. javascript: banner destination accepted (BANNER-11).
  5. Combo integrity — self-referencing (COMBO-07) and empty-component (COMBO-08) combos accepted.
  6. Group delete ignores active slot attachment (GROUP-10).
  7. Store accepts an unclaimed/invalid image key (STORE-10).
  8. Delivered orders remain editable by the customer (EDIT-03) and notes have no length limit (EDIT-04).
  9. Fulfilment blocked by a soft-deleted product (FUL-14).
  10. Flash — scheduled slot ids accepted in flash payloads (FLASH-08); coupons rejected on flash orders (FLASH-15).
  11. Unbounded text — complaint body (5000 chars) and order notes (411 chars) have no length limits (SUPPORT-04, EDIT-04).

32. Phase 4 — on-device location / region / catalog (customer app, Expo Go)

Method: granted/revoked the simulator location permission with xcrun simctl privacy, moved the simulator GPS with xcrun simctl location, cold-started the app, and drove the resulting screens with Maestro.

Case Status Evidence
LOC-02 / LOC-22 / UX-07 PASS With location revoked, a cold start shows a dedicated Delivery Address gate: "Location access is not granted. Allow location access for accurate delivery, or add a delivery address below." plus an "Open location settings" action and the saved-address chooser.
LOC-19(c) / LOC-25 PASS With location unavailable, the saved default address (Shafi · Mbnr, Mahabubnagar) supplies the region; the chooser is usable.
LOC-20 PASS Nothing is persisted — after re-granting location the region was re-derived and the storefront returned to region 1 (blue ₹300 free-delivery threshold).
LOC-01 PASS GPS (16.7489, 77.9856) at cold start → Mahabubnagar, catalog loads without login.
LOC-10 / ADDR-16 PASS A region-2 address (Jadcherla) present in the account was not auto-applied; the region-1 default remained the browsing region.
LOC-11 / ADDR-17 / LOC-06 PARTIAL / ATTENTION Selecting the foreign Jadcherla address from the Home "Deliver to" sheet switched the browsing region (and storefront stores) immediately, with no confirm/cancel dialog. CART-11's clear-on-switch could not be observed because the cart was empty. The confirm step required by the checklist was not seen on this path.
ADDR-02 / ADDR-04 PASS Exactly one Default badge in the address list; "Set as default" offered on the others.
CAT-01 / CAT-03 PASS (UI) Fresh session browse + exact/partial search in region 1.
CAT-05 PASS Foreign-region product search → "No products found".
Expo Go permission model OBSERVATION Expo Go raises a per-experience prompt ("You've already granted permission to another Expo experience. Allow … to also use it?"). This is an Expo Go artifact, not a product defect (guideline §6.5).

Net coverage after phases 3–4: 412 executed of 855 (34 SKIPPED, 409 not run). The remaining not-run set is dominated by UI/device-lifecycle work (recovery/accessibility 22, location 17, cart 15, catalog 15, fallback-legacy 14, coupon-stacking 29, uploads 14, jobs 13) plus queue/cron cases that need the --test-scheduled harness, and the UI-only coupon dropdown / cart-guard cases (CLS-01..15, CGRD-01..09) and the create-user script (blocked: bcryptjs is not installed for the Bun/tsx runners available in this environment).


33. Phase 5–8 — API remainder, corrections, and scope changes

33.1 Scope changes (per owner instruction, 2026-10-18)

  • Notifications — excluded; SKIPPED (19). notifications.md + README updated.
  • Queue / scheduled-job cases — excluded; SKIPPED (JOB-03…JOB-10, JOB-12…JOB-15 = 12). jobs-health.md + README updated (health/startup JOB-01/02/11 remain in scope). No --test-scheduled harness is used against the running dev server.
  • create-user script (USR-01…06) — BLOCKED: bcryptjs is not installed for any available Bun/tsx runner in this environment (bun run create-user and npx tsx both fail at module resolution). The equivalent user.auth.register path is covered by AUTH-02.

33.2 Corrections to phase-7 labels (my payload errors, not defects)

Label Was Corrected
COMBO-01 FAIL (400) PASS — a combo orders correctly once its SKU is in the slot (order 2682, ₹55).
COMBO-04 FAIL (400) PASS — one component reused by two combos (200/200).
COMBO-09 (bogus PASS) PASS — combo with an OOS component → 400 (slot/availability guard).
PROD-04 FAIL PASS — updateProduct with an empty SKU set → 400 (variant-removal guard); same-SKU round-trip → 200.
VENDOR-03 FAIL (400) PASS — {id, updates:{…}} wrapper; foreign SKU on update → rejected.
BANNER-07 FAIL (404) BLOCKED — banners are only exposed via the generated cache file (scaffoldBanners), not a public tRPC procedure.
CACHE-18 INFO (404) BLOCKED — no user.stores.getStoreWithProducts procedure; store detail is cache/UI-driven.
CAT-07 BLOCKED (404) INFO — availability file is at …/regions/<r>/av-<v>/availability.json (without the apiCacheKey segment). The OOS (162) and regionally-suspended (163) SKUs are still present in the file; only the soft-deleted (164) is absent. The client is expected to read the flag.

33.3 Results added in phases 7–8

Case Status Evidence
CACHE-07 PASS Three concurrent writes → availability version 55→57 and a fetchable final products file.
CACHE-17 PASS A soft-deleted SKU is absent from the next published products file.
CACHE-02 / CACHE-13 FAIL / OBSERVATION (P1) A product create did not bump products_version_num (20→20 after 30 s) and the new SKU was absent from the published file; a tag create likewise did not bump it (22→22 after 8 s). Structural product/tag changes are not published within any bounded window. (Caveat: publication may be cron-driven, which is excluded from this run — but the catalog's bounded-publication expectation is not met on the request path.)
UPLOAD-02 PASS 3-image URL batch, all PUTs 200.
UPLOAD-08 PASS/INFO Both an asset key and a full URL are accepted in a product image list.
UPLOAD-09 FAIL/PASS split Path traversal key (../../../etc/passwd) → 400 (PASS); an external https:// image URL → accepted (FAIL).
UPLOAD-10 INFO A 6 MB body and a corrupt body both PUT 200 under image/png (no type/size check at the storage layer).
UPLOAD-11 INFO Two concurrent PUTs to one signed key both 200 (last write wins).
UPLOAD-20 FAIL A batch containing an unsupported MIME (application/x-msdownload) still returned a signed URL.
UPLOAD-19 PASS Signed URL carries a signature, no raw secret/access key.
RES-03 PASS Concurrent U1/U2 claim of one reserved code → exactly one 200, one 400.
RES-06 PASS First-order-only reserved code claimed by an existing customer → 400 with a clear reason.
RES-11 PASS Anonymous redeem → 401.
RES-12 INFO A reserved batch containing a duplicate code → 500.
RES-13 INFO Cancel + my-coupons payload unchanged; no cancellation/refund coupon surfaced on the customer path (generation, if any, is admin/queue-side).
RES-14 PASS Generation against a missing order → 400.
COMBO-04/01/07/08/09 PASS / PASS / PASS / FAIL / PASS Reuse, ordering, skuId:0 rejected; a combo with no components is accepted (FAIL); OOS component blocks ordering.
PROD-04/02 PASS Empty SKU set rejected; same-SKU round-trip OK.
PROD-09 FAIL Unicode + 300-char product name accepted (no limit).
PROD-13 PASS Product with an unclaimed image key → 400.
PROD-16 PASS Concurrent same-name create → one 200, one 400.
PROD-19 PASS/INFO incrementStep change with existing orders → 200.
ORDER-13 PASS Order history renders the purchased item after the product is deleted.
STORE-03 PASS Empty store then attach a product.
STORE-05 FAIL Unicode + 300-char store name accepted; duplicate store name accepted.
GSTORE-02/05/06/15 PASS Metadata edit; global store with a global product; global product in a regional store refused; regional edit of a global store → 404.
GSTORE-14 INFO A global store may share a name with a regional store.
TAG-02 PASS Tag membership/name edit.
GROUP-02/03/08 PASS Group member edit; attach group to slot; membership edit after slot references it.
BANNER-09 PASS Invalid replacement image key → 400.
REVIEW-09 PASS Review pagination (limit/offset).
REVIEW-08 INFO Review with an unclaimed image key accepted.
VENDOR-03/06/09 PASS Snippet edit; foreign SKU on update rejected; empty SKU set rejected; past validTill accepted (INFO).
ORDER-11 PASS A newly placed order appears in the customer history immediately.
CANCEL-09 PASS Single non-group order cancel → cancelled.
CANCEL-13 PASS A catalog price change does not alter the stored charge on cancel (stored 300 preserved).
CANCEL-14 INFO cancellationFilter:'cancelled' → 200.
SLOT-06 PASS Capacity-full blocks (403); after reopening, retry succeeds.
SLOT-07 PASS A region-2 slot in a region-1 order → 409; a region-2 SKU in a region-1 slot → 409.
SLOT-09 FAIL A slot with freeze time after delivery time was accepted (200).
SLOT-10 PASS Invalid timestamps → rejected.
SLOT-14 PASS A deactivated slot disappears from the customer slot list.
SLOT-12 FAIL (re-confirmed) an A slot accepted a region-2 SKU.
FLASH-04 PASS Removing flash eligibility → the SKU is rejected from a flash order.
FLASH-05/06/09/14 INFO Flash with a coupon, flashPrice:0, A2-address flash fee, and flash history/filters either rejected (400) or returned no flash rows once flash was toggled between probes; the flash clock/schedule cases are queue-driven (excluded).
FLASH-08/15 FAIL Flash payload accepts a scheduled slot id; flash order with a coupon → 400.
MONEY-09 PASS Targeted coupon matching only the 2nd slot's SKU → discount lands on that sub-order (0 / 100).
MONEY-10 PASS Partially overlapping targets → sub-totals 153/262, no negative.
MONEY-11 PASS Two whole-cart flat ₹500 on ₹235 → clamped, total = fee.
MONEY-14 PASS/INFO qty 7 × ₹29 = ₹223 (fee 20).
MONEY-15/17/20/22 INFO A2-address fee, flash-capable SKU on a scheduled order, maxValue:0, and a 50-unit order all returned finite server totals.
SEC-08 PASS Regional structural edit of a global product did not change it.
SEC-17 INFO Repeat OOS toggle idempotent (200/200).
SEC-18 PASS Three concurrent redemptions of a one-use coupon → discount applied exactly once.
SEC-20 INFO <script> in a product name stored verbatim (rendering is a UI concern).
SEC-24/25 BLOCKED No rate-limit harness; JWTs have no server-side revocation.

33.4 Final summary (round 3)

855 catalogued · 46 SKIPPED (OTP 15 · notifications 19 · queue/scheduler jobs 12) · ~500 executed · ~309 not run.

Group Executed SKIPPED Not run
Security & identity (authorization, customer-auth, staff-auth, staff-management, profile) 76 0 38
Geography (regions, bounds, constants, location) 42 0 35
Catalogue (stores, global-stores, products, regional-products, global-products, prices-stock, combos) 79 0 60
Merchandising (catalog-search, tags, groups, banners) 20 0 42
Purchasing (slots, cart, addresses, checkout, pricing, flash) 99 0 61
Coupons (management, application, stacking/guards, reserved) 68 0 46
Order ops (orders, fulfillment, cancellation, edits, delivery) 63 0 42
Support (complaints, customer-ops) 31 0 13
Infrastructure (uploads, cache, jobs, recovery) 24 12 53
Conditional/legacy (vendor, reviews, fallback-legacy, otp) 18 15 20
Notifications (notifications) 0 19 0

Remaining not-run set (~309) is now almost entirely:

  • Device/UI lifecycle — recovery/accessibility (22), location (17), cart local-storage (15), catalog search/detail (15), coupon dropdown CLS-01…15 + cart-guard CGRD-01…09, checkout/orders navigation (≈20), SLOT-19, BANNER-02/13, GROUP-13, PROD-20, REVIEW-12, VENDOR-15, CAT-16, UX-*.
  • Cross-surface parity — fallback-ui and admin-web are not running (only web-ui :4174 and superadmin-ui :4176), so LEGACY-* (14) and admin-web reload cases (SAUTH-15) need those servers started.
  • Failure-injection — CACHE-09/11/12/14, PROD-17, STORE-12/15, GROUP-11/12, REVIEW-11, ORDER-14/15/17, CANCEL-11/15/16, SLOT-15/16, UPLOAD-12/13/17, LOC-13/15/16.
  • Policy-blocked — ORDER-22 (N/A), EDIT-14 (BLOCKED: POLICY).

Defects added in phases 5–8

  1. Structural changes are not published — product create and tag create did not bump products_version_num; the new SKU was missing from the published products file (CACHE-02/CACHE-13).
  2. Slot accepts freezeTime after deliveryTime (SLOT-09).
  3. Empty-component combo accepted (COMBO-08).
  4. External https:// image URL accepted in product images, and unsupported MIME still yields a signed upload URL (UPLOAD-09/UPLOAD-20); 6 MB/corrupt bodies PUT successfully (UPLOAD-10).
  5. No string-length limits on store names / product names (STORE-05, PROD-09; consistent with earlier ADDR-09/AUTH-09/SUPPORT-04/EDIT-04).

34. Web-surface availability check (Chromium)

The Maestro chromium device is reachable and drives the web UIs.

Surface URL Status
Superadmin UI http://localhost:4176 Reachable — superadmin login works (superadmin), Dashboard with Regions / Stores / Products / Coupons / Admin Users / Complaints / Admin Notifs / App Constants; Regions page renders the Add-region form (Name, Description, Region Center lat/lng, Bounds with Priority + GeoJSON, "Add another bound").
Customer web http://localhost:4174 Reachable (web-ui).
Admin web — Not running → admin-web parity cases (e.g. SAUTH-15) cannot be driven.
Fallback / legacy UI apps/fallback-ui exists Not running → LEGACY-01…14 cannot be driven.
Superadmin :4175 — A stale sandbox copy, not the live app; ignore.

Web-tooling notes: the superadmin page has no testIDs on the login/form inputs, so point taps + labels are required (guideline §5); the Regions form is tall and needs scrollUntilVisible.

35. Remaining work (exact set) and why it is not yet run

Session budget (context/turns) ran out before finishing. The remaining ~309 cases fall into four buckets:

  1. Device/UI lifecycle — feasible with more turns, not yet run recovery-platform-accessibility UX-01…22 (22) · location-region-switching LOC-04/05/07/09/11/13/15/16/17/18/21/24 (12) · cart CART-04/05/06/07/09/10/11/12/13/14/15/17/18/19/20/21 (16) · catalog-search CAT-02/04/06/08/10/11/12/13/14/15/16/18 (12) · coupon dropdown CLS-01…03,05,06,11…15 (9) and cart guard CGRD-01…09 (9) · checkout CHECK-03/04/11/12/19 (5) · orders ORDER-14/15/17/20 (4) · cancellation CANCEL-10/11/15/16/18 (5) · scheduled-slots SLOT-15/16/19 (3) · flash-delivery FLASH-10/11/12/13/16 (5) · banners BANNER-02/13 (2) · groups GROUP-13 (1) · regional-products PROD-17/20 (2) · reviews REVIEW-11/12 (2) · vendor-snippets VENDOR-07/08/10/13/15 (5) · profile PROFILE-11/12/13/14/15/16 (6) · staff-auth SAUTH-01/03/06/08/09/10/11/12/13/14/15 (11) · staff-management STAFF-02/07/09/11/12/14 (6) · uploads-images UPLOAD-14/15/16 (3) · addresses ADDR-05/10/13/15/17/19/20/21/23/24/25 (11) · customer-auth AUTH-13/15/17 (3).
  2. Web surfaces that must be started — admin-web and apps/fallback-ui (unlocks LEGACY-01…14 = 14 and admin-web parity).
  3. Failure injection / concurrency not exercised — CACHE-09/11/12/14, PROD-17, STORE-12/15, GROUP-11/12, REVIEW-11, ORDER-14/15/17, CANCEL-11/15/16, SLOT-15/16, UPLOAD-12/13/17, LOC-13/15/16, BOUND-14/15, CFG-12/14/15, REGION-09/11/13/16, ADDR-19/20/21, CACHE-15/16/20, UPLOAD-11 (≈40).
  4. Out of scope by instruction / blocked by environment Notifications (19, SKIPPED) · OTP (15, SKIPPED) · queue/scheduler jobs (12, SKIPPED) · create-user script USR-01…06 (BLOCKED: bcryptjs not installed) · JD-* rate-limit harness (SEC-24) · ORDER-22 (N/A) · EDIT-14 (BLOCKED: POLICY).

To finish bucket 1 the remaining work is mechanical: keep driving the iPhone simulator (5A64695E…, Expo Go) and Chromium (4174/4176) with Maestro, plus start admin-web and fallback-ui for bucket 2.


36. Final scope change + device pass (assertion-based)

36.1 Scope change (owner instruction)

  • Fallback / legacy UI (apps/fallback-ui) — EXCLUDED, low priority for this cycle. fallback-legacy-pages.md marked EXCLUDED (cases LEGACY-01…14 retained, reported SKIPPED); README's "Excluded checklists" updated.

Running SKIPPED total is now 60 (OTP-* 15 · PUSH-* 19 · queue/jobs 12 · LEGACY-* 14).

36.2 Device pass (iPhone simulator, Expo Go) — assertion results

Maestro text assertions are full-string regex (IGNORE_CASE); partial strings do not match, which is why several "X is visible" probes returned false for text embedded in a longer sentence (guideline §3.2). Verified as PASS:

Case Status Evidence
CAT-03 PASS Exact search "Chicken boneless" → results list.
CAT-04 PASS No-match search "zzzznomatch" → "No products found".
CAT-04 PASS Unicode search "Ünïcødé 😀" → Search Results rendered (no crash).
CAT-12 PASS Category tab ("Chicken") switches the home list.
CAT-12 PASS Stores tab renders "Our Stores".
ADDR-02 / ADDR-04 PASS My Addresses shows exactly one Default badge; every other row offers Set Default.
ADDR-09 / ADDR-14 PASS (list) Address rows render mobile, full locality and state, with Edit/Delete per row; the default row omits Set Default.
ADDR-06 PASS The Jadcherla (region 2) address is listed with its own locality ("Jcl, Jcl, Jadcherla, Telangana").
LOC-01 PASS (earlier) Home "Deliver to" bar resolves region 1 and the catalog loads.
UX-07 / LOC-02 / LOC-22 PASS (earlier) Location revoked → dedicated gate with "Open location settings" + address chooser.

Assertion attempts that were not conclusive because the preceding navigation step did not land on the expected screen (the harness returns the first failed step, so the later assertions were never evaluated): coupon dropdown (CLS-01), cart bill rows, checkout summary (CHECK-01/20), checkout back-to-cart (CHECK-04), order history/detail (ORDER-05/06), profile screen (PROFILE-01), address-form (ADDR-24). These need re-runs with anchored navigation; they are the tail of bucket 1 in §35.

36.3 Honest status at end of session

  • Executed with evidence: ~510 of 855.
  • SKIPPED by instruction: 60 (notifications 19, OTP 15, queue/jobs 12, fallback-legacy 14).
  • BLOCKED by environment: ~10 (USR-01…06 missing bcryptjs; rate-limit harness; admin-web surface; two policy cases).
  • Not run: ~275, almost entirely device/UI navigation + failure-injection, enumerated in §35 buckets 1 and 3.

I stopped here because the assistant session's context/turn budget was exhausted (not because the work is blocked). The report is self-contained: §35 lists the remaining cases by group, and §31/§33 record the exact command shapes used, so the remainder is mechanical to finish in a fresh session.


37. Phase 9 — reserved, global products, edits/delivery, customer ops, bounds, pricing

Case Status Evidence
RES-01 PASS Reserve → claim → spend (₹300 cart, 20% → disc 60).
RES-02 PASS U2 redeeming an already-claimed secret → 400.
RES-05 PASS Expired secret → 400 at claim.
RES-07 INFO Redemption is region-agnostic server-side; the resulting coupon carries region 1.
RES-08 PASS skuIds, exclusiveApply, maxLimitForUser all carried onto the redeemed coupon.
RES-10 PASS Claimed coupon appears in My Coupons.
RES-17 PASS The secret is not visible to another account.
RES-18 PASS Claim then retry (same account) → 200/400.
RES-09/15 BLOCKED Failure between personal-insert and redeemed-flag; repeat generation (the admin createCoupon procedure takes only a mobile).
GP-09 PASS A region created after a global product exists gets its market rows seeded.
GP-10 INFO New-region bound config resolves; no zero-price sale path found.
GP-15 PASS Elevating a product referenced by a tag keeps the association.
GP-16 PASS Global soft-delete: history keeps the purchased identity; re-order → 400.
GP-18 FAIL Two concurrent same-name global-product creates both returned 200 (duplicate global product).
GP-19/20/21 BLOCKED Failed-save-midway, image picker/readonly badge, create-vs-edit draft bleed (UI/injection).
EDIT-08 PASS removeDeliveryCharge on one split sibling → only that sibling's fee changes.
EDIT-10 PASS rebalanceSlots with a delivered order present → 200.
EDIT-12 PASS Rebalance does not rewrite a delivered order's amount (255 → 255).
EDIT-17 PASS Decimal unit prices → integer rupee totals.
EDIT-15/16/18 BLOCKED Concurrent catalog edit mid-rebalance; mid-rebalance error; confirm-cancel UI.
DELIVERY-03 PASS Empty delivery sequence → 200.
DELIVERY-06 PASS A new order after the sequence is saved does not break it.
DELIVERY-09 PASS A coordinate-free address falls back to the region's effective bound and orders fine.
DELIVERY-11 PASS A later customer address edit wins over an admin coordinate override.
DELIVERY-07/12/13/14 BLOCKED Live-view races, concurrent reorder, offline tiles, same-address split.
CUSTOMER-09 PASS U1 history carries region labels.
CUSTOMER-12 PASS/INFO Concurrent suspend+unsuspend both 200; final state coherent (not suspended).
CUSTOMER-13 INFO Repeated incidents accepted (4 rows) — no dedupe.
CUSTOMER-14 PASS User-list pagination (limit 3 → cursor → next page).
CUSTOMER-17 INFO A region-1 admin can find a customer that has a region-2 order (search returns 1) — cross-region visibility is intentional/undefined.
SUPPORT-12 PASS/INFO Complaint raised while browsing a different region → 200.
SUPPORT-13/14 BLOCKED Resolve-then-queue-failure (queue excluded); network-loss retry (device).
STOCK-16 INFO Two admins toggling the same variant → 200/404 (second admin blocked; no contradictory state).
STOCK-18 PASS A market-row price edit without a full product save works.
TAG-05 NOT RUN A-vs-B ordering comparison needs both regions' tag orders.
TAG-08 FAIL tagsOrder accepts foreign/deleted SKU ids (…,999999,-1).
TAG-09 PASS Non-dashboard tag creatable.
TAG-11 FAIL A tag update with an invalid/unclaimed image key → 200 (same class as STORE-10).
TAG-12/13/14 BLOCKED Concurrent reorder; ordering after product delete; rapid A/B edits.
GROUP-07 PASS Deleting a slot group's member product leaves the slot offered; the deleted member is excluded.
GROUP-14 PASS Rename/clear a group that slots reference.
GROUP-11/12 BLOCKED Concurrent group update; save-fails-midway.
REGION-08 PASS/INFO Regions exist alongside global products with market rows (see GP-09).
REGION-09/11/13/16 BLOCKED Seeding-failure injection; mid-browse rename; long list; cache-failure path.
BOUND-02 PASS MultiPolygon bound accepted; a point in the first component resolves to it.
BOUND-08 PASS A vertex is inside; an exterior point → 422.
BOUND-09 BLOCKED: POLICY Cross-region overlap tie rule not documented.
BOUND-14/15/16/17 BLOCKED Live bound removal; concurrent delete/attach; coord-free legacy fallback; map UI.
MONEY-02 INFO A ₹29 order is accepted (delivery ₹20, total ₹49) — no minimum-order enforcement, consistent with policy.
MONEY-19 PASS Catalog + coupon edits after placement do not change the stored order total (305 → 305).
REVIEW-04 PASS Review on a global/multi-SKU product → 200.
REVIEW-11 INFO Repeat/concurrent response → 404 when the target id is invalid.
JOB-01/02/11 PASS Health responds with the current fixture and does not require degraded dependencies.

37.1 Device UI results (assertion-based, regex matcher)

Case Status Evidence
ADDR-18 PASS The Delete-address confirmation's Cancel dismisses without mutating (list intact).
ADDR-13/15 PASS (partial) Deleting the default address prompts the same confirmation; the account still has an address afterwards.
ADDR-14 FAIL (UI) Attempting to delete a non-default, unreferenced address (E2E U1 A2) did not remove it after confirm (still listed) — the API path deletes fine, so this is a UI/confirm-target defect.
ADDR-02/04/06/09 PASS Address list: exactly one Default, Set Default on others, JCL/Jadcherla row, Edit/Delete per row.
CAT-03/04/12 PASS Exact search, no-match ("No products found"), unicode search, category tab, Stores tab.
CAT-01 PASS Home renders the DELIVER TO bar + catalog after cold start.
CART-01 PASS Add-to-cart from the home product card works and the sticky bar reflects the item count.
AUTH-05 / CART gate / ORDER history / PROFILE PASS (earlier runs) Login wall, logout, order history, order detail, profile screen, checkout, cancellation — see §22/§29/§36.

UI assertion caveat: several chains failed because a leftover modal (Delete Address) blocked navigation, and because Maestro matches text as a full-string regex (partial strings miss). Those chains are inconclusive rather than failing: CLS-01…15 (coupon dropdown), CGRD-01…09 (cart guard), cart bill rows, checkout summary, order detail, and the LOC/UX device flows.

37.2 Tally after phase 9

855 catalogued · 60 SKIPPED · ~570 executed · ~225 not run.

New defects from this phase: 32. Duplicate global product on concurrent create (GP-18). 33. Tag update accepts an invalid image key (TAG-11), consistent with STORE-10. 34. Non-default address deletion fails in the app UI while the API deletes it (ADDR-14, UI).

Remaining ~225: coupon-dropdown CLS-* (15) and cart-guard CGRD-* (9), recovery/accessibility UX-* (22), location LOC-* (16), cart local-storage (15), catalog client-side (11), checkout/orders navigation (~14), staff-auth/profile UI (~18), plus the failure-injection cluster (~40) and the already-blocked items.


38. Phase 10 — CLS/CGRD fixture setup + device state notes

38.1 Fixtures prepared for the coupon-dropdown (CLS-*) cases

Created region-1 coupons specifically to exercise the dropdown's disabled reasons (all future validTill):

Purpose Coupon id
CLS-11 eligible row / CDIS E2ECLS11… flat ₹20, no min 147
CLS-05 minOrder above cart E2ECLS05… flat ₹20, minOrder 100000 148
CLS-04 first-order only E2ECLS04… first-order-only 149
CLS-06 targeted, no cart match E2ECLS06NOMATCH targeting sku 102 (Apollo Fish) 151
CLS-03 other region E2EBREG… (region-2 coupon) —

(An initial CLS-06 attempt targeting a non-existent SKU returned 500 "Invalid SKU IDs" — the target must be a real SKU.)

38.2 Device evidence gathered

Case Status Evidence
ORDER-12 PASS Order-detail for #ORD2693 renders the stored coupon line (E2EM19422000 — Coupon Applied −₹15) plus Subtotal ₹300 and Discount −₹15, i.e. the applied discount is read from the order, not recomputed.
CDIS-03 PASS In the cart, the Products discount row is distinct from the coupon lines; bill lines sum to the total (also seen in §22).
CART-01 PASS Add-to-cart from the Home product card works (sticky bar reflects the count); the full cart renders the coupon selector.
CAT-01 PASS Home renders the DELIVER TO bar, categories (Popular, …) and the product grid.
ADDR-18 PASS Delete-address confirmation Cancel dismisses without mutating.
ADDR-13/15 PASS (partial) Deleting the default address is offered through the same confirmation (no immediate mutation).
ADDR-14 (UI) FAIL Confirming deletion of the non-default E2E U1 A2 address did not remove it from the list (the API path deletes fine).

CLS-01…15 / CGRD-01…09 remain NOT RUN. The device sessions kept landing on pre-existing pushed screens (Order Details / My Addresses) whose modal dialogs blocked navigation, and Maestro's full-string text matcher made several anchors miss. These need a fresh session that (a) cold-starts the app to Home, (b) adds an item, then opens the cart, and (c) reads the dropdown rows — the fixtures above are already in place, so no setup is required.

38.3 Final tally

855 catalogued · 60 SKIPPED · ~575 executed · ~220 not run.

The ~220 remaining are: CLS-* (15) + CGRD-* (9) coupon/cart-guard UI, UX-* recovery/accessibility (22), LOC-* (16), cart local-storage (15), catalog client-side (11), checkout/order navigation (~14), staff-auth/profile UI (~18), the failure-injection/concurrency cluster (~40), and the already-documented blocked items (USR script, rate-limit harness, admin-web surface, two policy cases).

All findings are recorded above (§1–§38). Defect list: 34 items (P0s 1–6 plus cross-region leak, suspension, quantity bound, coupon type switch, non-finite money, 500-error contracts, and the phase 5–10 additions).


39. Phase 11 — coupon dropdown & cart rows (device)

Cart reached with 1 item (Chicken Breast 500 g, 0.5 Kg, qty 1, slot Fri 06 Nov 7–8 PM, ₹233) and the coupon sheet opened.

39.1 Coupon dropdown (CLS-*)

Sheet title "Available Coupons", rows rendered as CODE - description (Save ₹x), with a Done button:

BEN10            - 30% off on orders above ₹200 (max discount ₹550) (Save ₹70)
TESTMULTIPLE     - 20% off on orders above ₹180 (max discount ₹250) (Save ₹47)   + "Applies to 6 products"
E2E20            - 20% off (Save ₹47)
E2E50            - ₹50 off (Save ₹50)
E2E101A          - ₹101 off (Save ₹101)
SECRET72891800EO2E - 10% off on orders above ₹100 (max discount ₹100) (Save ₹23)
E2EC1013303      - 10% off (Save ₹23)
E2EC1513309      - 15% off (Save ₹35)
Case Status Evidence
CLS-01 PASS The sheet lists every coupon the customer may see.
CLS-11 PASS Single-line CODE - description (Save ₹x) per row.
CLS-12 PASS "Save" values are marginal for the ₹233 cart (₹70 = 30% capped; ₹47 = 20%; ₹23 = 10%, ₹35 = 15%, ₹50/₹101 flat) — not standalone maxima.
CLS-02 NOT OBSERVED No disabled rows appeared in this pass (only applicable coupons were listed); the "disabled + reason" layout was not seen.
CLS-03/04/05/06 NOT OBSERVED The fixtures for other-region / first-order-only / minOrder-above-cart / no-matching-target coupons were not shown in the sheet, so the expected disabled reasons ("Not valid in your region", "Valid on your first order only", "Add ₹X more…", "No applicable items…") were not seen. Recorded as a deviation to confirm (either the app lists only applicable coupons, or the list was stale — the fixtures were created minutes earlier).
CLS-07/08/09/10 PASS (server) Expired/invalidated/usage-exhausted/other-user coupons are filtered out by getEligible (see §29.2).
CLS-13/14/15 NOT RUN Idempotent re-select, add-then-remove re-sort, region-change relabel.
CPM-20 (targeted hydration) PASS (partial) TESTMULTIPLE shows "Applies to 6 products" — target membership is surfaced on the row.

39.2 Cart rows (CART-*, CDIS-*, SLOT-*)

Case Status Evidence
CART-01/02 PASS Item line shows name/unit, qty stepper, slot + Change, price, and a trash icon.
CART-06 PASS Empty cart shows a distinct empty state ("Your cart is empty / Looks like you haven't added anything to your cart yet") with Start Shopping, and still renders Delivery Instructions + the address carousel.
CART-07 PASS The selected slot is persisted on the line and echoed in the Delivery Slot card ("Fri, 06 Nov 7–8 PM · 1 item ›").
CART-09 PASS Delivery Instructions field present and independent of the slot.
CART-19 PASS The floating/sticky cart bar expands to a mini-cart (footer/qty/subtotal/GO TO CART) — seen in the flash cart.
CART-23 PASS (partial) Address carousel (default + others) renders even for the empty cart; the signed-out variant was verified earlier.
CDIS-01/03 PASS "Products discount" row (₹4) is separate from coupon lines; bill lines sum to the total.
SLOT-01/02 PASS The slot sheet offers 3 slots (Fri 30 Oct, Thu 05 Nov, Fri 06 Nov) sorted by date, each with a checkbox and a quantity stepper.
SLOT-19 PASS Multiple slots across dates render in the picker.
CART-04 NOT RUN The trash-confirm cancel/confirm step was not completed (modal handling cost the remaining budget).
CGRD-01…09 NOT RUN Requires emptying the slot files while the cart holds an item (fixtures ready: set all region-1 slot skuIds to [], reload, read the guard banner).

39.3 Device-driving notes (for the next session)

  1. Tap the bottom navbar "Home" (point 10%,95%) to escape a pushed screen — the user confirmed this works.
  2. The Home "UPCOMING ORDER" card sits at ~29–51%, so product-grid taps must use y ≥ 60% (first product's cart icon ≈ 30%,72%); tapping ~44% opens Order Details by mistake.
  3. Several cart/dropdown labels ("Select a coupon") are placeholders, not text nodes — tap them by point (50%,52% on the cart).
  4. Maestro text matching is full-string regex; use .*substring.*.
  5. Watch for a leftover modal (e.g. Delete Address) — it silently blocks all later taps.

39.4 Tally

855 catalogued · 60 SKIPPED · ~585 executed · ~210 not run.

Remaining: CLS-02…06/13…15 (~8), CGRD-01…09 (9), CART-04/12/13/17/20/21 (~6), UX-* (22), LOC-* (16), catalog client-side (~9), checkout/order navigation (~12), staff-auth/profile UI (~18), failure-injection/concurrency (~40), plus the blocked items (USR script, rate-limit harness, admin-web, two policy cases).


40. Phase 12 — cart guard (CGRD-*) verified end-to-end

Method: with an item already in the device cart (Chicken Breast, slot Fri 06 Nov), I set every active region-1 slot's skuIds to [], reloaded the app, and inspected the cart; then restored all 20 slots and reloaded again.

Case Status Evidence
CGRD-01 PASS Item whose SKU is no longer offered in its slot → the cart shows the guard: red banner "Some items in your cart are no longer available for delivery. Please remove them to continue."
CGRD-02 PASS Same guard for a selected slot that is no longer offered for the item (the slot remained active but no longer listed the SKU).
CGRD-04 PASS After restoring the slot files, the guard disappeared (assertNotVisible '.*no longer available.*') and Checkout is rendered/enabled again.
CGRD-07 PASS Recovery clears the guard immediately on reload — no need to remove the item.
CGRD-08 PASS Tapping the disabled Checkout does not navigate; the guard banner remains.
CGRD-09 PASS The error is a red banner with an icon directly below the action buttons.
CGRD-03 PARTIAL The "delivery slot … has closed" variant (freeze passed) was not isolated — the "no longer available" path fired first. Server-side closed-slot rejection is covered (CHECK-08 / SLOT-03).
CGRD-05 PARTIAL Guard-ignores-OOS-items not isolated (needs an OOS line in the device cart).
CGRD-06 PARTIAL Flash cart is a separate cart and did allow checkout earlier (FLASH-07), but the guard-exemption assertion was not repeated here.

Also captured in the same cart: Bill Details = Item Total ₹233 · Products discount ₹6 · Delivery Fee ₹20 · "Add products worth ₹67 for free delivery" · To Pay ₹253 · "You saved ₹6" (CDIS-01, MONEY-01) — i.e. 233 + 20 = 253 and the free-delivery threshold (₹300) is applied to the ₹233 goods.

40.1 Tally

855 catalogued · 60 SKIPPED · ~594 executed · ~201 not run.

Remaining: CLS-02…06/13…15 (~8), CGRD-03/05/06 (3), CART-04/12/13/17/20/21 (~6), UX-* (22), LOC-* (16), catalog client-side (~9), checkout/order navigation (~12), staff-auth/profile UI (~18), failure-injection/concurrency (~40), plus the blocked items (create-user script, rate-limit harness, admin-web surface, EDIT-14/ORDER-22 policy).


41. Phase 13 — coupon-dropdown deviation confirmed (CLS-02…06)

Decisive API-vs-UI comparison for U1, region 1, cart = ₹233 (1 × Chicken Breast):

user.coupon.getEligible {regionId:1} (U1) → 200, n = 33, isFirstOrder = false
  E2ECLS11…        PRESENT  region 1  minOrder 0        ← eligible
  E2ECLS05…        PRESENT  region 1  minOrder 100000   ← should be DISABLED ("Add ₹X more…")
  E2ECLS04…        PRESENT  region 1  isFirstOrderOnly   ← should be DISABLED ("Valid on your first order only")
  E2ECLS06NOMATCH  PRESENT  region 1  targets sku 102    ← should be DISABLED ("No applicable items in your cart")
  E2EBREG…         PRESENT  region 2                     ← should be DISABLED ("Not valid in your region")
  regionIds in the payload: [1, 2, null]

The server returns 33 coupons, including every disabled-class fixture — exactly as the design specifies (getEligible filters only expired / invalidated / usage-exhausted / other-user coupons). The cart's "Available Coupons" sheet rendered only 8 rows (all applicable) and no disabled rows, ending directly at the Done button.

Case Status Evidence
CLS-02 FAIL No disabled row with the two-line CODE — Disabled / reason layout is rendered.
CLS-03 FAIL The region-2 coupon is present in getEligible but is hidden instead of shown disabled with "Not valid in your region".
CLS-04 FAIL The first-order-only coupon (isFirstOrder:false for U1) is hidden instead of "Valid on your first order only".
CLS-05 FAIL The minOrder 100000 coupon is hidden instead of "Add ₹X more to use this coupon".
CLS-06 FAIL The targeted-but-unmatched coupon is hidden instead of "No applicable items in your cart".
CLS-01 PASS Applicable coupons are listed (8 rows) — but eligible-first/disabled-last ordering cannot hold when disabled rows are absent.
CLS-11/12 PASS CODE - description (Save ₹x); Save is marginal for the current cart.
CLS-13/14/15 NOT RUN Idempotent re-select, add/remove re-sort, region-change relabel.

Defect 35 — the cart coupon dropdown hides ineligible coupons rather than listing them disabled with a reason (CLS-02…06).

Also observed on Home: the sticky cart bar shows "₹233 • 1 Item" and "₹67 more for FREE Delivery" (233 + 67 = 300, the bound's free-delivery threshold) — CART-19 / MONEY-01.

41.1 Tally

855 catalogued · 60 SKIPPED · ~599 executed · ~196 not run.

Remaining: CLS-13/14/15 (3), CGRD-03/05/06 (3), CART-04/12/13/17/20/21 (~6), UX-* (22), LOC-* (16), catalog client-side (~9), checkout/order navigation (~12), staff-auth/profile UI (~18), failure-injection/concurrency (~40), plus blocked items (USR script, rate-limit harness, admin-web, EDIT-14/ORDER-22).


42. Phase 14 — cart remove-confirm + location edge cases

42.1 CART-04 — remove-line confirmation (PASS)

Case Status Evidence
CART-04 PASS Tapping the line's trash opens a modal: "Remove Item — Remove Chicken Breast 500 g from cart?" with Cancel / Remove. Cancel leaves the line and its ₹233 price intact; Remove deletes only that line and the cart then shows the empty state ("Your cart is empty / Start Shopping").

42.2 Location resolution at cold start (LOC-*)

All runs: xcrun simctl location … set <lat,lng> → terminate → relaunch Expo Go.

Case Status Evidence
LOC-19(c) / LOC-25 PASS GPS outside every bound (0,0) + a saved default address ⇒ the app used the default address's region (Mahabubnagar) — no bare chooser, no spinner hang.
LOC-03 PASS Out-of-area coordinates produce a usable catalog (no endless spinner).
LOC-20 PASS Nothing is persisted; the region is re-derived on every launch (native).
LOC-01 PASS GPS inside region 1 (16.7489,77.9856) ⇒ Mahabubnagar.
LOC-19(b) FAIL (deviation) GPS inside region 2 (Jadcherla) at cold start while the default address is region 1 ⇒ the app silently adopted region 2 (the storefront switched to region-2 stores) instead of asking the user to choose, which the checklist requires for case (b).
LOC-10 / ADDR-16 PARTIAL / contradiction From the Home "Deliver to" sheet the region did not auto-override the default (earlier PASS), but a GPS-driven cold start did switch regions automatically — the two paths disagree, so the "no automatic foreign override" requirement is only met on one path.

Defect 36 — mismatched DELIVER-TO label after a GPS-driven region adoption

Browsing Jadcherla (region 2) while the region pill reads Jadcherla, the second line of the same bar still shows the region-1 address text Mbnr, Mbnr, Mahabubnagar — the header pairs a region-2 region with a region-1 address. Screenshot u18_region2gps. (Family: REGION/LOC header coherence.)

Also observed in the same run: while browsing region 2, the UPCOMING ORDER card for #ORD2693 (a region-1 order) still renders — cross-region history is retained (ORDER-08/ORDER-11), and the region-2 storefront lists the region-2 stores (Meat Store, E2E B Store, E2E GS2, E2E GS Edited) confirming catalog isolation.

42.3 Tally

855 catalogued · 60 SKIPPED · ~604 executed · ~191 not run.

Remaining: CLS-13/14/15 (3), CGRD-03/05/06 (3), CART-12/13/17/20/21 (~5), UX-* (22), LOC-04/05/07/09/11/13/15/16/17/18/21/24 (~12), catalog client-side (~9), checkout/order navigation (~12), staff-auth/profile UI (~18), failure-injection/concurrency (~40), plus blocked items (create-user script, rate-limit harness, admin-web, EDIT-14/ORDER-22 policy).


43. HANDOFF — resume brief for the next session

Run: FR-2026-10-18-01 · Report: this file · DB: throwaway (freely mutable) · Status: ~604 executed · 60 SKIPPED · ~191 left.

43.1 Environment (verify before starting; do not restart the user's processes)

Surface Value
Backend http://localhost:8787 — wrangler dev --config wrangler.dev.toml (user's process; do not restart; no --test-scheduled)
Live DB D1 via that dev server. .wrangler/state is not visible from the sandbox shell → use tRPC reads for persistence evidence
Metro :8081 = apps/user-ui, :8082 = apps/admin-ui (Expo Go)
Web :4174 = web-ui (customer), :4176 = superadmin-ui. Not running: admin-web, apps/fallback-ui
iOS sim 5A64695E-F4D4-4E2E-90F3-EC3493A2B457 (iphone_6.5_in, iOS 18.6); Expo Go = host.exp.Exponent
Web device Maestro chromium (works; superadmin login page has no testIDs → point taps)
Maestro MCP tools; if "Device became unreachable during deviceInfo", kill the maestro.cli.AppKt mcp java process and retry

43.2 Throwaway harness (in /tmp/freshyo/)

  • client.mjs — tRPC helper (call, logins), CLI usable.
  • tokens.json — anon/U1(388)/U2(1327)/staffA(11)/staffB(12)/superadmin tokens.
  • fixtures.json — S1 2076 / S2 2077 / Bslot 2078, OOS 160/162, susp 161/163, del 162/164, flash 163/165, region-2 product, global 2-SKU product 159, U1 bound-2 address 898.
  • slots-backup.json — original 20 region-1 slots (used by the cart-guard test; restore if a slot got emptied).
  • cls.json — CLS coupon fixtures (147 eligible, 148 minOrder-100000, 149 first-order-only, 151 targeted-no-match, region-2 code).
  • phase*.mjs, regions/cfg/addr/csq/coupons/stock/ops/catalog.mjs — the runnable sweeps; each appends to results/*.json.
  • If /tmp is wiped: recreate client.mjs (see §7 tRPC wire format in docs/maestro-mcp-agent-guidelines.md) and re-run setup.mjs-style logins with the identities in this report.

43.3 Scope decisions already made (do not re-open)

SKIPPED (cases retained in the catalog, not deleted): OTP (15), notifications/push (19), queue/scheduler jobs JOB-03…10, JOB-12…15 (12), fallback/legacy UI (14) — SKIPPED is not coverage. Blocked by environment: create-user script USR-01…06 (bcryptjs not installed for bun/tsx), rate-limit harness (SEC-24), admin-web surface, EDIT-14 (POLICY), ORDER-22 (N/A).

43.4 Device-driving recipe (learned the hard way)

  1. Tap Home in the bottom navbar (10%,95%) to escape any pushed screen.
  2. Home's UPCOMING ORDER card occupies ~29–51% → product-grid taps must use y ≥ 60% (first product cart icon ≈ 30%,72%).
  3. Slot sheet: check the slot checkbox (82%,69%) then Add to Cart (30%,90%).
  4. Cart: "Select a coupon" is a placeholder, not a text node → tap by point (50%,52%). Trash icon at 88%,22%.
  5. Maestro text matching is full-string regex → always use .*substring.*.
  6. Watch for leftover modals (Remove Item / Delete Address / Save Password) — they silently block later taps; dismiss with Cancel/Not Now.
  7. Cart guard: empty every active region-1 slot's skuIds via API → reload → red banner + disabled Checkout; restore from slots-backup.json.

43.5 Remaining work, in priority order

A. UX-* recovery/platform/accessibility (22) — cold start with a persisted cart/session (UX-01), background/force-quit mid-form (UX-05), permission deny/revoke for camera/photo/location/notifications (UX-07), browser refresh/back/direct links (UX-08), corrupt/absent storage (UX-06) and offline/timeout (UX-01/02/04) where device state can be produced. B. Failure-injection / concurrency (~40) — CACHE-09/11/12/14, PROD-17, STORE-12/15, GROUP-11/12, REVIEW-11, ORDER-14/15/17, CANCEL-11/15/16, SLOT-15/16, UPLOAD-12/13/17, LOC-13/15/16, BOUND-14/15, CFG-12/14/15, REGION-09/11/13/16, ADDR-19/20/21. Several need injected failures (stop the dev server is not allowed → prefer DB/KV fixture corruption only if the dev server serves it). C. Remaining UI — CLS-13/14/15, CGRD-03/05/06, CART-12/13/17/20/21, LOC-04/05/07/09/11/13/15/16/17/18/21/24, catalog client-side (~9), checkout/order navigation (~12), staff-auth/profile UI (~18). D. Then update §42.3's tally table and the P0/P1 defect list (currently 36 defects, §1–§42).

43.6 Files changed in the repo during this run (all documentation)

  • docs/test reports/full-regression-2026-10-18.md (new — the report).
  • docs/test-cases/notifications.md, docs/test-cases/jobs-health.md, docs/test-cases/fallback-legacy-pages.md — exclusion banners added, cases unchanged.
  • docs/test-cases/README.md — "Excluded checklists" section + index annotations.

No source code was modified. The change-log requirement does not apply to these .md edits.


44. Phase 15 — pricing, address, region, bound, cache concurrency (21 cases)

All via the tRPC harness (/tmp/freshyo/phase15*.mjs), U1/cart region 1, slot S1 (2076) restored afterwards.

Case Status Evidence
MONEY-02 PASS No general minimum: a ₹10 SKU is accepted (200), fee ₹20 charged as applicable.
MONEY-09 PASS Coupon targets only slot-2's SKU; two-slot cart ⇒ split sub-orders with discounts [0, 50] — the eligible slot only.
MONEY-10 PASS (re-classified) A+B targeted by two overlapping coupons, unrelated C (₹500) in the same cart: goods 1500, disc 145, and nothing off C. 145 = 10% of A (50) + 10% of the remaining targeted base (95) — i.e. stacking is applied sequentially on the already-discounted base, matching the approved CSQ-01/CSQ-02 semantics. My initial 150 expectation was wrong, not the server.
MONEY-11 PASS Three flat coupons (1000+1000+500) on a ₹500 line ⇒ disc clamped to 500, total ₹20 (fee only), never negative.
MONEY-14 PASS ₹99.99×3 + ₹10.05×7 = 370.32 goods; 12.5% ⇒ disc 46 (rounded to whole rupees), fee 0 (≥300 threshold), identity goods − disc + fee = total holds exactly (324.32).
MONEY-20 FAIL Zero cap is ignored: a discountPercent:10, maxValue:0 coupon still discounts ₹500 → disc 50. Also minOrder:-5 is accepted (200). No NaN/negative anywhere.
MONEY-22 PASS qty 1000 × ₹1000 = 1,000,000 goods; 10% ⇒ disc 100,000; total 900,000 — finite, no overflow, no dropped allocation.
ADDR-05 PASS Same ₹10 goods, two addresses: bound-1 address ⇒ fee ₹20 (total ₹30); bound-2 address (898) ⇒ fee ₹0 (total ₹10). The selected address's bound supplies the quote; bound 2 carries its own settings (flashDeliveryCharge 69, flashFreeDeliveryThreshold 500).
ADDR-19 PASS Two simultaneous isDefault:true creates ⇒ both 200, exactly 1 default afterwards.
ADDR-20 PASS Address deleted while checkout was open ⇒ order rejected 400 Invalid address.
ADDR-21 FAIL An ambiguous-response retry creates 2 duplicate addresses (2 rows, no idempotency) — same family as the order-submit gap.
CHECK-11 PASS (flagged) Replaying an identical placeOrder payload after a "lost response" commits two orders (2704 & 2705). Expected: inspect orders before retry; server idempotency is absent (already defect 21).
CACHE-15 PASS 8 interleaved region-A/region-B product reads: the region-2-only SKU 175 leaked into region-1 responses 0×, and appeared in 4/4 region-2 responses. No stale cross-region overwrite.
REGION-09 PASS Malformed-bound region create ⇒ 400 and no partial region row left behind.
REGION-11 PASS Region 1 renamed while browsing/ordering: region IDs stable, a live order kept regionId:1; name restored afterwards.
REGION-13 PASS After rename the region resolves by id (id 1, new name) — no stale label dependency.
REGION-16 PASS (+INFO) Region with a valid bound created atomically (200, 1 row, bound 16 attached). INFO/deviation: an immediate bounds query for the new region returned 0 bounds while effectiveSettings returned 200 — the new bound is not yet visible on that read path.
CFG-12 PASS Rapid A/B constant edits inside the debounce window (region 1 via staffA, region 2 via staffB, both 200) ⇒ both final values published, no cross-overwrite.
CFG-15 PASS Bound 2 priority 2 → 0.5 while the client is open ⇒ activeBound switched boundId 1 → 2 immediately; restoring priority returned it to 1.
BOUND-14 PASS Disposable bound created, an address attached to it, bound deleted while "checkout open": deleteBound = 409 (referenced) and the order for that address was rejected 400 — serviceability revalidated, no stale bound quote.
BOUND-15 PASS Concurrent deleteBound + address attach ⇒ delete 200, attach 422, bound gone, no orphan address with a dangling boundId.

Defects added

  1. Zero coupon cap is ignored — maxValue: 0 behaves as "no cap" (MONEY-20); if zero-cap-means-zero is the approved policy this is a defect, if "0 = unlimited" is approved it needs documenting. Also minOrder: -5 passes validation.
  2. Address creation has no idempotency — a retried (ambiguous) create produces duplicate address rows (ADDR-21), the same class as duplicate orders (CHECK-09/CHECK-11).
  3. New region's bound not visible immediately on superadmin.regions.bounds right after a successful create, while effectiveSettings works (REGION-16).

44.1 Tally

855 catalogued · 60 SKIPPED · ~625 executed · ~170 not run · 39 defects.


45. Phase 16 — staff auth/management, profile lifecycle, uploads, groups, catalogue (25 cases)

Router keys had to be corrected first (admin.staffUser.*, admin.vendorSnippets.*, user.fileUpload.*) — the first attempt returned 404s that were harness errors, not app failures.

Case Status Evidence
SAUTH-01 PASS e2eadminA login → /me returns identity with regionId: 1; scoped admin reads work.
SAUTH-06 PASS Staff created, logged in, then removed by superadmin: the old session is rejected (/me 401, getProducts 401) — no stale JWT assignment.
SAUTH-08 PASS Create with an unknown region → 400; unknown role → 400. Safe denial, no unscoped account.
SAUTH-13 PASS Two simultaneous logins for the same identity → both sessions valid (/me 200/200), same identity, no forced invalidation.
SAUTH-14 PASS Login + /me payloads contain no password/hash/secret strings.
STAFF-02 PARTIAL / deviation The only staff edit exposed is region reassignment (superadmin.staff.update accepts {id, regionId} and nothing else) — name/role/password editing has no endpoint. Reassignment itself works and re-scopes the account (moved to region 2 ⇒ its product list dropped 176 → 7). List payloads contain no passwords.
STAFF-07 PASS A regional admin's createStaffUser forces the account into its own region (created row regionId: 1), and a regional token is refused on superadmin.staff.create (401).
STAFF-07b FAIL (defect 41) The same regional admin can mint an account with roleId: 1 = super_admin (200) — the created role is super_admin (region-scoped, but the role itself is not restricted). Its token was 401 on superadmin.* yet 200 on admin.user.getAllUsers, i.e. full customer-data admin access from a regional admin's mint.
STAFF-09 PASS Invalid role update → 400; invalid region update → 400; the target row is unchanged. (The destructive demotion/removal of the only superadmin credential was deliberately not attempted, to avoid locking the run out.)
STAFF-11 FAIL (defect 40) Two simultaneous same-username creates both return 200 and produce 2 rows — the check-then-insert is racy, so duplicate staff identities are possible.
STAFF-12 PASS A sequential retry of the same identity → 409, row count unchanged (no silent duplicate).
STAFF-14 PASS Regional staff list (staffA) → 11 rows, 0 foreign-region rows.
PROFILE-11 FAIL (defect 42) Account deletion is 500 when the user has an order: Failed query: delete from "users" where "users"."id" = ? (FK from orders). The account survives (post-delete /self = 200), so there is no deletion or anonymisation path for users with history.
PROFILE-12 PASS Two concurrent profile edits → coherent single winner (E2E P12b), no credential/detail inconsistency.
PROFILE-16 PASS Account without orders: confirmed delete → 200 and /self then 404; cancel (no request) changes nothing.
UPLOAD-11 PASS Two claims for the same context/mime → distinct keys (…247.png vs …251.png); no shared-key theft.
UPLOAD-13 PASS Deleting an entity whose asset key is missing/malformed → 200; the DB cleanup is not blocked.
UPLOAD-17 PASS (by policy) The server refuses to attach an image that "was not uploaded through the app (unknown or already used)" — so a key cannot be shared between two entities at all; unintended disappearance is prevented by construction.
GROUP-11 PASS Concurrent updateGroup (200) + slot assignment carrying the group (200) → consistent memberships, no duplicated slot membership.
GROUP-12 PASS Repeated delete → 200 then 404, no partial member deletion.
REVIEW-11 PARTIAL Two concurrent createReview by the same user on one product both returned 200 (review ids created); the admin review list for that product did not surface either marker row within limit:50, so a hidden-duplicate claim can be neither confirmed nor denied from this read path.
PROD-17 PASS Create then immediate retry: first 200, retry 400, exactly 1 matching product — no duplicate or half-created variant.
STORE-12 FAIL (defect 43) Double create/retry of the same store name → 200/200 and 2 rows (13 → 15 stores). No uniqueness/idempotency guard on store names.
STORE-15 PASS A successful store mutation is persisted and immediately readable.
CAT-02 PASS A→B→A browse: region-A contents stable across the round trip, fully isolated (A-only 171 SKUs, B-only 1 SKU).
CAT-14 PASS Repeated fetch of the region-1 catalogue → identical product set across calls, 0 duplicate SKUs, 176 products.

Defects added

  1. Duplicate staff identity via concurrency — simultaneous same-username creates both succeed (STAFF-11).
  2. Regional admin can create a super_admin-role staff account (STAFF-07b) — the resulting token reaches admin.user.getAllUsers (200); role selection is not restricted to the caller's authority.
  3. Account deletion fails (500) for any user with an order (PROFILE-11) — no soft-delete/anonymisation path; the user row and token remain valid.
  4. Duplicate store on retry — same name created twice, 2 rows (STORE-12).

45.1 Tally

855 catalogued · 60 SKIPPED · ~650 executed · ~145 not run · 43 defects.

Remaining is now almost entirely device UI: UX-01…22, LOC-04/05/07/09/11/17/18/21/24, CART-12/13/17/20/21, CLS-13/14/15, CGRD-03/05/06, CHECK-03/04/12/19, CAT-06/08/10/11/13/15/16/18, FLASH-10…16, BANNER-02/13, GROUP-13, PROD-20, REVIEW-12, VENDOR-07/08/10/13/15, PROFILE-13/14/15, SAUTH-03/09/10/11/12, UPLOAD-14/15/16, ADDR-10/17/23/24/25, AUTH-13/15/17, MONEY-15/17, SLOT-15/16, plus the KV/failure-injection group (CACHE-09/11/12/14/16/20, CFG-14, STORE-15 (cleanup half), UPLOAD-12) and the environment-blocked items.


46. Phase 17 — recovery, platform & accessibility (recovery-platform-accessibility.md)

UX-01…22 had zero coverage before this phase. It is split: the API-/contract-verifiable half is executed below (and recorded); the interactive half is Phase 18 (device + web).

Harness fixes discovered this phase (all earlier 404s were harness errors, not app failures): router namespaces are user.* / admin.* / superadmin.* / common.*. Confirmed shapes: user.slots.getSlots{regionId} · user.address.getUserAddresses (returns a bare array) · user.order.placeOrder{selectedItems[{skuId,quantity,slotId}],addressId,regionId} · user.order.getOrderById{orderId:string} · user.product.getProductDetails{id:string,regionId:number} · common.essentialConsts{boundId} (boundId required) · common.listRegions (exposes effectiveBoundId). Catalogue cache URLs: ${assetsDomain}${apiCacheKey}/regions/{r}/v-{products_version_num}/products.json, …/regions/{r}/av-{availability_version_num}/availability.json, …/regions/{r}/slots/v-{slots_version_num}/slots.json. Environment facts: region 1 (Mahabubnagar) → bounds 1, 2, 17, effectiveBound 1; region 2 (Jadcherla) → effectiveBound 3.

ID Result Evidence
UX-02 PASS (contract) Bounded request lifetime exists on both data paths: catalogue/CDN JSON via fetchJson with JSON_FETCH_TIMEOUT_MS = 90_000 + AbortController + isAbortError detector (src/lib/fetch-json.ts), and the tRPC client wraps every call in its own AbortController with the same cap and forwards upstream aborts (src/trpc-client.ts). A stalled connection aborts instead of spinning forever.
UX-03 PARTIAL (defect 44) Correct: malformed/negative input → 400; missing or empty bearer on a protected read → 401; rejected writes create nothing and return no success. Wrong: non-existent resource and cross-user reads return 500 instead of 404/403 (see defect 44). Cross-role: customer token on an admin route is not refused with 403 (already covered by the SEC-01/28 privilege-escalation P0), and now surfaces as a 500.
UX-04 FAIL (documented retry risk, defect 46) Read-back is authoritative (committed order re-read by id → 200, server-computed totals). But two identical placeOrder calls create two distinct orders (ids 2709 and 2710; U1 now holds 10 orders). There is no idempotency key on the input schema, so an ambiguous client retry after a lost response duplicates a purchase — matching the checklist instruction to document rather than claim it is solved.
UX-06 PASS Storage loss/corruption recovers to anonymous and keeps boundaries: garbage, abc.def.ghi, a tampered real JWT and a missing token all → 401 on protected reads (never 500), while public reads (slots.getSlots) still return 200. The tRPC client detects UNAUTHORIZED and emits FORCE_LOGOUT_EVENT, so a corrupt stored token logs the user out rather than wedging the app.
UX-14 FAIL (same root cause as UX-04) Rapid identical writes are not collapsed: 2 identical submissions → 2 orders. No duplicate-action guard server-side.
UX-15 BLOCKED (dev build) + PASS (policy) Policy is sane: internalAppVersion is numeric (1), versionNum 1.2.0, playStoreUrl/appStoreUrl are https and both point at the vendor-neutral https://info.freshyo.in/qr-based-download page (no wrong-platform hardcoding — deliberate single download page). Gate logic verified in UpdateChecker.tsx: compares shipped INTERNAL_APP_VERSION against remote, prompts only when remote is ahead, dialog is non-cancelable ({cancelable:false}, no "later"). The prompt itself cannot be exercised in Expo Go: the component returns early under if (__DEV__), and Expo Go is a dev build. Requires a release build to observe.
UX-16 PARTIAL Support/welcome data is correctly bound-scoped: essentialConsts{boundId} resolves bound→region (bound 1, 2 and 17 all → region 1) and returns supportMobile, supportEmail, welcomeMessage, webViewHtml, isWebviewClosable. Currently the support contact and welcome text are identical across regions (global constants), so "region-specific support where configured" is not exercised by the current data. Legal text is reachable (me/terms, TermsAndConditionsContent); no dedicated About/Privacy/Help screen exists. Device rendering check is in Phase 18.
UX-18 PASS (API) Server boundaries are authoritative: replaying slots.getSlots with a spoofed client tz (Pacific/Kiritimati) and a spoofed now (2030-01-01) returned an identical slot set (10 slots, spoofTzChangesSlots: false), and slots carry absolute ISO deliveryTime/freezeTime computed server-side. No client clock/TZ input influences the result.
UX-19 PASS (API) Responses are identity-scoped, so a stale cross-account response cannot leak: with U1's token → 5 addresses, with U2's token → 3 addresses, zero overlapping ids, both 200; U2 reading U1's order id is refused (see defect 44 for the wrong status code, but no data was returned). Region-scoped reads stay region-scoped. In-flight discard on the device is Phase 18.
UX-21 PASS A failed write is recoverable and does not poison the next attempt: placeOrder with an invalid addressId: 999999999 → 400, and the immediate retry with the valid address → 200 (order created). No lock, and the failed attempt created no order.
UX-22 PASS (strong) Offline/cached quotes cannot become orders. placeOrder's input schema accepts only selectedItems[{skuId,quantity,slotId}], addressId, regionId, boundId?, couponIds?, userNotes?, isFlashDelivery? — no amount fields. Injected totalAmount: 1, price: 1, discount: 99999, deliveryCharge: 0 were silently ignored: the persisted order reads back total 253 / delivery 20 (₹233 goods + ₹20 delivery), i.e. the server recomputed and the client numbers had no effect. The catalogue itself is cache-first with version-busted immutable URLs (region 1: 179 products, 140 available at v-28), so a stale local copy is display-only.
UX-01 PARTIAL Cache-first load with versioned URLs means a slow/offline start shows the last published catalogue rather than resetting state; catalogue reads are bounded at 90s (UX-02). Silent-cart-reset and private-data-flash at cold start are device observations → Phase 18.
UX-05, UX-07…UX-13, UX-17, UX-20 NOT RUN here Interactive/permission/accessibility cases — Phase 18 (device + web + admin surface).

Defects added

  1. user.order.getOrderById returns 500 where a 4xx is required — a non-existent id (999999), a malformed non-numeric id (abc, parseInt → NaN) and another user's order id all return 500 -32603 instead of 404/403. Routed via parseInt(orderId) straight into the query, so bad input becomes a server error. The information-disclosure side effect (full TRPCError stack with absolute local file paths in the response body) is observable in dev; verify whether the production error formatter strips it.
  2. Error responses carry full stack traces (dev-observable) — 400/500 bodies include stack with file:///Users/…/.wrangler/tmp/dev-…/worker.js frames. Confirm the production formatter suppresses this before release.
  3. No idempotency on order placement — an identical retry creates a second order (2709, 2710). Documented as the checklist instructs; a lost-response retry silently double-charges the customer.

46.1 Tally

855 catalogued · 60 SKIPPED · ~661 executed · ~134 not run · 46 defects.

Next: Phase 18 — the interactive half of UX-* (01, 05, 07…13, 17, 20) on device + web (Maestro's chromedriver exposes CDP, so Network.emulateNetworkConditions can drive the offline/slow legs), then the remaining device-UI checklists and the KV/failure-injection group.


47. Phase 18 — UX-* interactive half (iOS simulator, Expo Go, Maestro)

Device 5A64695E-F4D4-4E2E-90F3-EC3493A2B457 (iphone_6.5_in, iOS 18.6) via Maestro MCP. Device recipe additions: Maestro inline flows need appId: host.exp.Exponent and a --- separator; the cart/PDP are pushed routes with no tab bar (use the back arrow at 30,58); the Me tab hit area is narrow (373,826–390,840, a tap at 373,833 scrolls the page instead); the cart is only reachable once an address has been resolved.

ID Result Evidence
UX-01 FAIL (defect 47) Session persistence is correct — the JWT lives in SecureStore (StorageService via hooks/useJWT.ts) and survives a force-quit, and per-bound essentialConsts are cached (StorageServiceCasual, key essentialConstsKey(boundId)), so a cold start renders a cached shell instead of flashing private data or resetting to anonymous. But the cart is silently destroyed on the first region resolution after every restart (defect 47) — reproduced twice: cart with 1 item → simctl terminate → relaunch → address gate → cart reads "Your cart is empty / Start Shopping" with no warning.
UX-05 FAIL (defect 47) Force-quit with a populated cart → relaunch is otherwise coherent: auth recovers, the region is re-derived, no guard is permanently stuck, and the address gate is usable. The cart itself is lost (same root cause as UX-01).
UX-07 PASS With location revoked (simctl privacy … revoke location) a cold start shows the Delivery Address sheet with the specific, recoverable message "Location access is not granted. Allow location access for…" plus an Open location settings action, and still lists all saved addresses (Shafi Default Mbnr, Shafi JCL, Shafi Apl, E2E U1 A2, E2E NoCoords) and + Add a new address. Selecting a saved address restored the catalogue and the whole purchase flow remained usable — core purchasing does not depend on the permission.
UX-08 PASS Native back from the pushed cart route returned to the PDP ("Chicken Breast 500 g") with cart state intact (quantity 1 rendered on the PDP stepper) — correct entity, no loop. Back from Search Results returned to Home. Repeated tab navigation Home → Offers → Me landed on the correct screens each time (Offers: "Great prices on select items / Combos"; Me: "My Account / Manage your freshyo experience").
UX-10 PARTIAL Largest text size (simctl ui … content_size extra-extra-extra-large) re-laid out without clipping: cart and account labels still render in full (Delivery Address grew 132→172pt wide, + Add New 75→97pt) with no overlap or truncation on those screens. Landscape and small-display variants were not exercised. Separately, the floating CTA overlays list content — see defect 48.
UX-11 PARTIAL Good: the bottom tab bar exposes full assistive labels with position ("Home, tab, 1 of 5", "Offers, tab, 2 of 5"), the search field is named (home-search-input), and coupon-sheet rows + its confirm action are identified (coupon-dropdown-option-44, coupon-dropdown-done). Bad: several icon-only controls carry no accessible name at all — the cart line-item delete button (367,198), the back arrow (30,58) and the header overflow (…) are announced as unlabeled buttons, and the coupon rows expose an internal id rather than a human label. A screen-reader user cannot tell what those controls do.
UX-13 PASS Cart → "Offers & Coupons" opened the Available Coupons sheet (10+ options, coupon-dropdown-done) over a dimmed backdrop. With the sheet open, tapping the cart's line-item delete control behind the scrim did not delete the item and did not open the Remove Item dialog — the tap dismissed the sheet instead (sheetStillOpen=false, cartItemStillPresent=true, removeDialogShown=false), i.e. only the active dialog was interactive. The Delivery Address sheet's X closed it and returned to Home; no loop or wrong entity.
UX-16 PASS (partial render) Support/welcome content is bound-scoped backend data: essentialConsts{boundId} returns supportMobile, supportEmail, welcomeMessage, webViewHtml, isWebviewClosable, and bound→region resolves correctly (bounds 1, 2, 17 → region 1; region 2 → effectiveBound 3). On device the home header renders "Need help? Call 8688182552", matching supportMobile. The Me screen exposes SAVED INFORMATION, SUPPORT and a "Terms & Conditions — Read our legal policy" row, backed by app/(drawer)/(tabs)/me/terms/index.tsx + TermsAndConditionsContent. There is no About/Privacy/Help screen; welcome copy is delivered as web-view HTML. The Terms body itself was not rendered in-session (its row could not be tapped — defect 48).
UX-09, UX-12, UX-17, UX-20 NOT RUN Keyboard-over-control, contrast/focus-visibility, broken-image/long-name and cross-platform parity remain.

Verified-but-not-a-defect (recorded so it is not re-tested):

  • Carts are region-scoped by design: confirmRegionSwitch (src/lib/region-switch.ts) snapshots the outgoing region's carts (stashRegionCarts) and restores them when that region is visited again (restoreRegionCarts), and a same-region switch explicitly preserves them ("Switching to the region we are already in must not wipe the carts"). The region switch is also correctly gated on user confirmation. Only the null-previous-region path is broken.
  • The unavailable-quick-delivery dialog is well-formed: "1 Hr Delivery is not available at the moment. Please opt for a scheduled delivery." with a Go to Scheduled Delivery recovery action (it returns to the catalogue).
  • The Me tab is functional; two earlier taps missed its narrow hit area. No defect.

Defects added

  1. Cart is silently discarded on the first region resolution after an app restart — P1. confirmRegionSwitch clears both persisted carts whenever previousRegionId !== region.id, and previousRegionId comes from useRegionStore, which is deliberately not persisted ("at each launch the region is re-derived…"). So on every cold start selectedRegionId is null → isSameRegion is false → the stash-before-clear step is skipped (if (previousRegionId != null) is false, so the outgoing cart is never snapshotted) → clearLocalCart('regular') and clearLocalCart('flash') overwrite cart_items / flash_cart_items with [] → restoreRegionCarts(region.id) finds only a stale/empty snapshot. Net effect: an in-progress cart is destroyed by the act of restarting the app, with no warning and no recovery, because the storage keys are global (cart_items, flash_cart_items) rather than region-scoped. Directly violates UX-01's "no silent cart reset".
  2. Floating "1 Hr Delivery" CTA intercepts taps on the list rows beneath it — P2. On the Me screen the "Terms & Conditions" row (bounds ≈ y 748–832) could not be tapped: a tap inside that row was delivered to the floating quick-delivery bar and opened the "1 Hr Delivery Unavailable" dialog instead. The bar's tappable frame extends above its visible label, so the bottom-most row of a scrollable list is unreachable until the list is scrolled further. (Also why the Terms body could not be rendered in this session.)

47.1 Tally

855 catalogued · 60 SKIPPED · ~668 executed · ~127 not run · 48 defects.

Remaining: UX-09/12/17/20, the device-UI checklists (LOC-04/05/07/09/11/17/18/21/24, CART-12/13/17/20/21, CLS-13/14/15, CGRD-03/05/06, CHECK-03/04/12/19, CAT-06/08/10/11/13/15/16/18, FLASH-10…16, BANNER-02/13, GROUP-13, PROD-20, REVIEW-12, VENDOR-07/08/10/13/15, PROFILE-13/14/15, SAUTH-03/09/10/11/12, UPLOAD-14/15/16, ADDR-10/17/23/24/25, AUTH-13/15/17, MONEY-15/17, SLOT-15/16), the KV/failure-injection group (CACHE-09/11/12/14/16/20, CFG-14, STORE-15 (cleanup half), UPLOAD-12) and the environment-blocked items.


48. Phase 18-web — customer web app (apps/web-ui, port 4174) driven over CDP

The customer web app is a separate implementation from apps/user-ui (different cart store, keys and routes), so it is a genuine second platform surface rather than a port. Driven with a throwaway CDP client (/tmp/freshyo/cdp.mjs) against headless Chrome, using Runtime.evaluate, Network.emulateNetworkConditions and Input.dispatchKeyEvent.

Platform differences found while standing this up (recorded so they are not mistaken for defects):

  • Cart storage differs: native keys cart_items / flash_cart_items in SecureStore; web keys local-cart-regular / local-cart-flash in localStorage (StorageServiceCasual additionally prefixes web_ on web). Native getLocalCart is JSON.parse with no try/catch; web readCart is wrapped in try/catch.
  • Web persists the browsing region (freshyo-region in localStorage), which is why the web cart survives a browser refresh while the native cart does not survive a restart (defect 47 is native-only).
  • Web has both /me/terms and /me/about; native exposes only Terms.
  • Web sign-in is mobile-number + OTP only, so any authenticated web flow is out of scope under the "skip OTP" instruction (this blocks CART-21's submit leg, see below).
ID Result Evidence
UX-12 PASS (web) Keyboard-only traversal: 14/14 consecutive Tab stops landed on a named control (Get App link, then the Popular/Chicken/Meat/Fish/Vegetables/Dry fruits/Fruits category buttons…) and every stop had a visible focus indicator (outline: solid 2px, or a box-shadow ring). Actions are reachable and focus is visible without a mouse. Contrast was not measured.
UX-16 PARTIAL (web) Web defines dedicated legal routes (/me/terms, /me/about), but for a signed-out visitor both render the home shell with a "Please sign in" prompt rather than the legal text (231 chars of body text, no policy copy). Native, by contrast, exposes "Terms & Conditions — Read our legal policy" from the signed-in Me screen. If the terms are meant to be publicly readable, the web gate is wrong; flagged rather than graded.
UX-20 PARTIAL (parity) Same business outcome on both platforms for the same seeded cart: item price ₹233 on native and web; the free-delivery threshold is ₹300 on both and both compute the same remaining hint ("Add ₹67 more for free delivery"). Platform-only presentation difference: web defers the fee ("Delivery Fee — Calculated at checkout", cart total ₹233, plus a "FREE DELIVERY PROGRESS 78%" bar) while native already adds the ₹20 delivery line in the cart (₹233 + ₹20 = ₹253). Not a defect — recorded as the explicitly-requested platform difference. Admin native vs admin web was not exercised (admin web is not running).
CART-13 FAIL (defect 49) Corrupt JSON is handled on web ('{oops', {"a":1}, null, and an item with no skuId all degrade to an empty cart at ₹0 with zero console errors) but not on native, where getLocalCart calls JSON.parse with no guard. Worse, neither platform validates cart values: web renders and keeps checkout enabled for quantity: -5, quantity: "abc", quantity: 0, and quantity: 1e9 — the last producing a bill of ₹233,000,000,000. "Never order corrupted/unknown quantity" is not met.
CART-20 PASS (web) Navigating to /home/checkout?slotId=999999&couponIds=999999 (stale/malformed params) and returning to the cart left it byte-identical: item still present, total still ₹233, stale ids never echoed into the cart or bill — no wrong item substituted.
CART-21 PARTIAL / BLOCKED (OTP) With a cached cart, setting the browser fully offline still rendered the cached cart (Chicken Breast 500 g, ₹233, "Delivery Fee — Calculated at checkout") and no false order-success was possible. The submit leg could not be exercised: /home/checkout presents "Place Order (COD)" disabled while no delivery address is selected (correct guard), and selecting an address requires a signed-in session, which on web requires OTP — excluded from scope. What was verified: offline never claims success, and the unguarded case (no address) cannot be submitted at all.
UX-01 PASS (web) A plain browser refresh keeps the cart (item + ₹233 rendered after reload), because the region is persisted on web; this isolates defect 47 to the native region-resolution path.
CART-12, CART-17, CGRD-03/05/06 NOT RUN here Rapid-add/concurrency, cross-account cart retention and the cart-guard variants remain.

Defects added

  1. Cart items are never validated, and the native cart cannot survive a corrupt read — P1. Native getLocalCart (apps/user-ui/hooks/cart-query-hooks.tsx) parses stored JSON with no try/catch, so a truncated or corrupt cart_items value throws instead of recovering (web's readCart does degrade to []). Neither platform validates the values it reads: a negative, non-numeric or astronomically large quantity is accepted into the cart and the checkout stays enabled — quantity: 1e9 renders a ₹233,000,000,000 bill on web. The server does reject a non-positive quantity, so no such order can actually be created, but the client shows a payable-looking bill and an enabled flow for state the app should have discarded.

48.1 Tally

855 catalogued · 60 SKIPPED · ~673 executed · ~122 not run · 49 defects.


49. Phase 19 — cart guards (CGRD-*) and concurrent cart writes (CART-12, CART-20)

Method: froze a real slot (admin.slots.updateSlot on slot 2072, freezeTime set to 2020-01-01, original 2026-10-30T13:20:00Z backed up to /tmp/freshyo/slot-2072-backup.json and restored and re-verified afterwards), then read the behaviour on both platforms with a cart line bound to that slot. Flash delivery is disabled in this environment (isFlashDeliveryEnabled: false; flash charge ₹69, flash free threshold ₹500).

ID Result Evidence
CGRD-03 FAIL (defect 50) — both platforms Native: the line's slot closed and the cart showed no guard message and no disabled checkout — instead the slot label silently changed from "Fri, 30 Oct 7-8 PM" to "Thu, 05 Nov 7-8 PM" (the customer's chosen delivery date moved by six days with no notice). Cause: useReconcileCartSlots (apps/user-ui/hooks/cart-query-hooks.tsx) runs whenever slots load and, for any line whose slotId is no longer in productSlotsMap[skuId].slots, rewrites it to the earliest valid slot, saves, and invalidates the cart query — so the "The delivery slot for some items has closed. Please pick a new slot to continue." branch in cart-page.tsx is never reached. Web: no guard exists at all — the cart listed the line at ₹233 with "Proceed to Checkout" enabled, and /home/checkout rendered with no closed-slot warning (web only uses freezeTime for a "closing soon" display badge in home.index.tsx).
CGRD-05 PASS (code) Out-of-stock lines are deliberately excluded from the guard: hasAvailableItems is cartItems.some(item => !productSlotsMap[item.skuId]?.isOutOfStock), and both the closed-slot loop and the bill/total reducers start with if (productSlotsMap[item.skuId]?.isOutOfStock) return / .filter(item => !…isOutOfStock). So an OOS line neither blocks checkout on its own nor contributes to the closed-slot block — it is handled solely by the per-item OOS badge, exactly as the case requires.
CGRD-06 BLOCKED (environment) A flash cart cannot be produced: isFlashDeliveryEnabled is false for bound 1 and tapping the "1 Hr Delivery" surface yields "1 Hr Delivery is not available at the moment. Please opt for a scheduled delivery." Code confirms the intended behaviour (the slotCheck memo returns {blocked:false} before any closed-slot evaluation when the cart is a flash cart), but it could not be exercised at runtime.
CART-12 PASS Native, rapid 6× same-position +: quantity went 1 → 7 with the line total ₹1631 (= 7 × ₹233), i.e. every rapid write landed — no lost storage update. Rapid 12× − from 7: quantity clamped at 1 (never negative, item not deleted, total back to ₹233). Web: adding two different SKUs produced 2 lines with distinct ids (1792320791202, 1792320799005 — timestamp-derived, no collision), quantities 1,1, distinct slots. No duplicate local id and no non-positive quantity in either place.
CART-20 PARTIAL Web PASS: /home/checkout?slotId=999999&couponIds=999999 then back left the cart byte-identical (item present, ₹233, stale ids never applied) — no wrong item substituted. Native: the equivalent "stale slot" scenario is not surfaced and not reconciled explicitly — the reconciler rewrites the line silently (same mechanism as defect 50), which fails this case's "explicit reconciliation" requirement. Malformed URL-param style input does not exist natively (routes are internal).
CART-17 BLOCKED (OTP) Cross-account cart retention cannot be exercised: native sign-in is mobile + OTP and web sign-in is mobile + OTP only (verified on /login: a single "Enter your mobile number to receive a one-time password" field). OTP is excluded from scope by owner instruction. Recorded as blocked rather than guessed; note that on web the cart is plain localStorage (local-cart-regular) with no per-user key, so a second user on the same browser would inherit the previous user's lines — worth a dedicated check once an OTP-free login exists.

Environment restored: slot 2072 freezeTime back to 2026-10-30T13:20:00.000Z / deliveryTime 2026-10-30T13:30:00.000Z, isActive: true (re-read from the API to confirm).

Defects added

  1. A closed delivery slot is resolved silently instead of being surfaced, and the web cart has no closed-slot guard at all — P1. On native, useReconcileCartSlots rewrites any cart line whose slot is no longer valid to the earliest valid slot and persists it without any user-visible notice; observed live as a line moving from "Fri, 30 Oct 7-8 PM" to "Thu, 05 Nov 7-8 PM" the moment the original slot's freeze time passed. The customer can therefore be charged and shipped on a different day than the one they chose, and the "slot has closed — pick a new slot" guard (present in cart-page.tsx) can never fire. On web the situation is worse: no closed-slot check exists anywhere in the cart or checkout, so a cart bound to an expired slot stays fully actionable with "Proceed to Checkout" enabled.

49.1 Tally

855 catalogued · 60 SKIPPED · ~677 executed · ~118 not run · 50 defects.

Remaining: LOC-04/05/07/09/11/17/18/21/24, CHECK-03/04/12/19, CAT-06/08/10/11/13/15/16/18, FLASH-10…16, CLS-13/14/15, BANNER-02/13, GROUP-13, PROD-20, REVIEW-12, VENDOR-07/08/10/13/15, PROFILE-13/14/15, SAUTH-03/09/10/11/12, UPLOAD-14/15/16, ADDR-10/17/23/24/25, AUTH-13/15/17, MONEY-15/17, SLOT-15/16, UX-09/17/20-admin, the KV/failure-injection group and the environment-blocked items.


50. Phase 20 — slot integrity (SLOT-15/16), bound pricing (MONEY-15) and vendor fulfilment (VENDOR-07/08/10)

ID Result Evidence
MONEY-15 PASS Charge and threshold are correctly bound-scoped while the catalogue is not: bound 1 → delivery ₹20, free-delivery threshold ₹300; bound 2 (same region 1, a different saved address) → delivery ₹0, threshold ₹200. The regional catalogue versions are identical across both bounds (products_version_num: 28, availability_version_num: 87), i.e. switching the selected address changes only the bound economics and never the regional catalogue.
SLOT-15 PASS Committed capacity-full state is enforced, not silently bypassed: with admin.slots.updateSlotCapacity {slotId: 2076, isCapacityFull: true}, a checkout attempt for that slot returns 403 with "Selected delivery slot is at full capacity. Please choose another slot." and creates no order. Flag restored to false (200) afterwards.
SLOT-16 FAIL (defect 51) admin.slots.updateSlot applies partial writes and silently discards invalid related data. (a) Omitting the optional groupIds field wipes existing associations: slot 2085 went [17] → [] on an otherwise identical update (status 200). (b) A non-existent group id is accepted: groupIds: [5, 999999] → 200 with the result [5] — the bogus reference is dropped instead of rejected, and everything else in the same call is applied. (c) My own phase-19 restore of slot 2072 omitted groupIds and therefore cleared its [5,9,10,11,12] associations — the same destructive path, discovered by accident on live data. All affected slots were repaired and re-read: 2072 → [5,9,10,11,12], 2085 → [17], 2071 → [5,9,10,11,12].
VENDOR-10 PARTIAL PASS With a slot-bound snippet created for slot 2076 (skuIds: [2]), the demand payload exposes products[] with orderItemId, productId, productName, quantity, price, unit, subtotal, productSize, is_packaged, is_package_verified, plus slotInfo.sequence and matchedProducts. Four orders produced four distinct orderItemIds with the same SKU and a summed quantity of 4 — quantities are summed across orders, order items stay distinct, and nothing is double-counted. Limitation: each order held exactly one line of quantity 1, so the "same SKU several times in one order / split groups" variant was not exercised.
VENDOR-08 PASS A cancelled order is excluded from vendor/production demand. Order 2582 (status cancelled, still visible in the admin slot list with its line quantity) does not appear in the snippet demand at all: cancelledItemsInDemand: 0, and the four demand rows are the live orders (ORD2708…). Cancelled quantity is not counted.
VENDOR-07 FAIL (defect 52) — unauthenticated write admin.vendorSnippets.updateOrderItemPackaging mutated order state with no credentials at all: {orderItemId: 8766, is_packaged: true} sent with no Authorization header returned 200 {"success":true,"orderItemId":8766,"is_packaged":true}, and a re-read confirmed is_packaged: true. Restored to false (200). The source makes the cause explicit — the procedure is a publicProcedure and the guard is commented out: // const staffUserId = ctx.staffUser?.id; // if (!staffUserId) { throw new Error("Unauthorized"); }. It is a classic IDOR: orderItemIds are small sequential integers and the only incidental gate is that the order's slot happens to have a vendor snippet (my first attempt without one returned a 500 "No vendor snippet found for this order's slot" rather than 401/403, also leaking a stack trace).
FLASH-10…FLASH-16, MONEY-17 BLOCKED (environment) Flash/quick delivery is disabled for bound 1 (isFlashDeliveryEnabled: false; flash charge ₹69, flash free threshold ₹500), and tapping the "1 Hr Delivery" surface returns "1 Hr Delivery is not available at the moment. Please opt for a scheduled delivery." No flash cart, flash order or flash price can therefore be produced, which blocks the flash job/schedule boundary (FLASH-10/11), per-region flash price (FLASH-12), no-items path (FLASH-13), flash order history/filters (FLASH-14), flash cancellation + coupon restore (FLASH-15), flash deep links (FLASH-16) and flash-price-driven totals (MONEY-17). The flag is a region constant (isFlashDeliveryEnabled) and can be enabled for a dedicated flash run; the related schedule jobs are also out of scope by owner instruction.

Environment left clean: slots 2072 / 2071 / 2085 restored and re-read; slot 2076 isCapacityFull: false, freezeTime: 2026-11-05T13:20:00Z; vendor snippets E2EVENDOR2076/E2EVENDOR2077 deleted; order-item packaging restored to false; order 2582 left cancelled (intentional, used as evidence).

Defects added

  1. admin.slots.updateSlot is a destructive partial update — P2/P1. Optional related fields that are omitted are cleared rather than preserved (groupIds on slot 2085: [17] → []), so an admin editing a slot's timing can silently detach its product groups; and invalid references are accepted and silently dropped (groupIds: [5, 999999] → [5], HTTP 200) instead of being rejected, so the caller cannot tell that part of the write was discarded. Found via SLOT-16 and confirmed against live data.
  2. Unauthenticated order-item packaging mutation (IDOR) — P0. admin.vendorSnippets.updateOrderItemPackaging is a publicProcedure whose staff check is commented out, and it takes only a sequential integer orderItemId. A caller with no token can flip is_packaged on any order item whose slot has a vendor snippet — confirmed end-to-end (HTTP 200, state changed, then restored). This corrupts fulfilment/packaging state for real orders and is trivially enumerable; it should be authenticated (or gated behind the vendor snippet code/secret) and return 401/403, not 500.

50.1 Tally

855 catalogued · 60 SKIPPED · ~683 executed · ~112 not run · 52 defects (plus 8 flash cases and the OTP-gated items recorded as environment/scope-blocked).


51. Phase 21 — staff session lifetime (SAUTH-03/09/10/11) and region-scoped coupons (CLS-15)

Token inspection: all three identities carry plain 3-part JWTs with minimal claims — user {userId, exp}, staff {staffId, name, exp}, superadmin {identityType, superadminId, username, exp}. Staff/superadmin exp is 1794894135 ≈ 2026-11-17 and the user token 1800078136 ≈ 2027-01-14, i.e. sessions are issued with a multi-month (≈13-month) lifetime and contain no role or region claim (region is resolved per request).

ID Result Evidence
SAUTH-11 FAIL (defect 53) Logout cannot invalidate anything. There is no logout procedure anywhere in the API: admin.auth.logout, admin.staffUser.logout, superadmin.auth.logout and user.auth.logout all return 404 (no such procedure), and inspection of the backend finds no blacklist / revocation list / token-version field. A staff token captured before "logging out" therefore keeps returning 200 on protected admin routes indefinitely (until its multi-month exp). Back-history/direct-link protection is consequently client-side only.
SAUTH-09 PASS (admin surface) Storage loss/corruption is handled without crashes or privileged rendering: garbage, an unparseable a.b.c, a tampered real staff token and an empty string all return 401 on the protected admin route (never 500), as does sending no token at all. The superadmin surface could not be graded — my probe used a non-existent procedure path (superadmin.staff.getAll → 404 for every caller), which is a harness error and must not be read as a privilege result; recorded as untested rather than passed.
SAUTH-03 PARTIAL Regional isolation holds: the region-1 staff session lists exactly its 20 region-1 slots, and asking for a region-2 slot's orders (slotId: 2078) returns 0 orders (200, empty) — no cross-region leakage. The "session persists only while valid" half is undermined by defect 53: with no revocation and a multi-month exp, a session remains valid far beyond any logout, and clearing prior regional/private data is purely a client-side concern.
SAUTH-10 PARTIAL (blocked on shape) The double-login probe could not be executed — admin.staffUser.login {username, password} returned 400 and the correct input shape was not resolved within this session. The underlying behaviour is nonetheless determined by defect 53: because no revocation exists, a second login cannot invalidate the first session and a late/duplicate response cannot be prevented from re-establishing a usable session; both would remain simultaneously valid.
CLS-15 FAIL (extends defect 35) user.coupon.getEligible returns an identical 43-coupon list for region 1 and region 2 (onlyInRegion1: [], regionMismatchFiltered: false), and every row carries disabled: null / reason: null. There is no per-region filtering and no "disabled + reason" metadata in the payload, so the app has nothing with which to move region-mismatched (or otherwise ineligible) coupons into a disabled state after a region change — the same root cause as defect 35 (ineligible coupons are hidden client-side rather than shown disabled with a reason). Flagged for product confirmation of whether coupons are intended to be global; if they are, this case becomes N/A by design.

Defects added

  1. Sessions cannot be terminated: there is no logout/revocation path, and tokens live for months — P0/P1. No API exposes a logout or token-revocation operation, no blacklist/version store exists, and the issued JWTs carry only an identity claim plus a exp that is ~13 months away (staff 2026-11-17, user 2027-01-14). A stolen staff or superadmin token therefore grants access for the remainder of that window even after the user logs out, changes their password, or is deactivated. Logout is a client-side token deletion only.

51.1 Tally

855 catalogued · 60 SKIPPED · ~688 executed · ~107 not run · 53 defects.

Still outstanding: AUTH-13/15/17, SAUTH-10/12, UPLOAD-14/15/16, PROFILE-13/14, CLS-13/14, CHECK-03/04/12/19, CAT-06/08/10/11/13/15/16/18, LOC-04/05/07/09/11/17/18/21/24, ADDR-10/17/23/24/25, BANNER-02/13, GROUP-13, PROD-20, REVIEW-12, UX-09/17, the flash group (environment-blocked), the KV/failure-injection group, and the OTP/admin-web items blocked by scope or environment.


52. Phase 22–25 — Flash delivery enabled on bound 1: FLASH-10/11/12/13/14/15 + MONEY-17

How flash was enabled. isFlashDeliveryEnabled is bound-scoped (region_bound_consts), not region-scoped (order.ts reads it through getRegionSettingsForBound(regionId, boundId) and the cron flips it per bound). It was switched on with the ordinary admin mutation admin.region.updateBoundSettings { boundId: 1, settings: [{ key: 'isFlashDeliveryEnabled', value: 'true' }] } (200), after which common.essentialConsts { boundId: 1 } published isFlashDeliveryEnabled: true while bounds 2 and 3 stayed false — the enablement did not leak to any other bound or region. No admin account had to be created: the existing region-1 staff session (e2eadminA) had the scope to write the bound constant.

ID Result Evidence
FLASH-10 PASS Enable/disable produces the correct regional setting and it publishes to clients: essentialConsts {boundId:1} went false → true immediately after the write, with flashDeliveryCharge: 69 / flashFreeDeliveryThreshold: 500 present, and essentialConsts {boundId:2} / {boundId:3} remained false. The toggle is bound-granular and observable through the same read the customer app uses. (The cron's own clock handling is out of scope by owner instruction.)
FLASH-11 PARTIAL The "no unexpected permanently enabled region" half is verified — flashing bound 1 left bounds 2/3 and the whole of region 2 at false, and the flag is a plain bound constant so it cannot be re-applied to another bound by a region-scoped caller. The exact schedule-boundary / midnight / timezone-change timing half needs the sanctioned staging clock harness (JOB-*, excluded by owner instruction), so it was not executed.
FLASH-12 PASS With flashPrice: 150 set on sku 2 (regular price 233) via admin.product.updateProductPrices, a flash order charged 150, not 233 — flash pricing is per-region/global-item and applied server-side. Enforcement is correctly per bound, not per region: the identical flash cart with the same region's bound-2 address returned 403 "Flash delivery is currently unavailable. Please opt for scheduled delivery.", as did a region-2 address (bound 3). The per-SKU eligibility flag is enforced too: isFlashAvailable: false on the same SKU turned the flash order into 400 "Product 2 is not available for flash delivery", with a clear, specific message (flag restored afterwards).
MONEY-17 PASS Flash totals are driven by the flash constants: one unit (subtotal 150, below the flash free-delivery threshold 500) → total 219 = 150 + 69 flash charge; four units (600, at/above 500) → total 600, deliveryCharge 0. The regular path is unaffected — the same item ordered on a scheduled slot charged 233 + 20 = 253 with isFlashDelivery: false, so the flash price never leaks into the scheduled flow.
FLASH-13 FAIL (defect 54) Two of three invalid paths fail safely — an out-of-stock flash item returns 400 "Product 162 is unavailable" and quantity: 0 returns a 400 zod error, and no order row is created in any of them (history stayed at the same count, no empty-success order). But an empty selectedItems array is not validated: placeOrder { selectedItems: [], isFlashDelivery: true } reaches the database and returns 500 with the raw internal message "values() must be called with at least one value" — a 4xx validation error and an internal leak where a clean "your cart is empty" path is required.
FLASH-14 PASS Flash orders carry accurate status everywhere and never invent a scheduled date. Customer history shows them with isFlashDelivery: true, the correct regionId and slotId: null / deliveryTime: null (no bogus scheduled slot), and user.order.getOrderById returns isFlashDelivery: true on the detail. Admin visibility is also present, contrary to the concern raised mid-run: admin.order.getAll exposes an isFlashDelivery column and lists the flash orders (2713, 2714, 2716, 2717 all present), and admin.order.getOrderDetails(2713) returns isFlashDelivery: true alongside slotInfo, couponData, discountAmount and orderStatus.
FLASH-15 PASS The flash COD lifecycle matches the scheduled group's invariants. A flash order with coupon 147 → discountAmount 20, total 199 (150 − 20 + 69); cancelOrder { id, reason } → 200 "Order cancelled successfully" and the order reads back as cancelled; the same coupon is immediately reusable on a fresh flash order (order 2717, discount 20, total 199). Cancelling restores coupon use and does not strand the discount.

Defects added

  1. Empty cart is not validated — flash order placement returns 500 and leaks an internal message — P2. placeOrder accepts selectedItems: [] (the zod array has no .min(1)), passes it to the data layer, and the request dies with 500 "values() must be called with at least one value" (Drizzle) instead of a 4xx. The out-of-stock and zero-quantity paths are guarded correctly, so this is a missing minimum-length check on the item array plus a raw internal error reaching the client.
  2. Flash (slot-less) orders cannot reach the vendor production/packing views — P2, flagged for product confirmation. Flash orders are stored with slotId: null by design, and the vendor demand endpoint (admin.vendorSnippets.getOrdersBySnippetAndSlot) is keyed on slotId, so a slot-less order can never match any vendor snippet/slot query (getSlotOrders {slotId:'2076'} → 111 orders, 0 flash). Fulfilment for flash therefore depends entirely on the unrestricted admin.order.getAll view; if the intended flash packing flow is the snippet/slot screen, those orders will never be picked up. Recorded as a coverage gap to confirm rather than a proven functional break, since getAll does show them.

State left behind (intentional, for the device pass): bound 1 isFlashDeliveryEnabled: true; sku 2 flashPrice: 150, isFlashAvailable: true. Test flash orders 2713/2714/2716/2717 exist for user 388; 2716 is cancelled on purpose (FLASH-15 evidence). Both will be reverted after the FLASH-16 UI pass.

52.1 Tally

855 catalogued · 60 SKIPPED · ~695 executed · ~100 not run · 55 defects. Flash is now unblocked: FLASH-10/12/13/14/15 and MONEY-17 executed; FLASH-11 partially executed; FLASH-16 (flash cart/deep link on iOS/Android/web) remains and is now runnable.


53. Phase 26 — FLASH-16 on iOS (flash cart, pricing surface, back path, cart isolation)

Device: 5A64695E-F4D4-4E2E-90F3-EC3493A2B457 (iphone_6.5_in, iOS 18.6), user app via Expo Go (exp://127.0.0.1:8081), signed in as U1 with the region-1/bound-1 address Mbnr. Flash was left enabled on bound 1 for this pass. Screenshots: /tmp/freshyo/shots/f07_flashtab.png, f10_flashcart.png, f13_back.png, f15_home_verify.png.

Step Observed Verdict
Flash entry point The bottom bar now offers "1 Hr Delivery" as a real tab (previously a "not available" toast), and tapping it opens the flash store rather than erroring. PASS
Flash store disclosure Store header reads "Delivery in within 1 hour" with a persistent notice: "1 Hr Delivery Notice — Prices may differ for 1 Hr Delivery and not all products are available for flash delivery". PASS (good, explicit disclosure)
Flash pricing in the list Chicken Breast 500 g renders ₹150 struck through against ₹239 — the flash price written via updateProductPrices, i.e. the list price comes from flashPrice, not price. PASS
Flash PDP The flash PDP shows ₹233 / 0.5Kg ₹239 3% OFF and 1 Hr Delivery: ₹150 / 0.5Kg, with a dual CTA: "Add to Cart" (scheduled) beside "Get in 1 Hour" (flash), and the regular "Available Slots" list retained below. Both flows are reachable from one screen without ambiguity. PASS
Flash cart Title "1 Hr Delivery Cart"; item Chicken Breast 500 g 0.5Kg ×1 ₹150; Bill Details: Item Total ₹150, Products discount ₹89, Delivery Fee ₹69, "Add products worth ₹350 for free delivery", To Pay ₹219" — the flash fee and the ₹500 flash free-delivery threshold are both surfaced, and ₹219 reproduces the API's 150 + 69 exactly. The cart offers address / coupons / delivery instructions and no slot picker, so the flash route correctly never asks for a scheduled slot. PASS
Back path Back from the flash cart returns to the flash PDP (not to a regular store or the home feed), and the flash bar updates in place to ₹150 • 1 Item · ₹350 more for FREE Delivery. Navigation is coherent. PASS
Cart isolation Home keeps its own regular bar at ₹233 • 1 Item · ₹67 more for FREE Delivery while the flash cart holds a separate ₹150 line — the two carts are genuinely independent and the flash add did not contaminate the scheduled cart. PASS
Flash order in the customer feed Home shows "UPCOMING ORDER · FLASH · #ORD2717 · 1 item • ₹199 · 30-Min Delivery" with a Placed/Packed/Delivered tracker — a flash order is labelled as flash and shows a 30-minute promise instead of a bogus scheduled date. PASS
Deep link openLink exp://127.0.0.1:8081 launched the project correctly after Expo Go had dropped back to its project list (the location permission prompt re-appeared and was granted). The generic project deep link works; there is no flash-specific deep link to test — the flash store has no route of its own, so "flash deep link" resolves to the app entry plus a tab tap. PASS (entry) / N-A (flash-specific link)

FLASH-16 = PASS on iOS. Web and Android were not exercised; the web app does carry a separate local-cart-flash key, so the parity check there remains open (rolled into the web-parity backlog with UX-20).

Environment left as-is for continuing work: bound 1 isFlashDeliveryEnabled: true (revert with admin.region.updateBoundSettings {boundId:1, settings:[{key:'isFlashDeliveryEnabled', value:'false'}]}); sku 2 at flashPrice: 150 / isFlashAvailable: true (revert via admin.product.updateProductPrices). Device is on the Home tab with a regular cart of ₹233 and a separate flash cart of ₹150.

53.1 Tally

855 catalogued · 60 SKIPPED · ~696 executed · ~99 not run · 55 defects. The flash group is now closed except FLASH-11 (needs the sanctioned clock harness): FLASH-10/12/13/14/15/16 and MONEY-17 executed, FLASH-13 failing on the empty-cart 500 (defect 54).


54. Phase 27 — region/location resolution (LOC-04/05/07/09/11/17/21/24) and address flows (ADDR-10/17/24)

Primary sources: apps/user-ui/src/hooks/useRegion.ts, src/lib/region-switch.ts, src/store/locationStore.ts, src/store/centralProductStore.ts, components/CheckoutAddressSelector.tsx, src/components/AddressForm.tsx, src/components/location/LocationFallbackFlow.tsx; plus live device evidence on 5A64695E-F4D4-4E2E-90F3-EC3493A2B457.

ID Result Evidence
LOC-04 PASS Two independent guards make a late GPS answer unable to undo a manual choice. (1) useRegion carries a module-level launch anchor and refuses to apply the fix when the user already moved: const userChangedRegion = startupLaunchRegionId !== undefined && startupLaunchRegionId !== regionId; if (userChangedRegion) return // Respect a manual pick made before the fix resolved. (2) The location layer itself is last-write-wins: locationStore.refresh takes const token = ++activeToken and every await resumes with if (token !== activeToken) return, so a superseded refresh can never publish stale coordinates.
LOC-05 PASS Location is acquired as a single first fix, not a watcher — Location.getCurrentPositionAsync({ accuracy: Balanced }) wrapped in withTimeout(...). There is no watchPositionAsync and no continuous re-resolution: region adoption is gated by startupResolved, and the one-shot is enforced by module-level startupCheckDone / startupLaunchRegionId. Moving A→B while the app stays open therefore cannot trigger a continuous auto-switch (and so cannot repeatedly clear carts).
LOC-07 PASS (structural; the spec's literal mechanism is absent) Rapid A→B→A cannot mix prices, because every region's catalogue is a distinct URL and therefore a distinct query key — .../regions/${regionId}/v-${productsVersionNum}/products.json, regions/${regionId}/slots/..., regions/${regionId}/av-${availabilityVersionNum}/... — and confirmRegionSwitch additionally removeQueries all-products/stores/slots/availability/store-with-products and empties the central product/slot stores (setProducts([])). A delayed response for region A can only land under A's key, which nothing renders while B is selected. Caveat: there is no explicit request-generation counter on the region path (the only epoch guard is activeToken in the location layer), so the case passes by equivalent mechanism rather than as written; proving it under an injected delay would need network throttling, which was not available.
LOC-09 PARTIAL The one-shot half is correct and the adoption half is now device-proven non-destructive: a full cold start (stopApp → relaunch) with a ₹233 cart and a ₹150 flash cart preserved both carts (₹233 • 1 Item · ₹67 more for FREE Delivery still on Home afterwards). The anchored decision follows the documented rule (default address anchors; a location resolving into the default's region or to no serviceable region keeps the default; a location in another serviceable region asks the user to choose via clearRegion()). But the mismatch branch performs a silent, destructive switch — see the defect-47 correction below — which is the part that fails.
LOC-21 PASS "Cold start adopts the first region while a local cart has items → adoption uses the non-clearing path" is exactly what the code does — when there is no stored region it calls setRegion(resolved.region, bound) under the comment "First region of this launch — adopt it without clearing the cart" — and the device confirmed it: after a genuine cold start the local cart survived intact (₹233 • 1 Item) alongside the separate flash cart.
LOC-24 PASS The region-gate/fallback screen explicitly avoids router calls when no navigator is mounted: LocationFallbackFlow.tsx carries the comment "cannot router.push to /login here — render the login screen in place", i.e. the "go to another route" action is an inline screen/state change.
LOC-17 PASS The supported path only: standard expo-location (requestForegroundPermissionsAsync, hasServicesEnabledAsync, getCurrentPositionAsync), with distinct denied / services-off / unavailable / error handling, a first-fix timeout so a hang cannot strand the spinner, and no Platform/isDevice/emulator-only branching. Mock/emulator location is handled by the same code path as a physical device.
LOC-11 PASS An explicit foreign-region address tap raises a real confirmation before anything is cleared: Alert.alert('Switch region?', 'This address is in ${targetRegion.name}. Switching will clear your entire cart and take you home.', [ { text: 'Cancel', style: 'cancel' }, { text: 'Switch & clear cart', style: 'destructive', onPress: … } ]), and confirmRegionSwitch is called only inside that destructive handler, after which it navigates home. An address whose region is not serviceable gets its own 'Unavailable region' alert instead.
ADDR-17 PASS Same code path as LOC-11 (shared CheckoutAddressSelector, and the flash-side QuickDeliveryAddressSelector imports the same helper): Cancel leaves the cart, slot and selected address untouched, while Switch & clear cart runs the full compatible-state reset (confirmRegionSwitch clears both local carts, drops the foreign address, resets checkout/quick-delivery selections and invalidates the region-scoped caches).
ADDR-10 PASS Coordinates are mandatory: the form marks "Delivery Location *", and AddressForm keeps address-submit disabled until a location is attached (the app's own component test asserts expect(screen.getByTestId('address-submit')).toBeDisabled(), and that the hint "Attach a location to add address" appears once the first field has been blurred). On device the form opened with the location already attached — "Current Location Attached 📍 16.74890, 77.98560" — and the source-aware heading is present, with "Choose Another Location in Map" available. (Component tests were not executed, per the repo instruction; they are cited only as implementation evidence.)
ADDR-24 PASS On device the City * dropdown lists the serviceable regions — Mahabubnagar plus the E2E regions (E2E GP Region 6685, E2E MP 8669, E2E R16 6414, …) — with the current browsing region pre-selected (Mahabubnagar), and the State field reads Telangana. Submission is gated on the location as per ADDR-10.

Defect 47 — correction (important)

The earlier write-up of defect 47 attributed the cart loss to the adoption path ("regionStore isn't persisted and confirmRegionSwitch clears carts"). That mechanism is wrong, and this pass disproves it: when there is no stored region the code takes the non-clearing branch — if (regionId == null) { // First region of this launch — adopt it without clearing the cart\n setRegion(region, …) } — and a real cold start preserved both carts. The loss occurs one branch lower, in the mismatch case:

} else if (region.id !== regionId) {
  void confirmRegionSwitch(region, queryClient, defaultAddress?.boundId ?? null)
}

When the region anchored at startup (from the default address, or from GPS when the address matches) differs from the restored browsing region, startup silently calls confirmRegionSwitch, which clears both local carts — with no dialog, despite that function's own contract: "NOTE: callers must obtain a user confirmation before invoking this." The address-selector path honours the contract (LOC-11's Alert); the startup path does not. That is the defect: an automatic, unconfirmed, cart-destroying region switch at launch, and it is exactly how it was first observed — the app had previously adopted another region (via GPS), so on the next launch the persisted region and the anchored region disagreed and the carts were cleared without asking.

54.1 Tally

855 catalogued · 60 SKIPPED · ~707 executed (~89%) · ~88 not run · 55 defects.

Still open in these groups: LOC-18 (region change while a submit is pending — needs a controllable in-flight request), ADDR-23 (BottomDialog deletion error/keyboard/scroll; note CheckoutAddressSelector now uses RawBottomDialog with the old BottomDialog commented out, which is worth a look for exactly that case), ADDR-25 (blocked: needs signed-out drafting then login, i.e. the OTP flow, out of scope by owner instruction).


55. Phase 28 — AUTH-15 (post-login redirect target validation)

Code path: components/LoginWall.tsx writes constants.AUTH_REDIRECT_KEY (auth_redirect_state), and src/contexts/AuthContext.tsx → handlePostLoginRedirect() replays it after a successful login.

ID Result Evidence
AUTH-15 PARTIAL — latent, not reachable today "Navigation stays within allowed customer destinations" is not enforced. The consumer performs only three checks — the value exists, it parses as JSON, and it is not older than 24 hours — then navigates unconditionally: let targetPath = redirectState.targetUrl; … router.replace(targetPath as any). There is no scheme check, no startsWith('/'), no route allow-list, and the as any cast defeats the type system as well. However, I could not construct a reachable exploit with the current code: the only writer is LoginWall, which stores usePathname() — an internal app path — and the login screen accepts no redirect/returnUrl query parameter (no useLocalSearchParams usage in app/(auth)), so nothing user- or URL-controlled reaches targetUrl. The exposure is therefore (a) client-storage tampering (an attacker able to write web_auth_redirect_state in web localStorage) and (b) any future caller that populates the key from a deep link or query param. Recommendation: validate before navigating (targetUrl.startsWith('/') plus an allow-list of known routes), reject absolute/javascript: values, and remove the as any.

55.1 Tally

855 catalogued · 60 SKIPPED · ~708 executed (~89%) · ~87 not run · 55 defects.


56. Phase 29 — catalogue integrity, auth and profile caches (CAT-10/11/13/18, AUTH-13, PROFILE-15)

Sources: apps/user-ui/src/hooks/prominent-api-hooks.ts, src/trpc-client.ts, src/lib/fetch-json.ts, src/contexts/AuthContext.tsx, app/(auth)/login.tsx, app/(drawer)/(tabs)/home/index.tsx.

ID Result Evidence
CAT-10 FAIL — defect 56 (P0) Availability is a separate fetch whose failure state is silently discarded, yet its data is treated as optional. useAllProducts() does const { data: availabilityData } = useAvailability() — only data, never isLoading/error — and returns { ...productsQuery, data: mergedData }, so the hook's isLoading/error describe the products leg only. The merge then runs unconditionally over every product: price: availability ? Number(availability.price) : 0, isOutOfStock: availability?.isOutOfStock ?? false, isSuspended: availability?.isSuspended ?? false. Whenever availability is missing, failed (404 on the av-<version> asset) or merely slower than products, every card renders ₹0 and orderable/in-stock, with no error and no retry affordance — precisely the "orderable false zero price / false in-stock state" this P0 case forbids. It also hides a genuine availability outage from view. Impact is bounded by the server recomputing order totals, but the customer sees and can act on a fabricated price. Fix: fail closed (price: availability ? … : null, isOutOfStock: availability?.isOutOfStock ?? true), propagate the availability query's loading/error state, and hold the list until availability resolves.
CAT-11 PASS (by equivalent mechanism — same caveat as LOC-07) Every product read is keyed by a region-and-version-scoped URL (.../regions/${regionId}/v-${productsVersionNum}/products.json), and useAllProducts sets queryKey: ['all-products', version] where version is that URL. A late response for region A therefore lands only in A's cache entry and cannot populate B's; the search results screen does no fetch of its own (it filters the already-region-scoped productsData client-side), so there is no in-flight search response that could go stale and restore foreign products. As with LOC-07, isolation comes from key scoping rather than an explicit request-generation counter.
CAT-13 PASS Detail views read the same merged, version-keyed data, so a price/feature edit publishes new products_version_num / availability_version_num values, producing a new URL and hence a new query key; the old cached entry can no longer be served. Phase 15 already verified the propagation half (edits bump the version and the app refetches). The customer's displayed price is always the live merged quote, and the historical price survives only inside placed orders (order snapshots), never as a live quote — marketPrice is explicitly coerced or null, and there is no second price source. Propagation is bounded by staleTime: 60000 plus refetch-on-focus, which is the "after refresh" the case allows.
CAT-18 PASS Category/tag filter selection is held as a numeric ID, never a label: const [selectedTagId, setSelectedTagId] = useState<number | null>(null) and const activeTagId = selectedTagId ?? dashboardTags[0]?.id ?? null. Matching is therefore by ID, so numeric-looking product names, case-normalized duplicates or reordered labels cannot collide with, or be mistaken for, an ID.
AUTH-13 PASS No duplicate submit and no permanent spinner. The submit control is disabled while any auth leg is in flight — disabled={isLoading || sendOtpMutation.isPending || verifyOtpMutation.isPending || loginMutation.isPending} — and switches to a spinner label over the same condition; app/(auth)/_layout.tsx additionally gates on isLoading. Crucially the network leg is bounded: trpc-client.ts installs a wrapping fetch that gives every tRPC call a lifetime, const controller = new AbortController(); const timer = setTimeout(() => controller.abort(), JSON_FETCH_TIMEOUT_MS), with the comment "a request that never settles would keep its loading state alive indefinitely", plus abort forwarding and 401 handling; the catalogue helper fetchJson is bounded the same way. A navigation away or a backgrounded app therefore cannot strand the button. Residual (theoretical): isPending only turns true once the mutation starts, so two taps inside one frame could both dispatch — mitigated by single-use OTP tokens and server-side session issuance.
PROFILE-15 PASS Logout wipes private caches wholesale — AuthContext.logout() calls queryClient.clear() on both the success and failure paths — so no previous account's profile/cart/order data can flash after a re-login. Region switches additionally removeQueries for all-products, stores, slots, availability and store-with-products.

56.1 Tally

855 catalogued · 60 SKIPPED · ~714 executed (~89%) · ~81 not run · 56 defects.


57. Phase 30 — coupon sheet semantics (CLS-13, CLS-14) and withdrawal of defect 35

Sources: apps/user-ui/components/cart-page.tsx (coupon list, eligibility, stacking, applied-contribution and selection-toggle logic) plus a live device pass on the cart's coupon sheet (5A64695E-F4D4-4E2E-90F3-EC3493A2B457).

ID Result Evidence
CLS-13 PASS The requirement is implemented twice over. (1) Contribution display: the file carries the explicit intent "A coupon that is already applied shows its own current contribution", and couponDiscounts builds Record<couponId, discount> from computeCouponStack(cartLines, selectedCoupons) — "Coupons stack in the order they were selected, so a later coupon only sees what the earlier ones left behind (this must match the backend's computeCartPricing)" — so each applied coupon is labelled with the amount it currently removes, not a blended figure. (2) Idempotency: the sheet is a toggle that reports the whole new list, and the reducer diffs it — const added = next.find(id => !prev.includes(id)); const removed = prev.find(id => !next.includes(id)); if (added == null || removed != null) return next;. Re-selecting an already-applied coupon yields no added id, so it takes the early return and the selection is unchanged — no duplicate entry, no double discount. Discounts are keyed by coupon id in a record, so duplication is structurally impossible.
CLS-14 PASS Both halves hold. Re-sorting: eligibleCoupons sorts "Applicable coupons first, disabled ones at the end (stable within groups)" via mapped.sort((a, b) => Number(b.isEligible) - Number(a.isEligible)). Reasons recomputing: eligibility is derived per render inside a useMemo over the live cart — const { isEligible, reason: ineligibilityReason } = evaluateCouponEligibility(...) — so adding or removing a coupon re-evaluates every remaining row rather than reusing a stale verdict; the list is deliberately kept whole ("Ineligible ones are kept, flagged with the reason, and sorted to the end") and the removal path is present ("Remove coupons"). Confirmed on device: the cart sheet rendered BEN10 → "Available" · "30% off on orders above ₹200" · "Used: 1/2" · Apply, BEN11 → "Used" · "Used: 1/1" · a disabled "Unavailable" action, and SECRET72891800EO2E → "Available" · Apply — i.e. a live, correct mixture of eligible and ineligible rows, each with its reason.

Defect 35 — WITHDRAWN (my measurement error)

Defect 35 is withdrawn. §41 reported that the coupon sheet "rendered only 8 applicable rows, no disabled rows", and CLS-02…CLS-06 were failed on that basis. The current evidence contradicts it:

  • cart-page.tsx deliberately keeps ineligible coupons, flags them with ineligibilityReason, and sorts them to the end (lines 382-425) — there is no filter that would drop them.
  • On device the cart's coupon sheet rendered an ineligible coupon with its reason and a disabled action: BEN11 → badge "Used", detail "Used: 1/1", action "Unavailable".

The cause of the error was my own instrumentation, and it is worth recording as a method warning: inspect_screen returns only the nodes currently in the view hierarchy/viewport. I counted the rows the dump happened to contain (8 visible) and concluded the rest were absent, when in fact the remaining rows — including every disabled one — were simply below the fold of a scrollable sheet. A count from a screen dump is a viewport count, not a list count; any "the app does not show X" conclusion must be backed by scrolling to the end, or by the API/response, before it is filed.

Consequences for the report: defect 35 is struck. CLS-02, CLS-03, CLS-04, CLS-05 and CLS-06 lose their only supporting evidence and are re-opened as NOT VERIFIED (the underlying API observation — user.coupon.getEligible { regionId: 1 } returning 33 coupons including the disabled-class fixtures — remains true, but it is expected behaviour once the client is known to render ineligible rows with reasons rather than hiding them, so it is not by itself a defect). CLS-01, CLS-11, CLS-12 were already PASS and are unaffected.

Harness note (not an app defect): tapping the small "Apply" label with Maestro did not fire the action on iOS — the tap is registered against the text node, and the sheet did not change state — so the apply/remove round-trip could not be driven through the UI. CLS-13/CLS-14 were therefore decided from the selector/stack logic above together with the rendered eligible/disabled rows. The cart was left with no coupon applied (₹233 unchanged).

57.1 Tally

855 catalogued · 60 SKIPPED · ~716 executed (~90%) · ~79 not run · 55 defects (defect 35 withdrawn).


58. Phase 31 — cache publication / client cache / bound-KV integrity (CACHE-09/11/12/14/16/20, CFG-14)

Sources: apps/backend/src/lib/cloud_cache.ts, apps/backend/src/lib/const-store.ts, apps/user-ui/utils/queryClient.ts, apps/user-ui/src/trpc-client.ts, src/lib/fetch-json.ts, src/hooks/prominent-api-hooks.ts; plus a live bound-KV corruption/removal test via common.essentialConsts + superadmin.regions.updateBoundSettings (/tmp/freshyo/phase26.mjs, phase26b.mjs).

ID Result Evidence
CACHE-09 PARTIAL (structural + adjacent live evidence) Discovery/gen KV is rebuilt per region by a single awaited mirror refresh at the end of every generation — await refreshGenKvForRegion(regionId) with the comment "Single awaited mirror refresh for the region (all regional counters bumped above)" and, for the all-region sweep, "generates cache files for EVERY region (sequentially to avoid D1 version-counter races)" — so a missing or stale entry is rebuilt for the region that published, and the sequential sweep avoids cross-region races. The bound-level equivalent ("no other bound's config reused") is now proven live — see CFG-14 below. Caveat: the discovery-KV blob itself was not deleted in this run, so the rebuild half rests on the code path plus CFG-14's evidence rather than a direct corruption test.
CACHE-11 PASS (with a caveat) A failed generation cannot be reported as complete. createRegionCacheFiles writes every artefact with await Promise.all([...]) over createProductsFileInternal, createEssentialConstsFileInternal, createStoresFileInternal, createSlotsCacheFile, createAvailabilityCacheFile, createBannersFileInternal, createAllStoresFilesInternal, then await getStoresSummary(regionId) and await refreshGenKvForRegion(regionId) — any throwing write rejects the whole function, so no success value (RegionCacheFilesResult) is ever returned for a partial run, and the awaited mirror refresh is not reached. Caveat (ordered-bump design): the version is bumped first (const cacheVersion = await incrementRegionCacheVersion(regionId)) and the consts file is written in the same unordered batch, so a mid-batch failure can leave the new version's consts published while another artefact is missing. Readers then hit a 404 for that artefact — surfaced as a query error (recoverable) for products, and silently (defect 56) for availability — until the next generation repairs it. Nothing is falsely claimed complete; the residual issue is the window, not misreporting.
CACHE-12 PASS Purge/provider failures produce explicit, non-fatal evidence and never an eternal spinner. Purge is retried and then logged, not swallowed silently: try { await retryWithExponentialBackoff(() => clearUrlCache(urls)); … } catch (error) { console.error('Failed to purge cache for region X files after 3 retries', error) } — and clearUrlCache itself returns { success: false, errors } (never throws) both when Cloudflare credentials are absent ("Cloudflare credentials not configured, skipping cache clear") and on API/network error, surfacing the provider's messages. Continuing after a failed purge is correct here: the artefact is already written and the purge only evicts the CDN edge copy, which expires on its own and is re-published by the next generation (eventual repair). On the client side, "no eternal UI loading" is enforced by the two request caps (tRPC wrapper + fetchJson, both 90s, abort-aware) and by the products query propagating its error state.
CACHE-14 PASS There is no persisted query cache: @tanstack/react-query persistence (persistQueryClient / PersistQueryClientProvider) is not used anywhere in src/, app/ or components/ — only auth tokens and the local cart go through storage — so there is no on-disk catalogue blob to be corrupt or to carry an outdated schema, and every restart refetches from the version-keyed URL (safe discard/refetch by construction). Cart identities are held in the separately persisted local cart and are re-validated against live availability before use (the CGRD guards of §40), so a catalogue failure cannot silently morph a cart line.
CACHE-16 FAIL — defect 57 (P1) The case cannot be satisfied: grepping all of src/, components/ and app/ finds no NetInfo, isConnected, isInternetReachable or any offline concept, and because nothing is persisted (see CACHE-14) an offline restart shows no cached browse at all rather than a supported cached view. There is likewise no explicit stale/offline purchase restriction — the app has no way to tell the user it is offline or that ordering is restricted; a purchase attempt simply fails with a generic network error (bounded by the 90s caps, so it does at least fail rather than hang). Mitigating nuance, and why this is P1 rather than P0: the safety half is implicitly satisfied — with no cached catalogue no stale price can be quoted, the local cart is re-validated against live availability, and order totals are recomputed server-side — so no stale purchase can complete. What is missing is the product feature (cached browse) and the explicit user-facing offline indication.
CACHE-20 PASS Retries are bounded and there is no poll. utils/queryClient.ts sets retry: (failureCount, error) => !isAbortError(error) && failureCount < 3 — capped at 3 attempts, and an aborted request (the 90s cap) fails fast instead of being retried 3 more times (// Aborted requests (our 90s request cap) fail fast instead of being retried 3 more times) — refetchOnWindowFocus: false, and staleTime: 1200000 (20 min) with no refetchInterval anywhere, so a slow network cannot drive a request storm; status is accurate because each fetch reports its own pending/error state.
CFG-14 PASS — live Removal and corruption of a bound KV entry both resolve coherently, and no other bound's configuration is reused. Baseline bound 1: deliveryCharge 20, freeDeliveryThreshold 300. (a) Removal — with bound 2 explicitly set to a distinct deliveryCharge 55, clearing bound 1's entry made bound 1 serve 0 (its own default), not 55: bound1 served=0 while bound2=55. (b) Corruption — writing the non-numeric 'abc' was accepted at the API (200) but never served raw: bound 1 kept serving a finite number (0), and writing 'not-a-number' to flashFreeDeliveryThreshold left the previous valid value (500) in place, i.e. invalid values are sanitized/ignored rather than published. (c) Rebuild — re-writing deliveryCharge 20 immediately took effect. (d) Isolation — bound 2 held 0/200/no-flash unchanged through every step. Environment restored afterwards (b1 charge=20 thr=300, flash still enabled on bound 1 by intent; b2 charge=0 thr=200).

Defect 57 (new, P1) — no offline awareness and no offline browse

CACHE-16: there is no NetInfo/connectivity awareness anywhere in the customer app and no persisted catalogue, so an offline restart offers no cached browse, and an offline/stale purchase is not explicitly restricted — the app merely fails later with a generic network error. Safe by construction (no cached prices, server-side totals, cart re-validated against live availability) but the specified user-facing behaviour is absent.

58.1 Tally

855 catalogued · 60 SKIPPED · ~723 executed (~91%) · ~72 not run · 57 defects (defect 35 withdrawn; 56, 57 new).


59. Phase 32 — region change during a pending submit (LOC-18), password entry (AUTH-17, SAUTH-12)

Sources: apps/user-ui/src/lib/region-switch.ts, src/hooks/useRegion.ts, components/CheckoutAddressSelector.tsx, components/QuickDeliveryAddressSelector.tsx, src/components/location/LocationFallbackFlow.tsx, app/(auth)/login.tsx, components/registration-form.tsx, apps/admin-ui/app/login.tsx.

ID Result Evidence
LOC-18 FAIL — defect 58 (P0) Nothing anywhere checks whether an order/checkout request is in flight before the region changes. Every region-change path is unguarded: region-switch.ts contains no isPending/isSubmitting/order-state reference; the address-selector confirm handlers call confirmRegionSwitch(...) directly from the alert's destructive button; and useRegion — which can flip the region automatically with no user action at all — has no order awareness either (its mismatch branch even calls confirmRegionSwitch itself, defect 47). Because confirmRegionSwitch clears both carts and navigates home while the placeOrder mutation keeps running, and because placeOrder has no idempotency key (defect 46), the two prohibited outcomes are both reachable: (1) the old-region order completes into a new-region UI — the user lands on a region whose identity does not match the order just placed (its slot, store and prices belong to the previous region, and it may not even appear in the new region's order list, which is exactly "new-region UI falsely representing old-region order"); and (2) a duplicate order, since the user's natural retry after seeing no confirmation re-posts with no idempotency protection. Basis of the verdict is structural (the guard is absent) plus two independently confirmed defects; the precise interleaving was not driven on-device. Fix: a submission latch that blocks/queues region changes while an order is in flight (and disables the address switch during checkout), together with the placeOrder idempotency key defect 46 calls for.
AUTH-17 PASS (with a P2 note) Password entry is correctly masked on every customer surface: the login password input sets secureTextEntry (with testID="user-login-password"), the registration form masks both fields (name="password" → <MyTextInput … secureTextEntry>, name="confirmPassword" → secureTextEntry), each with a visible label, placeholder and inline error state, alongside length (≥6) and match validation. Route/focus: the auth group is gated by _layout.tsx on isLoading, and the post-login redirect is consumed once (removeItem before navigating) with a 24-hour expiry, so a refresh/back cannot loop back into login; on native there is no browser-back to mis-handle. P2 note: there is no password-visibility toggle anywhere in the app (no showPassword/reveal control), which is a usability/a11y nicety rather than a defect.
SAUTH-12 PARTIAL The core requirement holds — the admin login password field is masked and correctly configured: <MyTextInput topLabel="Password" … secureTextEntry autoCapitalize="none" autoCorrect={false} testID="login-password-input" accessibilityLabel="login-password-input" />, i.e. protected, not autocapitalised/autocorrected, and carrying both a testID and an accessibility label. Errors are surfaced and are announced (the platform treats the modal as accessible): Alert.alert("Error", "Please enter both name and password"). Gaps: there is no password-visibility toggle (the case names it explicitly; the only eye icon in the admin app is unrelated, in SnippetMenu.tsx), and the error is a blocking alert rather than an inline message bound to the field, so it is not programmatically associated with the input.

Defect 58 (new, P0) — no submission latch on region change

LOC-18: with no in-flight guard on any region-change path (automatic useRegion resolution, the checkout address selector, or the location fallback), no placeOrder idempotency (defect 46), and a switch that clears the carts and navigates home, an order in flight can complete against the previous region while the UI presents the new one, and a retry can duplicate it. Both prohibited outcomes in the case are reachable.

59.1 Tally

855 catalogued · 60 SKIPPED · ~726 executed (~91%) · ~68 not run · 58 defects (35 withdrawn; 56, 57, 58 new).


60. Phase 33 — upload lifecycle & profile mutations (UPLOAD-12/14/15/16, PROFILE-13/14)

Sources: apps/backend/src/lib/s3-client.ts (full), src/trpc/apis/user-apis/apis/file-upload.ts (full), src/trpc/apis/user-apis/apis/auth.ts:252-412 (updatePassword, updateProfile, deleteAccount), src/trpc/apis/user-apis/apis/product.ts:100-130 (createReview), src/trpc/apis/admin-apis/apis/product.ts (guard/cleanup call sites), packages/db_helper_sqlite/src/user-apis/auth.ts:200-230 (deleteUserAccount transaction). Read-only batch — no environment mutation.

The server maintains a real upload ledger: generateUploadUrl calls createUploadUrlStatus(key) when it mints a presigned PUT (status pending), claimUploadUrlStatus(key) flips it to claimed (single-use), and findUnclaimableUploadUrls returns keys that are "unknown to the app (never issued here) or already used by another record". The verdict below turns on which paths are wired to it.

ID Result Evidence
UPLOAD-12 PASS (with a consistency note) A replacement-cleanup failure cannot undo a valid record. The tag-image path wraps the old-image delete and continues: try { await deleteImageUtil({ keys: [currentTag.imageUrl] }) } catch (err) { console.error('Failed to clean up previous tag image, continuing with update:', err) } — logging only, the update proceeds. The product-image path takes the other safe ordering: await deleteImageUtil({ keys: deletedImageKeys }) runs before the SKU/DB write, so a delete failure aborts the whole update and leaves the old (still valid) image in place rather than committing a half-applied change. Both orderings satisfy "new asset persists; cleanup failure does not undo the valid record". Consistency note: the two paths differ (fail-closed vs log-and-continue), which is a maintenance hazard rather than a current failure.
UPLOAD-14 FAIL — defect 59 (P2) Two gaps. (1) No cleanup policy for unclaimed assets: the ledger only ever records pending keys — nothing reaps pending upload_url_status rows or the orphaned objects they produced (no sweep/GC; getPendingUploadUrlKeys is used solely by findUnclaimableUploadUrls for detection). An upload succeeded and then abandoned (form cancelled) leaves the object in the bucket permanently. (2) Unrelated entity claims are permitted on two paths: the guard is enforced strictly only for admin products/tags (await assertUploadUrlsClaimable(...) → clean 400 "These images were not uploaded through the app (unknown or already used)… Upload them again and retry."), while createReview is deliberately lenient — "Reviews keep their lenient contract: an upload URL that is unknown or already used is logged, not rejected", so a review can be written carrying a key the user never uploaded — and the profile path has no ledger involvement at all (below).
UPLOAD-15 PARTIAL Server side, duplicate owner attachment is prevented on strict paths: claims are single-use (claimUploadUrlStatus returns false for an already-claimed key) and the pre-write guard rejects a URL already used by another record, so the same image cannot be attached twice; retries after a partial success are also safe because claimUploadUrls is post-commit and non-failing (Promise.allSettled, logging failures only) — the row stays written with the same image rather than erroring. Slow-upload/expiry is bounded too: presigned PUTs expire after 180 s, so a stalled or backgrounded upload fails with a signature-expiry error that is recoverable by re-minting URLs. Gaps: the profile path performs no claim, so one object key can back several profiles' avatars; and device-side behaviour (progress reporting, offline retry, app backgrounding, rotation) was not driven this run.
UPLOAD-16 PASS (with notes) Supported transfer on both platforms: uploads are presigned PUTs signed in the query (aws: { signQuery: true }), and Content-Type is deliberately left unsigned — "leaving it unsigned means the client may send any value" — which is exactly what keeps a browser PUT from having to match a signed header (CORS/preflight-friendly), with a 180 s expiry and single-use claims. A reference cannot end up locally valid but server-unusable: normalizeAssetRef is explicitly built to collapse every historical shape to a bucket key — presigned URL, asset-domain URL, the legacy tags/x.png%3FX-Amz-… percent-encoded-query form, and an already-normalised key — and its docblock records the cases it must round-trip so scaffolding is idempotent and cannot double-prefix. Notes: generateUploadUrls applies no mime-type or size allow-list (only the folder is constrained, by the contextString enum), and an unrecognised mime type silently maps to .jpg, so the stored extension may not match the object's actual content.
PROFILE-13 FAIL — defect 60 (P1) The profile path sits entirely outside the ledger — user-apis/apis/auth.ts contains no assertUploadUrlsClaimable / findUnclaimableUploadUrls / claimUploadUrls reference — and updateProfile accepts profileImageUrl: z.string().optional().nullable() and passes it straight through (profileImage: profileImageUrl ?? undefined). There is therefore no ownership, prefix or issued-URL validation: any authenticated user can set their avatar to any object key in the bucket — another user's profile image, a review image, a tag image — i.e. the "false image assignment" the case forbids is possible by design, and reading it back even signs it for them (generateSignedUrlFromS3Url → normalizeAssetRef → signed GET). The failure ordering is also wrong: the response is assembled after the commit and calls generateSignedUrlFromS3Url, which throws new Error('Failed to generate signed URL') on error, so a signing hiccup returns 500 for work that was already committed — the client cannot tell "not saved" from "saved, response failed", and the avatar it renders can disagree with the database. Retry is idempotent (same value re-written), so it is at least recoverable. This is the same "abort after commit" pattern the ledger's own docblock was written to eliminate, just not applied on this path ("it did abort the request after the row was already committed, leaving orphans behind. Validating up front turns that into a clean 400 with nothing written").
PROFILE-14 PASS (with caveats) Account deletion is genuinely atomic: deleteUserAccount wraps the entire teardown in await db.transaction(async (tx) => { … }) and performs every child delete through tx (notifCreds, couponApplicableUsers, couponUsage, complaints, cartItems, notifications, productReviews, a tx.update(reservedCoupons), then per order orderItems/orderStatus/couponUsage/complaints, then orders, addresses, userDetails, userCreds, users), so the mid-way failure defect 42 hits (a user with an order) rolls back and leaves no half-account state. updatePassword is likewise a single awaited upsert with no multi-step window. Caveats: (a) a disconnect leaves the outcome undeterminable from the response — a retry with a different password silently overwrites, and there is no "last changed" signal to reconcile from; (b) a password change does not revoke existing sessions — no token version or blacklist exists (defect 53) and tokens carry a ~13-month exp, so a token captured before the change keeps working afterwards, which is the main security gap behind this case; (c) a deletion failure still surfaces as an unhelpful 500 rather than an actionable error (defect 42).

Defect 59 (new, P2) — unclaimed uploads are never reaped, and two paths accept foreign keys

UPLOAD-14: upload_url_status records pending uploads but nothing ever cleans them up (no GC for pending ledger rows or their orphaned objects), so a cancelled form leaves a permanent orphan. Enforcement is also uneven — strict 400s for admin products/tags, but createReview deliberately logs-and-accepts unknown/already-used URLs, and the profile update skips the ledger entirely — so unrelated entities can be claimed on those two paths.

Defect 60 (new, P1) — profile image URL is unvalidated and the response can fail after commit

PROFILE-13: updateProfile writes a client-supplied profileImageUrl with no ownership/prefix/issued-URL check, so any authenticated user can attach any object key in the bucket to their avatar (false image assignment by design), and the response's post-commit generateSignedUrlFromS3Url can throw, returning 500 for already-committed work.

60.1 Tally

855 catalogued · 60 SKIPPED · ~732 executed (~92%) · ~62 not run · 60 defects (35 withdrawn; 56–60 new).


61. Phase 34 — checkout navigation & submit integrity (CHECK-03/04/12/19)

Sources: apps/user-ui/components/checkout-page.tsx (full read of state sourcing + render), components/PaymentAndOrderComponent.tsx, components/CheckoutAddressDisplay.tsx, components/CheckoutAddressSelector.tsx, src/store/checkoutStore.ts, app/(drawer)/(tabs)/home/checkout.tsx and app/(drawer)/(tabs)/flash-delivery/checkout.tsx (thin wrappers, 8 and 5 lines).

ID Result Evidence
CHECK-03 PASS Returning to checkout after editing re-derives everything live — there is no route-param snapshot to go obsolete. useLocalSearchParams() is used only to build the auth-redirect target (useAuthenticatedRoute({ targetUrl, queryParams: params })); the order contents come from live sources: useGetCart({}, cartType) (with refetch), trpc.user.address.getUserAddresses.useQuery, trpc.user.slots.getSlots.useQuery({ regionId }), useCentralProductStore (products, productsById), useCentralSlotStore (productSlotsMap) and useAddressStore().selectedAddressId. useMarkDataFetchers(() => { refetchCart(); refetchAddresses(); refetchSlots(); }) additionally re-registers all three refetchers, so a global data-stale signal (the same path the cart screen uses) re-pulls checkout's inputs. Freshness after a cart edit depends on the cart mutation invalidating/refetching the same query key, which the §42 cart flow already demonstrated end-to-end.
CHECK-04 PASS Checkout is genuinely read-only and the cart is the edit path. Items render as static rows — {group.items.map((item) => (… <MyText …>x{item.quantity}</MyText> … ₹{Number(price) * item.quantity} …))} at lines 370-392 — with no quantity stepper or remove control, so the only way to change the basket is the cart screen. The address is display-only (CheckoutAddressDisplay, with CheckoutAddressSelector/RawBottomDialog for changing it), and back navigation is available on every surface: onPress={() => router.back()} at checkout-page lines 312 and 330 and PaymentAndOrderComponent line 336.
CHECK-12 PASS The strongest of the four, and explicitly designed against this case. PaymentAndOrderComponent carries "Synchronous re-entrancy guard so a double-tap can't fire placeOrder twice (state-based isPending updates only after a re-render)" with submittingRef; the submit handler opens with if (submittingRef.current || placeOrderMutation.isPending) return;, so a resumed/backgrounded app cannot re-enter the mutation even before React re-renders. The button is disabled while in flight — disabled={!selectedAddress || placeOrderMutation.isPending} with opacity-50 — and a BottomDialog (isLoadingDialogOpen) shows progress rather than an apparent freeze. Success routing is correct by construction: router.replace(\${successPath}?orderId=${firstOrder.id}&totalAmount=${successAmount}`)sits **inside**onSuccess, so no wrong success route is possible, and replace(notpush`) removes the checkout screen from the stack, preventing a back-into-checkout resubmit.
CHECK-19 FAIL — defect 61 (P2) Two of the three dimensions pass and one fails. Passing: no stale cart — checkout re-derives live (CHECK-03) and the persisted local cart is re-validated against availability (CGRD, §40); and the login-return loop is closed — the redirect state is consumed once and expires in 24 h, and useAuthenticatedRoute re-targets the same route with its params rather than looping (AUTH-15/17). Failing: the delivery instruction is both volatile and never cleared. userNotes lives in src/store/checkoutStore.ts as a plain in-memory Zustand store — create<CheckoutStore>((set) => ({ userNotes: '', setUserNotes: (userNotes) => set({ userNotes }) })) with no persist middleware — even though its own docblock describes it as "Order-review state shared between the cart (editable) and checkout (read-only summary)… the delivery instructions the user types on the cart". So a browser refresh, a cold start or a background eviction silently loses the instruction (checkout then submits userNotes: '' with no warning), while within a session the value is never reset — the only writer is the cart input (cart-page.tsx:1434 onChangeText={setUserNotes}) and there is no setUserNotes('') anywhere — so the note the user typed for one order is silently attached to the next one too.

Defect 61 (new, P2) — delivery instructions are volatile in one direction and sticky in the other

CHECK-19: useCheckoutStore.userNotes is in-memory only (no persist), so a refresh/cold start drops the instruction the user typed, with no indication at submit time; and because nothing ever calls setUserNotes(''), after a successful order the stale instruction remains and is re-sent with the next order. Fix both together: persist the note (or lift it to the checkout request) and clear it on successful order placement.

61.1 Tally

855 catalogued · 60 SKIPPED · ~736 executed (~92%) · ~58 not run · 61 defects (35 withdrawn; 56–61 new).