Dashboard cards were summing the rolling 100-bet window client-side —
AIcAIc read -5.62 while lifetime (both its addresses) is -15.84/10. The
feed now publishes:
- wallet_pnl: lifetime per-NAME rollup (state + spooled archives), so
address changes and window rotation can't skew the cards
- last_fill: stamped in _drain_fills for the bot-health strip
- <feed>_full.json: EVERY bet + EVERY miss ever (state + archives),
written under the same change-gate, published alongside
Misses now spool to copybot_missed_archive.*.jsonl instead of silent
deletion at the 200 cap (settled rows spool first — open misses must stay
in state for the missed-settle resolver); state was at 199/200, nothing
lost. Archives join the publish set so history survives machine loss.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
First run exited 1 after a successful score: the exit trap's relative
rmdir ran from the repo root (post-cd) — wrong dir, stale lock left in
research/, every future night would have skipped itself.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replays candidate sets through the engine's mirrored mechanics (stake rule
+ DD halving + their-shares ceiling + one-market-one-stake adds + all-or-
nothing cash gate + proportional sell mirror, copytrade.py cited) with the
calibrated sim fill model and tape proxy-resolution. Per-wallet conviction
floors from the paper config's pinned p80s (candidates without pins get
tape-p80, same rule). Outputs per-set×bankroll: realized/open, deployment
stats, miss families (capital/crater/band), capital-miss hypothetical P&L,
per-wallet realized, and --loo leave-one-out marginals at $1k.
Validated against the real paper book on the same window: 33 replay opens
vs 26 real (backfill bias documented — pre-tape positions' adds replay as
opens), capital misses 0 vs 0, peak deploy 62% vs the era's 74%, mean
deployed $297 vs ~$360. SEARCH TOOL ONLY per the silo README — verdicts
stay with forward_ledger.jsonl.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The nightly Mac-coupled bulk ingest was the fragile link (today: Mac slept
through 08:00, the pipeline started 09:31, and the sftp bulk pull wedged in
timeout cascades holding the db lock — digest blocked behind it). Stage 0
moves the fold onto the box and reduces the Mac to an incremental mirror:
- recorder/fold.py (sidecar, capture stays PID 1): closed gz segments ->
zstd parquet /data/parquet/<fam>/date=*/segment.parquet, row-parity
verified, manifest-logged, THEN gz deleted. Deletion invariant STRONGER:
raw needs a verified parquet; parquet needs a Mac ACK before the disk
guard may prune it. duckdb capped 384MB; VM 256MB -> 1GB.
- recorder/sync_tape.py (com.jaxperro.tape-sync every 15 min + daily.sh):
manifest-driven incremental sftp pull, per-file row verify, append into
rtds.duckdb NATIVE tables (views-over-parquet rejected: sim's per-asset
point queries would crawl), segment-keyed idempotence shared with the
legacy ingest.py (kept as fallback), ack back to the box.
- recorder/bootstrap_parquet.py: pre-fold history exported to the mirror,
parity OK (13.84M trades + 3.07M aux). live/parquet/ is now the complete
durable layer Stage 1 (MotherDuck/ClickHouse) would consume.
- research/tape.py connect(): brief retry — the 15-min sync holds the
write lock for seconds.
First run: backlog folded in <60s on the box, 36/36 files mirrored+
verified, rtds.duckdb 13.8M -> 18.2M trades, tape age 24h+ -> ~15-45 min.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Gamma's default /markets listing HIDES closed markets — the resolved
Odyssey market returns [] without &closed=true. Closed markets are
exactly the population repair_market_meta exists for (resolved-but-stuck
positions), so the gamma-only lookup left the paper book's own Odyssey
copy (178.57sh, resolved won) and its France-WC position permanently
cond-less; both verified resolving via the closed view. The fetch edge
is factored into _gamma_markets so the variant order, caching, and
error-then-fallback paths are unit-tested.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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>