Skip to content

Add sports category scopes and automatic research protocols - #20

Merged
gilbertsahumada merged 32 commits into
mainfrom
codex/market-categories
Sep 18, 2026
Merged

gilbertsahumada merged 32 commits into
mainfrom
codex/market-categories

Conversation

@gilbertsahumada

Copy link
Copy Markdown
Contributor

Agents can now choose Sports and one or more sports instead of being globally limited to NFL. A scoped soccer award can be researched without a kickoff timestamp; matches still require a verified start 15 minutes to seven days ahead. Scope and timing are checked before model selection, for manual markets and again before a trade proposal is finalized.

Implementation

  • Version-1 core catalog: soccer, American football, basketball and tennis. all is bounded to that version. Reject empty/duplicate/unknown selections and ambiguous legacy mixtures.
  • Reviewed Polymarket tag/metadata classification with provenance and a shared five-page discovery budget. Do not grant permissions from model output or request filter tags.
  • Automatically use the existing nine-section NFL winner protocol only for verified NFL full-game winners; otherwise use the eight-section general protocol. New configs persist v4 forecasts, model proposals, coverage and final policy verdicts; historical configs and v1/v2/v3 reads remain supported.
  • NFL complements are not_applicable outside their declared protocol coverage, with no tools/cache access or credential requirements. Plugin permissions remain independent.
  • Add authenticated /market-categories, Studio preset catalog, CLI support and explicit lab migration. Alpha is now American football (config 7), beta soccer (config 4), schedules disabled. Existing JSONB only: no DDL or historical rewrite.
  • General v4 proposals cannot enter the NFL-only manual paper pilot.

Validation

  • 128 tests passed against PostgreSQL and again against Supabase, using isolated databases. Covers protocol routing, general TRADE/ABSTAIN, scope rejection before selection and on final refresh, timing, classification, pagination, optional plugin applicability, DTO compatibility and existing isolation/lease/cache regressions.
  • Format, lint, types and all workspace builds passed. Both Cloudflare entry points bundled with --dry-run; no remote deployment. Workspace build was rerun successfully after stopping Studio, which correctly prevents overwriting a live dev output directory.
  • Exactly two paid investigations completed with persisted v4 decisions and sources, unchanged model deepseek-v4.1-flash, and no model-output failures/retries:
    • Alpha 399a9b31-16bd-4f31-9f94-a6ea70541340: discovered NFL Lions/Bills O/U 55.5, 139.750s, model ABSTAIN → final ABSTAIN; retained Over forecast 47.5% (44–52%). The selected market was a total, so general routing was correct. NFL winner v4 routing was validated with controlled fixtures, not a third paid run.
    • Beta 1f428ef7-46c3-469e-bd5c-8ce632845e07: Vinicius Ballon d'Or, 163.517s, model TRADE → final ABSTAIN due to high uncertainty, missing information and insufficient conservative margin. Retained Yes forecast 0.5% (0.2–1.2%). Actual award tags and future close validated without kickoff.
  • Eleven cited source IDs per run. Cross-tenant run/evidence requests returned 404 both ways. Full model usage, snapshots and limitations are documented in apps/agent-service/MARKET-CATEGORIES.md.

Scope and delivery

Stacked on open #19 (codex/nfl-live-validation). 32 commits, one file per commit. No frontend, new provider, paper coverage expansion, merge, real trading or remote deployment. Local Studio has been restored. These runs validate functionality, not forecast calibration or profitability.

@gilbertsahumada
gilbertsahumada changed the base branch from codex/nfl-live-validation to main September 18, 2026 18:07
@gilbertsahumada
gilbertsahumada merged commit b0fc2c2 into main Sep 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant