rtally now uses the same redeem-vs-sell price discriminator as the
backtest (exit_p ≈ payout ⇒ held; mid print ⇒ SOLD). The sign-only
tally counted a mirror-seller's exits as wins — 0xb0E43B read '94.4%
all-time' on 937 sells with almost no held outcomes. Win% is held-only
now, sold P&L stays in the P&L columns, all_sold/conv_sold/conv30_sold
populate for the dashboard's +NS record chips.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Chosen by the aligned honest 30d replay (2026-07-08): Set E $24.4k
(+2338%) vs Set D $17.4k (+1636%); every member positive in the shared
book. oliman2/leegunner excluded on the anti-survivorship audit.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Audit of the two biggest All-Time-vs-PM divergences (oliman2, leegunner)
proved the fold-in RIGHT and PM's leaderboard wrong: live per-position
sums reproduce our numbers to the dollar (oliman2 +181,594 closed
-160,644 abandoned = ~+19k true vs leaderboard 112k; leegunner +323,707
-58,762 = ~274k true vs 347k). redeemable is exact (set on resolution
for winners AND losers); pinning misfolded a few unresolved longshots.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Three fixes from the 2026-07-08 alignment audit (bot feed vs replay,
row-by-row):
1. sold-detection no longer trusts res_t alone — for in-play markets
res_t is endDate metadata (game-DAY midnight, pre-dates the entry) so
the timestamp test never fired and every in-play sell booked as
held-to-resolution. Price is the fallback truth: a redeem prints
exactly the payout, a real sell prints a mid price (>2c off payout).
2. round trips on resolved-on-chain markets are booked, not dropped —
when the trusted cache row never qualifies (bogus forward res_t:
Chidekh 'unresolved until Jul 14' on a Jul-5 match) the bet used to
vanish; now redeem-closes book at chain truth, sell-closes mirror.
3. Set-D wallets gate on the bot's PINNED floors (copybot.paper.json),
not a recomputed p80 that drifts a few % and takes different bets.
Also: resolved display slice 60 -> 250 rows.
Cross-check: 9 settled Set-D bot bets -> 7 agree, 0 absent, 2 diffs that
are real execution gaps (bot missed the sharp's exit, rode to
resolution) — each book records what actually happened to IT.
Equity 30d: $29.1k -> $17.4k (+1636%) — the flattering artifacts are gone.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The daily freshen reset the bets + exits cursors but never pulled_entries,
so a watchlist wallet's first_buy map went up to 14 days stale and
portfolio.py silently dropped every bet on conds entered since the last
pull (`if not et: continue`) — neither resolved nor open. Kruto2027's
Jul-7 Brewers bets (visible SOLD in the live bot) and two losing bets
were absent from the backtest for exactly this. Entries re-pulled for
Set D + portfolio regenerated: Kruto 43->49 bets, both Brewers rows
booked, hidden losses folded in.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
py-clob-client==0.34.6 + web3==7.16.0, the versions preflight_live.py
was validated against. Paper path stays import-lazy/unchanged.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every drained buy fill is now recorded: the tok-match keeps _record_lag
(real lag/slippage), leftovers get a bet record synthesized from the fill
(_record_untracked_buy). check_book() asserts the book invariant after
every trade and at boot: my_pos token => bet record + conds entry + cash
debited. Records/conds self-correct; the cash leg heals only at boot and
only when ledger_drift matches one un-vouched position's cost+fee exactly
— anything else stays a visible ⚠ drift. my_pos entries now carry cond
(engine) and fills-ledger BUY lines carry token, so the book can always
self-attribute. reconcile_exits' drain no longer discards leftover buys.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The heartbeat/dashboard 'avg lag' was a lifetime accumulator that mixed the
retired 60s poll era into push mode, so a genuinely ~3s bot read as 48s.
lag_recent now keeps the last 24h of (ts, lag, slip); summary + feed report
the 24h average (n = lifetime copies, n24 = fills in window). Backfilled from
copybot_fills.jsonl on boot so it's populated immediately. Verified: 24h view
12s vs 48s lifetime — reflects real push execution.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Self-contained handoff for a fresh session: current state (Set D live, honest
P&L, ledger reconciled), the orphan/cash-debit root-cause with the proper fix
(Option A surgical: record every drained buy fill + invariant assert; Option B
architectural: derive cash from the book), Phase 1 status (6/8 done; 1.3 worker
deps + 1.8 live-money dashboard remain), and standing to-dos (rotate Alchemy
key, delete Railway).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>