5 Commits

Author SHA1 Message Date
jaxperro 376c836068 deploy_bot: banner-wait parses fly log stamps as UTC (timegm, not mktime)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 16:09:30 -04:00
jaxperro b7b1487175 copybot: migrate Railway (US region, geo-blocked) -> Fly.io arn Stockholm
Polymarket geoblocks order placement by IP and Railway ran the worker in a
US region — fine for the paper bot (reads only) but a dead end for going
live. Fly arn (Sweden, unrestricted, ~25ms from the CLOB's eu-west-2
primaries) passes: geocheck VERDICT TRADABLE, pm geoblock blocked:false.

- host/geocheck.py: 3-probe geo-gate verdict (ipinfo, pm /api/geoblock,
  unauth CLOB order POST); --idle keeps a test machine up
- host/start.sh: geocheck at boot (GEOCHECK_ONLY=1 = probe-and-idle test
  mode, no second book-writer); warns loudly if a region is blocked
- fly.toml/fly.Dockerfile: wwf-copybot, single machine, http_service :8080
  for the Alchemy push webhook (now wh_blf4qjjvfdbqs9mc -> fly.dev domain)
- deploy_bot.sh: railway redeploy -> flyctl apps restart + banner wait

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 16:02:06 -04:00
jaxperro bf15d5199e deploy: auto-sync the Alchemy webhook address list to the follow set
live/sync_webhook.py diffs copybot.paper.json's wallets against the
push-mode webhook's address list (Notify API) and patches add/remove;
wired into deploy_bot.sh. Needs alchemy_notify_token in the gitignored
config.json (dashboard -> Webhooks -> Auth token); skips politely
without it — the 5-min backstop poll covers the gap at poll-speed lag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 01:12:18 -04:00
jaxperro 0c7ee62ed7 copybot: push mode — Alchemy webhook + heartbeat + backstop poll
Setting ALCHEMY_SIGNING_KEY on the worker switches start.sh to webhook
mode: instant copies on POST /alchemy (signature-verified), a 60s
housekeeping heartbeat (settle, feed, summary), and a full backstop poll
every 5 min so a dropped push costs minutes, not a silent miss. Webhook
mode now baselines at boot and publishes an initial feed like poll mode.
No signing key -> classic 60s poll, unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 00:07:23 -04:00
jaxperro 4190455436 copybot: compact follow config + auto floors + one-command deploy
config format matches backtest.json — one entry per wallet:
  wallets: [{wallet, name, class: volume|whale, floor?}]
normalize_follow_config expands it into the legacy watchlist/watch/
floors/classes structures (old-format configs like config.live.json
pass through untouched). Volume wallets without an explicit floor get
an auto p80 derived from the data-api at boot (the worker has no cache),
logged and published in the feed. live/deploy_bot.sh = validate ->
preview -> commit -> push -> railway redeploy -> confirm boot.

Promotion workflow: prove a wallet in backtest.json, copy the same
entry into copybot.paper.json, run deploy_bot.sh.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-05 23:10:51 -04:00