chemavxandClaude Fable 5 0ac48ba7f8 feat(replay): R1 replay core — clock injection + replay of archived cycles
Re-executes BayesianStrategy.evaluate() over the R0 archive and stores
results in replay_runs/replay_decisions, tagged with git sha + a hash of
the strategy constants (same hash vs archive = determinism check,
different hash = counterfactual run).

- bayesian.py: optional as_of param on evaluate()/_days_to_resolution()
  (clock injection; default None = wall clock, prod behavior unchanged —
  the only touch to frozen code, purely additive)
- bot/replay.py: replay engine + CLI (python -m bot.replay --from --to);
  ReplayNews feeds archived sentiment back (GNews never called, per-cycle
  budget bypassed — archived sentiment already encodes it); manifold/db
  not wired (observational-only in prod); recorded-vs-replayed compare
  at 1e-9 tolerance
- schema.sql: replay_runs + replay_decisions (+ indexes), idempotent
- db.py: 6 replay accessors/writers
- tests: 19 new round-trip fidelity tests (104 total green)

Validated against a real prod cycle (2026-07-02T14:03:15Z, 46 markets,
4 skip paths incl. the Georgia confidence record): 46/46 matched,
max float delta 0.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 14:05:25 +00:00
2026-05-20 13:52:53 +00:00

polymarket-bot

Bot de paper-trading para Polymarket con estrategia bayesiana, API FastAPI y dashboard React. Corre en k3s vía GitOps (Gitea Actions → registry → ArgoCD).

Componentes

Componente Código Imagen CMD
bot bot/ polymarket-bot python3 -m bot.main
api api/ (+ bot/ como librería) polymarket-bot-api uvicorn api.main:app
dashboard dashboard/ polymarket-bot-dashboard nginx estático

Dashboard: https://polymarket.chemavx.xyz

CI/CD

.gitea/workflows/ci.yml construye solo las imágenes cuyos ficheros cambiaron en el push (diff contra github.event.before):

  • bot/, api/, requirements.txt → bot + api (ambas imágenes copian las mismas fuentes Python; solo cambia el CMD)
  • Dockerfile → bot · Dockerfile.api → api · dashboard/ → dashboard
  • .gitea/workflows/ci.yml, primer push o force-push → todas (fallback seguro)
  • tests/, docs → ninguna (la CI no construye ni despliega nada)

Las imágenes se tagean con ${GITHUB_SHA::8}; el CI actualiza solo los deployments reconstruidos en k8s-manifests/polymarket-bot/ y ArgoCD sincroniza vía webhook en segundos.

Tests

python3 -m pytest tests/ -q
S
Description
Polymarket trading bot
Readme
2.6 MiB
2026-07-06 07:40:44 +00:00
Languages
Python 95.8%
JavaScript 2.9%
CSS 1.1%
Dockerfile 0.1%