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

134 lines
17 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Full regression defect register — FR-2026-10-18-01
**Source:** [`docs/test reports/full-regression-2026-10-18.md`](./full-regression-2026-10-18.md)
**Run:** FR-2026-10-18-01 · 2026-10-18
**Derived:** this file lists the defects/problems recorded in the report. It is not a re-test and does not add new findings.
**Status:** all items are open unless the source report explicitly says they were reverted or repaired. The report states that no source code was modified.
The report contains **55 numbered defect entries**. Two are duplicates/extensions of earlier entries:
- **#29** duplicates the empty-component issue in **#20**.
- **#45** is the same stack-trace/500 root cause as **#8**, with a specific read-path example.
- **#37** extends the zero-cap validation issue in **#15** with `minOrder: -5`.
So the register has **55 report entries / ~52 distinct defects**.
Severity is taken from the report where labelled; where the report gives no explicit severity, a conservative severity is assigned from the demonstrated impact.
---
## P0 — release blockers
| # | Defect | Cases | Evidence / source |
|---|---|---|---|
| 1 | **Customer privilege escalation on admin procedures.** A customer JWT reaches `protectedProcedure`-based admin resolvers. A customer can read the staff list and roles, **suspend any user**, and reach `admin.user.sendNotification` (which can broadcast to all users when `userIds` is empty). About 30 admin procedures use `protectedProcedure` instead of `staffProcedure`. | SEC-01, SEC-28, CUSTOMER-05, CUSTOMER-11, PUSH-19 | U1 suspended user 1327 via `admin.user.updateUserSuspension` (200); staff list/roles exposed; notification path reachable. §1, §21 |
| 2 | **Suspension is not enforced.** `createContext` assigns `user` before the suspension check and the catch does not clear it. A suspended user keeps full API access, can log in again, and can read their account; only order placement is blocked. | CUSTOMER-03, CUSTOMER-04 | Suspended U0 old token → `getSelfData` 200; fresh login succeeded; `placeOrder` 403. §1, §20 |
| 3 | **JWT signing secret is committed in repository configs.** `wrangler.dev.toml` / `wrangler.prod.toml` contain a weak secret. An offline-minted staff token was accepted as a real staff member. | SEC-06 | Token minted with `my_meatfarmer_jwt_secret_key` accepted; `admin.me` → e2eadminA. §1 |
| 4 | **No quantity or inventory bound on order placement.** `quantity: 1e9` created an order worth ₹235,000,000,000. | CART-16, ORDER-04 | Order 2563 created, total ₹235,000,000,000; cancelled as cleanup. §8, §15 |
| 5 | **Coupon type switch keeps the old discount.** Editing a percentage coupon to a flat amount returns 200 but leaves both fields; pricing continues to apply the percentage. Applies to regional and global update paths. | CPM-21 | 15% coupon updated with `flatDiscount: 30` still stored `discountPercent: 15`; order discount remained 15%. §13 |
| 6 | **Cross-user complaint creation.** U2 can raise a complaint against U1's order; there is no ownership check on the referenced order. | SUPPORT-05 (earlier `COMPLAINT-02`) | Complaint 107 created by U2 against U1's order 2562. §30, §31.4 |
| 7 | **Negative / non-finite money accepted.** Negative and `1e308` prices, negative/150% coupons, and negative delivery charges were accepted and served. | STOCK-12, CFG-08, CPM-06 | Negative prices accepted; `deliveryCharge: -50` served; 150% coupon accepted. §5, §13, §29.5 |
| 8 | **Business rejections surface as HTTP 500 with stack traces.** Not-found, cross-user, invalid-coupon and other business rejections return 500/`INTERNAL_SERVER_ERROR` instead of actionable 4xx; responses expose internal file paths. | SEC-15, SEC-22, UX-03 | `data.stack` with `.wrangler/tmp/.../worker.js` paths in responses. §1, §46 |
| 9 | **Unknown or foreign keys accepted.** Global constants accept arbitrary keys; `tagsOrder` accepts garbage/foreign SKU ids; scope checks are otherwise correct. | CFG-13, CFG-17, SEC-13 | `__e2e_unknown_key__` persisted; `tagsOrder='999999,0,-1,999999'` stored. §1, §5 |
| 10 | **Regional product suspension cannot be set.** `isSuspendedInRegion: true` returns 200 but does not persist; a "regionally suspended" item remains orderable. | STOCK-07, STOCK-08, CART-08 | Read-back stayed `false`; suspended item ordered successfully. §29.5, §29.9 |
| 16 | **Cross-region data leakage and association in admin APIs.** Staff B can read a region-1 customer's details; region-1 objects accept region-2 SKUs/products in slots, tags, groups, stores and product updates. A foreign SKU was attached to a region-1 product. | CUSTOMER-08, SLOT-12, TAG-06, GROUP-05, STORE-07, PROD-11 | Staff B read region-1 customer 388; slot accepted region-2 SKU; product 160 SKUs became `[162,184]`. §31.5–§31.6 |
| 41 | **Regional admin can create a `super_admin`-role staff account.** The account is region-scoped, but the role itself is not restricted; its token reaches `admin.user.getAllUsers`. | STAFF-07b | Created role `super_admin` with 200; token got 200 on customer-data admin read; 401 on superadmin routes. §45 |
| 52 | **Unauthenticated packaging mutation (IDOR).** `admin.vendorSnippets.updateOrderItemPackaging` is a `publicProcedure` with its staff check commented out. It accepts a sequential `orderItemId`, so anyone can flip packaging state. | VENDOR-07 | No `Authorization` header → 200; `is_packaged` changed; restored to false. §50 |
| 53 | **No logout or token revocation; sessions last months.** No logout procedure or revocation store exists. Staff/user JWTs carry multi-month `exp`; a captured token remains valid after logout or password/account changes. | SAUTH-11, SAUTH-03 | All logout paths 404; staff exp ≈ 2026-11-17, user ≈ 2027-01-14; old token still 200. §51 |
---
## P1 — high-priority defects
| # | Defect | Cases | Evidence / source |
|---|---|---|---|
| 11 | **No per-item flash validation.** A non-flash-available SKU is accepted into a flash order. | FLASH-03 (earlier labelled FLASH-04) | Flash order with an ineligible SKU returned 200. §29.10, §31.10 |
| 12 | **Double-tolerated terminal mutations.** Resolving an already-resolved complaint and customer-cancelling an already-cancelled order overwrite the stored response/reason. | SUPPORT-10, CANCEL-04 | Complaint response overwritten; second cancel returned 200 and replaced reason. §2, §16, §31.4 |
| 13 | **Ghost-user suspension.** `admin.user.updateUserSuspension` accepts a non-existent user id and reports success, creating a ghost row. | CUSTOMER-06 (earlier CUSTOPS-09) | Non-existent id → 200 "User suspended successfully". §29.11 |
| 14 | **Soft-deleted SKU remains price-editable.** A price update on a soft-deleted SKU is accepted. | STOCK-15 | Obsolete target returned 200. §29.5 |
| 15 | **Minor money/eligibility contract gaps.** `getEligible` ignores an invalid `regionId`; `maxValue: 0` is ignored; negative prices accepted. | CPA-25, MONEY-20, STOCK-12 | Invalid region returned full list; zero cap still discounted; negative/1e308 accepted. §29.8, §29.9, §44 |
| 17 | **`getUserDetails` returns 500 for a user with a large order history.** Other users return 200. | CUSTOMER-01 | "Failed query: select id from orders …". §31.5 |
| 18 | **No coordinate or delivery-sequence validation.** `lat:200, lng:400` accepted; delivery sequences accept duplicate, unknown and foreign order ids. | DELIVERY-08, DELIVERY-04, DELIVERY-05 | Out-of-range coordinates 200; sequence `[2637,999999,2638,2637]` 200. §31.3 |
| 19 | **`javascript:` banner destination accepted.** Redirect scheme is not validated. | BANNER-11 | `javascript:alert(1)` accepted. §31.6 |
| 20 | **Combo integrity gaps.** Self-referencing and empty-component combos are accepted. | COMBO-07, COMBO-08 | Both returned 200. §31.6 |
| 21 | **Group deletion ignores active slot attachment.** A group attached to an active slot can be deleted. | GROUP-10 | Delete returned 200. §31.6 |
| 22 | **Store accepts an invalid/unclaimed image key.** | STORE-10 | Store create with bad key returned 200. §31.6 |
| 23 | **Delivered orders remain editable by the customer; notes have no length limit.** | EDIT-03, EDIT-04 | Delivered order note update 200; 411-char unicode note accepted. §31.2 |
| 24 | **Fulfilment blocked by a soft-deleted product.** A valid order cannot be delivered once the product row is soft-deleted. | FUL-14 | Deliver returned 400. §31.1 |
| 25 | **Flash-order integrity.** A scheduled slot id is accepted in a flash payload; coupons on flash orders are rejected. | FLASH-08, FLASH-15 | Flash + scheduled slot 200; flash + coupon 400. §31.10 |
| 27 | **Structural product/tag changes are not published.** Product create and tag create did not advance `products_version_num`; the new SKU was absent from the published products file after 30s/8s. | CACHE-02, CACHE-13 | Version stayed 20→20 and 22→22; new SKU missing. §33.3 |
| 28 | **Slot accepts `freezeTime` after `deliveryTime`.** | SLOT-09 | Invalid slot accepted 200. §33.3 |
| 30 | **Upload validation gaps.** External `https://` image URLs and unsupported MIME types are accepted; 6 MB/corrupt bodies can be PUT under an image MIME. | UPLOAD-09, UPLOAD-10, UPLOAD-20 | External URL accepted; `application/x-msdownload` signed; 6 MB/corrupt PUT 200. §33.3 |
| 32 | **Duplicate global product on concurrent create.** Two simultaneous same-name creates both returned 200. | GP-18 | Two global product rows. §37 |
| 33 | **Tag update accepts an invalid image key.** Same class as #22 but a different endpoint. | TAG-11 | Update returned 200. §37 |
| 35 | **Coupon dropdown hides ineligible coupons instead of showing disabled reasons.** The API returns 33 coupons including all disabled classes; the sheet shows only 8 applicable rows and no disabled rows. | CLS-02, CLS-03, CLS-04, CLS-05, CLS-06 (CLS-15 related) | API vs UI comparison; no "Disabled + reason" layout. §41, §51 |
| 37 | **Zero coupon cap is ignored; negative `minOrder` accepted.** Extends #15. | MONEY-20 | `maxValue:0` still discounted; `minOrder:-5` accepted. §44 |
| 38 | **Address creation has no idempotency.** An ambiguous retry creates duplicate address rows. | ADDR-21 | Two rows after retry. §44 |
| 40 | **Duplicate staff identity via concurrency.** Simultaneous same-username creates both succeed. | STAFF-11 | Two rows returned 200. §45 |
| 42 | **Account deletion returns 500 for users with orders.** No deletion/anonymisation path for users with history; the row and token survive. | PROFILE-11 | FK delete failure; post-delete `/self` still 200. §45 |
| 43 | **Duplicate store on retry.** Same store name created twice. | STORE-12 | 200/200; two rows. §45 |
| 44 | **`getOrderById` returns 500 where 4xx is required.** Non-existent, malformed and another user's order ids all return 500. | ORDER-10, UX-03 | `parseInt` feeds `NaN` into the query; 500 `-32603`. §46 |
| 45 | **Error responses carry full stack traces.** Same root cause as #8; specific read-path example. | UX-03, SEC-22 | Stack with absolute `.wrangler/tmp` paths. §46 |
| 46 | **No idempotency on order placement.** An identical retry creates a second order and double-charges. | CHECK-09, CHECK-11, ORDER-16, UX-04, UX-14 | Orders 2709/2710 from identical submits. §46 |
| 47 | **Cart is silently destroyed by an unconfirmed startup region switch.** When the persisted browsing region differs from the address/GPS-anchored region at launch, startup calls `confirmRegionSwitch` without a dialog; that function clears both carts despite requiring user confirmation. The earlier "first adoption" explanation was corrected in §54. | UX-01, UX-05, LOC-09, LOC-19 | Cold start with carts; region mismatch path clears carts with no warning; address-selector path does show a confirmation. §47, §54 |
| 49 | **Cart values are never validated; native cart cannot survive corrupt JSON.** Negative/non-numeric/1e9 quantities keep checkout enabled; native `getLocalCart` has no try/catch. | CART-13, CART-21 | Web bill ₹233,000,000,000 for `1e9`; native corrupt read throws. §48 |
| 50 | **Closed delivery slot is silently rewritten; web has no closed-slot guard.** Native rewrites the line to the earliest valid slot without notice; web keeps checkout enabled. | CGRD-03, CART-20 | Line moved from 30 Oct to 5 Nov; web "Proceed to Checkout" stayed enabled. §49 |
| 51 | **`admin.slots.updateSlot` is a destructive partial update.** Omitted `groupIds` clears associations; invalid group ids are silently dropped. | SLOT-16 | Slot 2085 `[17] → []`; `[5,999999] → [5]` with 200. §50 |
---
## P2 — lower-priority defects and gaps
| # | Defect | Cases | Evidence / source |
|---|---|---|---|
| 26 | **Unbounded text.** Complaint body (5,000 chars) and order notes (411 chars) have no length limits. | SUPPORT-04, EDIT-04 | Accepted without limit. §31.2, §31.4 |
| 29 | **Empty-component combo accepted.** Duplicate of #20. | COMBO-08 | 200. §33.3 |
| 31 | **No string-length limits on names.** Store/product names (and previously address/name fields) accept Unicode + 300+ chars. | STORE-05, PROD-09; ADDR-09, AUTH-09, SUPPORT-04, EDIT-04 | 300-char names accepted. §29, §33.3 |
| 34 | **Non-default address deletion fails in the app UI.** The API deletes it, but the confirmed UI action leaves the row listed. | ADDR-14 | Confirmed delete; address remained. §37.1 |
| 36 | **Mismatched DELIVER-TO label after GPS region adoption.** The region pill shows region 2 while the address line still shows the region-1 address. | LOC-19(b), REGION/LOC header | Screenshot `u18_region2gps`. §42.2 |
| 39 | **New region's bound not visible immediately.** `superadmin.regions.bounds` returns 0 bounds right after create while `effectiveSettings` works. | REGION-16 | Immediate read returned 0 bounds. §44 |
| 48 | **Floating "1 Hr Delivery" CTA intercepts taps.** It covers the bottom row of scrollable lists; the Terms row could not be tapped. | UX-10, UX-16 | Tap on Terms row opened the quick-delivery dialog. §47 |
| 54 | **Empty cart is not validated for flash orders.** `selectedItems: []` reaches Drizzle and returns 500 with an internal message. | FLASH-13 | "values() must be called with at least one value". §52 |
| 55 | **Flash (slot-less) orders cannot reach vendor production/packing views.** Vendor demand is keyed by `slotId`; flash orders have `slotId: null`. | FLASH-15 / vendor demand | `getSlotOrders` showed 0 flash orders; `getAll` does show them. Flagged for product confirmation. §52 |
---
## Non-defect observations and scope blockers
These are recorded by the report but are not counted as product defects above:
| Item | Status | Note |
|---|---|---|
| Notifications / push | **SKIPPED (19)** | Excluded by owner instruction; real delivery not exercised. The reachable `admin.user.sendNotification` path is covered as a privilege defect (#1). |
| OTP authentication | **SKIPPED (15)** | Excluded from the password regression; no real SMS/OTP. |
| Queue/scheduler jobs | **SKIPPED (12)** | `JOB-03…10`, `JOB-12…15` excluded; no `--test-scheduled` harness used. |
| Fallback/legacy UI | **SKIPPED (14)** | `apps/fallback-ui` excluded and not running. |
| Admin web | **BLOCKED** | Not running; `SAUTH-15` and admin-web parity cases not driven. |
| `create-user` script (`USR-01…06`) | **BLOCKED** | `bcryptjs` not installed for the available Bun/tsx runners. |
| Rate-limit harness (`SEC-24`) | **BLOCKED** | No approved bounded harness. |
| Policy cases | **BLOCKED** | `ORDER-22` N/A (accepted historical zero discount), `EDIT-14` policy, `BOUND-09` cross-region overlap. |
| Expo Go permission prompt | **Not a product defect** | Per-experience Expo Go prompt; documented as a harness artifact. |
| Web cart fee presentation | **Not a defect** | Web defers the delivery fee to checkout while native shows it in the cart; recorded as a platform difference. |
| UI assertion failures | **Inconclusive** | Some Maestro chains failed due to leftover modals/full-string matching; report marks these as inconclusive, not product failures. |
---
## Report hygiene / inconsistencies
- The report's defect count changes through the document: **34** at §38, **48** at §47, **52** at §50, **55** at §54. This register uses the final **55 entries**.
- The execution tally is also inconsistent across phases (e.g. §36 says ~510 executed/~275 not run; §47 says ~668/~127; §54 says ~707/~88; §50 says ~683/~112). Treat coverage percentages as approximate.
- §30 corrects many provisional case IDs (for example `COMPLAINT-*` → `SUPPORT-*`, `CUSTOPS-*` → `CUSTOMER-*`, `DELIV` → `DELIVERY-*`). This register uses the corrected IDs.
- #29 duplicates #20; #45 duplicates the root cause in #8; #37 extends #15.
- The report says no source code was modified. These defects are therefore **reported, not fixed**, in that run.
---
## Suggested triage order
1. **#1, #2, #3, #52, #53** — authentication, suspension, secret and unauthenticated-write blockers.
2. **#4, #5, #6, #7, #8, #9** — money integrity, cross-user data, error contract, unknown-key validation.
3. **#10, #16, #41** — regional suspension, cross-region leakage, role escalation.
4. **#27, #35, #47, #49, #50** — publication, coupon UI, cart destruction and cart validation.
5. Remaining P1, then P2.
No files other than this register were changed.