id: 32f46a08dfad47218ae62e3c735b180d
parent_id: d3f0995378d5481e81a73e25c60c169a
item_type: 1
item_id: 60976d006f58404387784a6b90ebf04c
item_updated_time: 1782216279043
title_diff: "[]"
body_diff: "[{\"diffs\":[[0,\"-23 \"],[-1,\"overnight session: parameter sweeps + hand replay system.\\\n**2026-06-23 live session:** D4 button detection — **fix applied to scraper, pending reload verification**\"],[1,\"live session.\\\n**D4 button detection — FIXED & VERIFIED.** Dealer now rotates correctly across all\\\npositions (BTN, SB, BB). Three-layer fix: (1) SB-seat derivation at game_start,\\\n(2) DOM chip confirmation at hero-turn (`confirmed_dealer_seat`), (3) server-side\\\ncorrection. Zero correction warnings — SB derivation matches chip 100%\"],[0,\".\\\n\\\nP\"]],\"start1\":51,\"start2\":51,\"length1\":172,\"length2\":338},{\"diffs\":[[0,\"t 0 \"],[-1,\"⚠️\"],[1,\"✅\"],[0,\" FIXED \"],[-1,\"(pending verify)\"],[1,\"& VERIFIED\"],[0,\"\\\n\\\n**\"]],\"start1\":591,\"start2\":591,\"length1\":33,\"length2\":26},{\"diffs\":[[0,\":** \"],[-1,\"`collectTableState()` (table_dom.ts) correctly detects the\\\ndealer from the `<div class=\\\"dealer___ position-N___\\\">` div and stores it in\\\n**`snap.dealerSeat`** (e.g. `2`). But `buildGameStart()` (parser.ts:650) **ignored\\\n`dealerSeat`** and keyed solely off `snap.dealerName`, which is `null` whenever the\\\ndealer's position→player-name match fails → silently defaulted to `0`. Result:\\\n`dealer=0` in 19/20 hands.\\\n\\\n**Fix applied (super-marvin-userscripts, scraper — in scope):**\\\n`\"],[1,\"The dealer chip is rendered by React a few frames AFTER the\\\nblind messages arrive. `snap.dealerSeat` was always `undefined` at `buildGameStart()`\\\ntime → defaulted to seat 0 in 19/20 hands.\\\n\\\n**Fix (three layers):**\\\n1. **SB-seat derivation (\"],[0,\"pars\"]],\"start1\":637,\"start2\":637,\"length1\":483,\"length2\":247},{\"diffs\":[[0,\"arser.ts\"],[-1,\"`\"],[1,\"):**\"],[0,\" `buildG\"]],\"start1\":881,\"start2\":881,\"length1\":17,\"length2\":20},{\"diffs\":[[0,\"tart\"],[1,\"()\"],[0,\"` now \"],[-1,\"prefers the directly-detected `snap.dealerSeat`,\\\nfalling back to the name lookup, then 0 only on true failure:\\\n```ts\\\nconst dealerSeat = snap?.dealerSeat ?? (snap?.dealerName ? this.seatForName(snap.dealerName) : 0);\\\n```\\\nBuilt to `torn/dist/torn.user.js`. **User must refresh the Torn page** to load it.\\\nVerification: next `game_start` should report the real dealer (e.g. `dealer=2` when\\\nFuckFuck/seat 2 deals) and rotate each hand; server `btn`/`sb`/`bb` tags should align.\\\n\\\n**Impact:** A wrong `button_seat` corrupted all downstream position logic\\\n(`our_position`, BTN/SB/BB tags, position-aware preflop thresholds) → bot played as if\\\nalways on t\"],[1,\"derives the button from\\\n   the SB player's seat — button = previous active player counter-clockwise from SB\\\n   (heads-up: button = SB). Diagnostic: `dealer derived from SB seat=N => btn=M`.\\\n2. **DOM chip confirmation (index.ts):** `waiting_for_action` now includes\\\n   `confirmed_dealer_seat` read from the actual chip (guaranteed visible at hero-turn).\\\n3. **Server correction (table_state.rs):** On `WaitingForAction`, if\\\n   `confirmed_dealer_seat` differs from `button_seat`, corrects it + `is_dealer` flags\\\n   before computing the decision.\\\n\\\n**Verification (2026-06-23):** btn rotates correctly (7→6→4→3→2→1→0). Zero correction\\\nwarnings — SB derivation matches DOM chip every time.\\\n\\\n**Also fixed (table_state.rs):** `hero_position_label()` was excluding folded players\\\nfrom position offset computation → wrong labels w\"],[0,\"he\"],[1,\"n\"],[0,\" button \"],[-1,\"→ loose open-limp/call (J5s, Q8s, A8o, JTs). Likely the root cause\\\nof \\\"preflop limps with anything\\\". Should resolve once the button is correct.\\\n\\\n**Seat model confirmed by user:** 9 seats (0–8), hero/Bolsa always seat 0, seats go\\\nclockwise, empty seats still count. Dealer div carries `position-N___` directly on the\\\nchip (e.g. `<div class=\\\"dealer___L2uAh position-2___jgFym\\\"></div>`).\"],[1,\"folds (e.g. BB mislabeled\\\nas SB). Now counts all dealt-in players (Active, Folded, AllIn; excludes SittingOut).\\\n\\\n---\\\n\\\n## Hands Audit Notebook\\\n\\\nDetailed hand-by-hand analysis in **Hands Audit** notebook\\\n(`56a8e67a02b64db68edbe5e58fb205c6`):\\\n\\\n- **Hand #3 (166fb094)** — AQo SB fold (too tight, preflop) — B7/B9\\\n- **Hand #29 (ea30be42)** — ATs flop fold at 18:1 (too tight, postflop) — B7\\\n\\\nBoth are the same root issue: **bot too passive overall.**\"],[0,\"\\\n\\\n--\"]],\"start1\":905,\"start2\":905,\"length1\":1055,\"length2\":1292},{\"diffs\":[[0,\"h SB+BB)\"],[1,\"\\\n- [x] **D4: Dealer button stuck at seat 0** — Fixed & verified (SB derivation + chip confirmation + server correction)\"],[0,\"\\\n\\\n---\\\n\\\n#\"]],\"start1\":3975,\"start2\":3975,\"length1\":16,\"length2\":135},{\"diffs\":[[0,\"ltiway.\\\n\"],[1,\"**Hand evidence:** Hand #29 (ATs flop fold at 18:1), Hand #3 (AQo SB fold at 4:1)\\\n\"],[0,\"**Fix pa\"]],\"start1\":4401,\"start2\":4401,\"length1\":16,\"length2\":98},{\"diffs\":[[0,\"fication\"],[1,\"\\\n### B8: `num_callers` counts ALL calls on street (incl. SB post + limpers)\\\n**File:** `strategy_bot.rs:119-122`. Counts every `Call` action instead of only\\\npost-last-raise callers → inflates call threshold → over-calling in raised pots.\\\n### B9: AQo fold in SB despite 4:1 pot odds (preflop too tight for premiums)\\\n**Hand:** #3 (166fb094). ng_preflop position-aware thresholds may be too conservative\\\nin SB, or pot-odds override not firing for premium hands.\"],[0,\"\\\n\\\n---\\\n\\\n#\"]],\"start1\":4635,\"start2\":4635,\"length1\":16,\"length2\":473},{\"diffs\":[[0,\". **\"],[-1,\"D4** ✅ fix applied — verify after page reload\"],[1,\"B7** (bet range too tight) — apply sweep results, lower bet_adj_cap\"],[0,\"\\\n2. **B\"],[-1,\"7\"],[1,\"9\"],[0,\"** (\"],[-1,\"bet range\"],[1,\"AQo\"],[0,\" too\"]],\"start1\":5920,\"start2\":5920,\"length1\":74,\"length2\":90},{\"diffs\":[[0,\"oo tight\"],[-1,\") — apply sweep results\"],[1,\" preflop) — check ng_preflop SB thresholds + pot-odds override\"],[0,\"\\\n3. **U3\"]],\"start1\":6008,\"start2\":6008,\"length1\":39,\"length2\":78}]"
metadata_diff: {"new":{},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2026-06-23T12:07:21.058Z
created_time: 2026-06-23T12:07:21.058Z
type_: 13