Skip to content

Draft: migrate executor to unified @polymarket/client - #22

Closed
runesleo wants to merge 11 commits into
mainfrom
chore/polymarket-client-migration-20260909
Closed

runesleo wants to merge 11 commits into
mainfrom
chore/polymarket-client-migration-20260909

Conversation

@runesleo

@runesleo runesleo commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

Scope

Isolated executor migration only. The read-only CLI/MCP core is unchanged.

Implemented

  • migrate executor target from @polymarket/clob-client-v2 to unified @polymarket/client 0.9.x
  • preserve Ethers v5 wallet compatibility through the official signer adapter
  • attach the existing Builder Code per limit order under the unified SDK
  • preserve dry-run default, explicit EXECUTOR_LIVE=1 gate, and $10 default notional cap
  • align GTD local preflight with the unified SDK's 180-second minimum expiry
  • preserve secret redaction and the existing injected-client safety-test seam
  • keep the legacy-shaped RawOrderClient seam so pre-migration safety tests remain applicable
  • add a read-only builder-status probe for current builder fee rates + first page of attributed trades; no wallet keys required
  • regenerate and commit executor/package-lock.json from a Node 24 GitHub runner

Final CI evidence — 2026-09-09

Branch push run 34304270876 on head a9d6fb586634ca11dcdcf575d3599b31c9786d82:

  • Node 24 setup: PASS
  • immutable npm ci: PASS
  • unit tests: PASS
  • TypeScript typecheck: PASS
  • dry-run builder attribution: PASS
  • workflow permissions restored to contents: read; no branch-write/auto-lock step remains

Earlier lock-generation run 34304136232 also passed and created commit 5174c523342132a54c1cf8f911a04dda7c04ad90 (chore(executor): refresh package lock).

Deliberately not done

  • no merge to main
  • no live order, cancellation, signing, wallet mutation, or credential change
  • no Builder Fee configuration change
  • no self-trade or artificial attribution test
  • no x402 deployment

Remaining business/runtime verification before live use

  • run the read-only builder-status probe against Polymarket's live service when a runtime can reach clob.polymarket.com; current Chat/web environment cannot safely resolve the direct API URL, so do not infer fee=0 or no attributed trades
  • verify any custom-host requirement before removing or retaining legacy EXECUTOR_HOST; unified SDK production environment should remain canonical unless there is a real operator requirement
  • first real attribution proof must come from bona-fide third-party order flow, not Leo self-trading

Merge boundary

Engineering migration is green. Keep this PR Draft until Leo explicitly approves merging the public repo change; live execution and Builder Fee activation are separate later approvals.

@runesleo runesleo closed this Sep 30, 2026
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