chemavxandClaude Opus 4.8 54fc8fa11a fix(news): strip GNews operator dashes and stop phantom query-budget counting
Two minor faults found during the GNews capture/prioritisation diagnostic:

1. Hyphens/dashes reached the GNews query verbatim. '-' is GNews's exclusion
   operator, so a token like "El-Sayed" returned HTTP 400 and wasted a query.
   _PUNCT_RE now strips '-', en dash and em dash to spaces.

2. The per-cycle GNews budget counter incremented in evaluate() before
   get_sentiment() checked the API key, so with no key configured the
   [CYCLE SUMMARY] reported a phantom "gnews_queries_used: 5/5" with zero real
   requests. Added NewsClient.enabled and gated the GNews block on it; with no
   key the counter stays 0/5 and no spurious SKIP_GNEWS_PRIORITY is logged.
   No behaviour change when a key is present.

Prioritisation itself was confirmed correct and is left untouched: politics
markets are sorted by gnews_priority DESC and prior-extreme markets return
before the budget is consumed, so no query is ever spent on a market that
cannot trade.

Tests: tests/test_news_query.py (4 new); full suite 66 passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 08:07:05 +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%