-
Cap product combo qty by real stock instead of a fixed 3 per line · a970a2ac
Live E2E testing against the real Sổ Bán Lẻ catalog (64 usable products, avg price ~24k) showed the fixed maxQtyPerLine=3 capped the achievable order total at ~4.86M regardless of retry count - a structural ceiling, not bad luck. 7/10 test amounts above ~4.2M failed with NO_PRODUCT_COMBO_MATCH every time. Default per-line qty is now bounded only by the product's actual stock (previously min(3, qty), now just qty), raising the real ceiling to ~2B on the current catalog. maxQtyPerLine is still available as an explicit override for callers that want a cap. Verified against the real catalog: all 7 previously-failing amounts (4.2M-19.5M) now succeed, real order totals landing within the 50,000 tolerance band every time. Co-Authored-By:
Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017KPzWwuTEeX2vXGXvyGn4q
tdgiang authoreda970a2ac
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| controllers | Loading commit data... | |
| libs | Loading commit data... | |
| middlewares | Loading commit data... | |
| models | Loading commit data... | |
| resources | Loading commit data... | |
| routes | Loading commit data... | |
| views | Loading commit data... |