[BUG] Casino horses: Six Up / All Up settle as losses on all-hit (array vs scalar legResults) #3

Open
opened 2026-11-10 06:37:57 +08:00 by admin · 0 comments
Owner

Service / Project

casino (Node: pve01, LXC 19019)
Public: https://casino.theforwardway.com

Description

Six Up (6UP) and All Up (ALUP) tickets settle as won=false / payout=0 even when every leg is a correct hit. The UI builds legResults as arrays (top-3 per leg), but the engine expects a scalar winner per leg for 6UP/ALUP. DBL/DT/TT correctly read array form.

Steps to Reproduce

  1. Open horse racing at https://casino.theforwardway.com
  2. Place an ALUP ticket with #1 in each of 2 legs (or 6UP with a pick in all 6 legs) using demo credit
  3. Wait for settlement / results panel
  4. Code path: horses-ui.js builds legResults = [pNums, generateSimulatedLegResults(12,3)×5]; engine HorseRacingEngine.js uses includes(winHorse) / includes(legResults[idx]) expecting scalars

Expected Behavior

An all-hit 6UP/ALUP ticket pays according to rules (scalar winner checks / carry-forward 滾存).

Actual Behavior

Live ALUP (#1×2 legs): race 2 result was 1-2-3-4 but the panel showed 未命中 for that leg. Engine probe: scalar-form PASS; array-form UI path FAIL (won=false, payout=0).

Error Logs / Evidence

  • Retest 05:31 §3 STILL OPEN + live browser § ALUP
  • src/modules/horses/horses-ui.js:778-785 (array legResults)
  • src/modules/horses/HorseRacingEngine.js:310 includes(winHorse), :326 includes(legResults[idx])
  • Fresh 15-type probe: 6UP/ALUP PASS* on scalar; FAIL on array-form UI results

Reported automatically by Grok QA Agent (Lumi).

### Service / Project **casino** (Node: `pve01`, LXC `19019`) Public: https://casino.theforwardway.com ### Description Six Up (6UP) and All Up (ALUP) tickets settle as `won=false` / payout=0 even when every leg is a correct hit. The UI builds `legResults` as arrays (top-3 per leg), but the engine expects a **scalar** winner per leg for 6UP/ALUP. DBL/DT/TT correctly read array form. ### Steps to Reproduce 1. Open horse racing at https://casino.theforwardway.com 2. Place an ALUP ticket with #1 in each of 2 legs (or 6UP with a pick in all 6 legs) using demo credit 3. Wait for settlement / results panel 4. Code path: `horses-ui.js` builds `legResults = [pNums, generateSimulatedLegResults(12,3)×5]`; engine `HorseRacingEngine.js` uses `includes(winHorse)` / `includes(legResults[idx])` expecting scalars ### Expected Behavior An all-hit 6UP/ALUP ticket pays according to rules (scalar winner checks / carry-forward 滾存). ### Actual Behavior Live ALUP (#1×2 legs): race 2 result was 1-2-3-4 but the panel showed 未命中 for that leg. Engine probe: scalar-form PASS; array-form UI path FAIL (won=false, payout=0). ### Error Logs / Evidence - Retest 05:31 §3 STILL OPEN + live browser § ALUP - `src/modules/horses/horses-ui.js:778-785` (array legResults) - `src/modules/horses/HorseRacingEngine.js:310` `includes(winHorse)`, `:326` `includes(legResults[idx])` - Fresh 15-type probe: 6UP/ALUP PASS* on scalar; FAIL on array-form UI results --- *Reported automatically by **Grok QA Agent** (Lumi).*
admin added the
bug
qa/grok
pve01
labels 2026-11-10 06:37:57 +08:00
Sign in to join this conversation.
No description provided.