You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/bug-fixes.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,36 @@ Each bug fix entry should include:
12
12
13
13
## Bug Fixes
14
14
15
+
### 2026-07-15: Walmart detail requests were rejected with HTTP 456
16
+
17
+
**Description:**
18
+
Walmart purchase history succeeded, but itemize then sent an obsolete request profile for every order-detail lookup. Walmart rejected those calls with HTTP 456, and itemize continued through the remaining history, repeating a session-level failure for orders it would later discard because of `-max`.
// Expected: the summary groupId is forwarded to getOrder.
28
+
29
+
// TestProvider_FetchOrders_StopsOnBotChallenge
30
+
// Expected: ErrBotChallenge stops the detail loop after one request.
31
+
```
32
+
33
+
**Root Cause:**
34
+
Itemize used `walmart-client-go/v2 v2.1.0`, whose `getOrder` hash, GraphQL variables, user agent, Walmart platform version, and tracing headers no longer matched the web client. Cookie refresh merged snapshots, so expired WAF cookies could also survive. The itemize provider ignored each HTTP 456 as an order-specific failure, did not pass the purchase-history `groupId`, and applied `MaxOrders` only after fetching every detail response.
35
+
36
+
**Fix Applied:**
37
+
Upgraded to `walmart-client-go/v2 v2.2.1`, which captures the live browser request profile, replaces stale cookie snapshots, preserves response-cookie path scope, forwards group IDs, and exposes `ErrBotChallenge`. Itemize now removes active/unfinalized summaries and truncates the remaining deduplicated summaries before detail calls, calls `GetOrderWithGroup`, and returns immediately when Walmart challenges the browser session.
38
+
39
+
**Verification:**
40
+
- The four regression tests failed before their fixes and pass after them.
41
+
- The walmart client performed a live read-only `getOrder` with the captured order/group ID and returned 17 items.
42
+
- A second live client sequence fetched purchase history and then a completed in-store order with 4 items, confirming path-scoped history cookies no longer poison detail requests.
43
+
-`./itemize walmart -dry-run -days 14 -max 1 -verbose` skipped the active `PLACED` summary, issued exactly one completed-order detail request, exited successfully, and logged no HTTP 456 response.
0 commit comments