Skip to content

Task 02c: subgraph yes_token fix, gamma resolved_at, historical backfill, batch mode#1

Merged
MaksymDS merged 7 commits into
masterfrom
retroactive/task02c-history
Apr 26, 2026
Merged

Task 02c: subgraph yes_token fix, gamma resolved_at, historical backfill, batch mode#1
MaksymDS merged 7 commits into
masterfrom
retroactive/task02c-history

Conversation

@MaksymDS
Copy link
Copy Markdown
Contributor

Summary

  • fix(subgraph): market filter now passes YES token decimal ID instead of condition ID hex — was causing 0 trades returned for all markets (Fix 1)
  • fix(gamma): closedTime → resolved_at and outcomePrices → resolution_outcome now populated on upsert (Fix 2)
  • feat(gamma): historical backfill via --closed --end-date-min/max; swept 2020–2026 → 865,789 markets (Fix 3)
  • feat(cli): fflow collect subgraph --all-resolved batch mode with --min-volume, --max-volume, --categories, --limit; idempotency skip for already-collected markets (Fix 4)
  • fix(gdelt): gdelt_unavailable warning fires only once per process
  • test: regression tests for yes_token filter, enrichedOrderFilleds key, resolved_at extraction, _gamma_outcome parsing (28 tests, all green)

Results

See reports/TASK_02C_RESULTS.md for full before/after stats.

DB state after sweep: 911,237 total markets, 865,725 resolved, 852,602 with resolution_outcome.
Subgraph batch running in background: ~90 markets, 700K+ trades so far.

Test plan

  • uv run pytest — 89 passed, 2 skipped
  • Live subgraph test: 0x63a66ab... → 1,441 trades confirmed (Fix 1 working)
  • Gamma sweep: 865,789 markets upserted across 76 month windows

🤖 Generated with Claude Code

@MaksymDS MaksymDS merged commit 1064fbf into master Apr 26, 2026
1 check failed
@MaksymDS MaksymDS deleted the retroactive/task02c-history branch May 1, 2026 14:14
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