Root cause of the 07-20 CASH≠CHAIN -$1.75: some markets stream RTDS
trades with empty title/outcome/conditionId; the seed stored them
verbatim, on_wallet_activity's 'tok not in self.conds' guard made the
empty value sticky, and settle_resolved's 'if not cond' skip left the
position silently unsettleable until the venue auto-redeemed it.
Three-layer fix:
- RTDS seed: when the payload lacks conditionId/title, enrich from the
token id via _token_market (gamma, cached) before dispatch; the copy
still goes through on a miss.
- conds write: falsy-overwrite instead of key-presence, so a later,
richer source repairs an empty entry.
- repair_market_meta (called at the top of every settle pass, holding
the lock): re-resolves empty conds for my_pos AND open missed entries,
backfills position/bet/missed records, 300s per-token lookup backoff,
and a once-per-token alarm when a position has sat unsettleable >1h.
A repaired token settles in the SAME pass — the Odyssey bet would have
self-healed the moment the market resolved.
The paper book currently carries 4 empty conds and both books have
cond-less open missed entries — the repair pass fixes those on the first
cycle after deploy. tests/test_meta_repair.py covers backfill, backoff,
the single alarm, recovery, and the end-to-end repair->settle un-stick;
full suite 8/8.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 first firing failed two ways: launchd's bare python3 has no
duckdb (framework python does), and 09:15 preceded the sleep-delayed daily
pipeline's tape ingest, so even a clean run would have scored a stale
tape. nightly.sh now uses the framework python and polls tape max-ts until
it is <6h old (15min polls, 8h deadline, then scores anyway and logs the
staleness).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CASH≠CHAIN -$1.75 root-caused: the 07-16 BikesAreTheBikes copy booked with
empty title/outcome/cond, so settle_resolved could never resolve it; the
venue auto-redeemed $1.694914 on-chain (tx 0x4f303e0e…) while the book
held it open. Hand-settled exactly as settle_resolved would (won @ 1.0,
pnl +$0.68, my_pos/conds cleaned, metadata backfilled from the venue
record) and folded the +$0.050314 fill-rounding remainder as an
adjustments entry (non-trading income, zeroes CASH≠CHAIN, cash credited).
Post: cash == chain $49.324270 (3 RPCs agree), raw drift +0.0003 (0.00).
Machine stopped + heartbeats watched to cessation per the HANDOFF ops
procedure; root cause filed as #18.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
FINDINGS: 'The tape era opens' section (sharp screen 742/742 proxy
validation, Study A identity-null, Study B winner's curse, crater refill
clock) + scorecard rows for the two forward-window studies + research/ in
repo layout. HANDOFF: #16/#17 in the open queue, research silo + nightly
launchd in snapshot/ops. README: research/ directory row.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The flat 10s retry was calibrated to nothing; the tape now says craters
refill at very different speeds (research requote_timing, 775k crater
prints): crypto 94% within 4s, esports 83% within 10s, sports only 70% at
10s but 76% by 25s, geo/politics tails run minutes (price guard is the
protection there, not the retry). Waits move to FAK_RETRY_NICHE_DEFAULT
{crypto 4, esports 10, sports/geo/politics/other 25}, classified by the
validated research niche patterns (esports before sports so 'LoL: A vs B'
doesn't fall through on ' vs '). cfg fak_retry_niche_s overrides per key;
fak_retry_s stays the fallback (tennis: no measurement yet) and 0 still
disables the feature. Paper-parity: same map both bots. test t8 covers the
map, first-match classing, fallback, and config override.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
live/tape_sharps.py — insider.py's improbability z transplanted onto the
3-day tape (13.8M fills, ALL wallets, no survivorship bias): proxy-resolve
tokens from terminal-VWAP convergence (0.97/0.03, 2h quiet, sibling veto),
net held positions per wallet-token, z = (W - Σp)/sqrt(Σp(1-p)) over
proxy-resolved held bets, then payouts.py chain-truth overlay on the
shortlist (refunds count as neither). Copyable/algo split: discrete-entry
conviction bettors (<= 6 fills/bet, <= 90 bets, med >= $50) vs continuous
flow accounts that score huge but can't be mirrored at 3-17s lag.
First run (tape through 2026-07-20 16:59): 2,360 wallets screened, 561
score z >= 2 with pnl > 0, 25 copyable candidates at z 4.0-5.5 — chain
validation 742 payout vectors, ZERO proxy flips. Benchmark sanity: benched
sharps (LSB1 +3.28, EdwardIN +2.38) land positive, benched losers negative.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
'no orders found to match with FAK order' is the #1 miss class (13 of the
last 48h's misses) — the copy lands in the crater the sharp just swept,
before makers requote. Instead of recording the miss at the first
rejection, hand the OPEN to Copybot.fak_requote_retry: sleep fak_retry_s
(default 10, 0 disables) OUTSIDE the bot lock, then re-run the whole gated
buy path (fresh quote, price guard, depth gate) exactly once, mirroring
the webhook call site's fill drain so a retry fill books lag + bet rows.
A second rejection records the miss tagged 'twice (re-quote retry)'.
Paper-parity: the hook is installed in both modes, and PaperExecutor's
FAK model re-decides on the fresh book. tests/test_fak_retry.py covers
hook scheduling, no-double-count sizing (their_size=0 re-entry), ADD and
non-FAK bypasses, and the end-to-end retry thread.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>