Skip to content

fix(polymarket): use runtime auth path for backtest publisher access#71

Merged
taariq merged 2 commits intomainfrom
fix/polymarket-subprocess-mcp-runtime
Mar 6, 2026
Merged

fix(polymarket): use runtime auth path for backtest publisher access#71
taariq merged 2 commits intomainfrom
fix/polymarket-subprocess-mcp-runtime

Conversation

@taariq
Copy link
Contributor

@taariq taariq commented Mar 6, 2026

Summary

This PR fixes Polymarket backtest bots that failed in logged-in Desktop subprocess runs when seren-mcp is not present in shell PATH.

What changed

  • Removed seren-mcp subprocess transport path from:
    • polymarket/maker-rebate-bot/scripts/agent.py
    • polymarket/liquidity-paired-basis-maker/scripts/agent.py
  • Standardized runtime auth token lookup to use:
    • API_KEY (Seren Desktop runtime)
    • fallback SEREN_API_KEY (standalone)
  • Applied the same runtime auth behavior to:
    • polymarket/paired-market-basis-maker/scripts/agent.py
    • polymarket/high-throughput-paired-basis-maker/scripts/agent.py
  • Kept/enhanced publisher policy enforcement checks (data + trading publisher prefixes).
  • Updated polymarket/liquidity-paired-basis-maker/SKILL.md runtime auth wording.

Validation

  • python3 -m py_compile on all 4 modified agent scripts: pass
  • Smoke tests:
    • polymarket/maker-rebate-bot/tests/test_smoke.py (6 passed)
    • polymarket/paired-market-basis-maker/tests/test_smoke.py (4 passed)
    • polymarket/high-throughput-paired-basis-maker/tests/test_smoke.py (4 passed)
    • polymarket/liquidity-paired-basis-maker/tests/test_smoke.py (4 passed)

Issue

Closes #70

…ests

Use runtime auth token resolution (API_KEY or SEREN_API_KEY) for publisher calls across maker/liquidity/paired/high-throughput bots and keep publisher policy checks intact.\n\nRefs #70
@taariq taariq self-assigned this Mar 6, 2026
@taariq taariq merged commit 865b60f into main Mar 6, 2026
2 checks passed
@taariq taariq deleted the fix/polymarket-subprocess-mcp-runtime branch March 6, 2026 17:27
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.

bug(polymarket): bot subprocess should use logged-in MCP context, not spawn seren-mcp / require API key

1 participant