Execution-outcome record: Plan 1 (the position_manager execution migration) is IMPLEMENTED. All 11 tasks ran via subagent-driven development with per-task opus reviews plus a final whole-branch opus review — verdict READY TO MERGE, no Critical/Important. On-disk ledger: /Users/levander/coding/pmv2/position_manager/.superpowers/sdd/progress.md.
For Agents
Done, committed on
mainin BOTH repos, NOT pushed, autotrade mode OFF (unchanged). Nothing armed or deployed. PM headcbd0f4c, fetch headafc785d. Gate green: PM 43+5, polymarket-clob 11, fetch 529 / 0-failed.
What landed
A new position_manager (PM) crate at /Users/levander/coding/pmv2/position_manager now owns:
- The polymarket-clob signing client (moved in;
use_server_timedisabled → saves ~20–100 ms/order by dropping the serialGET /timebefore each POST). place_orderfor both buy and sell (place_buy≡ oldsubmit_live,place_sell≡ oldauto_sell).- The position ledger code (
mark_*/record_*/bump_breaker_count). - Onchain
eth_callhelpers — now withconnect_timeoutadded on the move. - Caps/breaker readers (
load_caps/load_breaker). FillSink/FillEventSinkwatcher seam traits — declared but unimplemented (reserved for Plans 2/3).
polymarket_fetch was rewired to depend one-way on PM. submit_live / auto_sell / execute.rs deleted upstream; live buy+sell now route through PM::place_order.
Behavior-preserving — proven
- 11 ledger SQL strings byte-identical.
place_buy≡submit_live;place_sell≡auto_sell.notifystrings byte-identical.- Locked clob hash/parity tests intact.
- Gate: PM 43+5, polymarket-clob 11, fetch 529 / 0-failed.
State
| Repo | Head | Branch | Pushed? |
|---|---|---|---|
| position_manager | cbd0f4c | main | NO |
| polymarket_fetch | afc785d | main | NO |
Autotrade mode OFF (unchanged). Nothing armed / deployed.
OPEN USER DECISIONS — resolve before relying on these
- Caps expose-only.
load_caps/load_breakerexist, but the fetch read path is left unchanged to avoid drift — the DoD (“caps read viaload_caps”) is met at API level only, not wired through upstream. Decide whether to accept that gap or do the upstream swap.- Pre-arm notify check. Before arming live: live-test that PM’s
notifyArc routes to the autotrade Telegram channel (the reviewer could not verify this statically — the live signer/notify wiring is built at startup only).- Breaker-vs-no-signer check-order flip. A benign reorder:
no-signer + breakernow →mark_canceled(old behavior:mark_failed). No POST happens either way; arguably more correct. Decide whether to accept.
Follow-ups
- Make
SigningClientClone — removes the startup double-build of the live signer. - Add a host-injectable signer seam — enables a true end-to-end
pm.place_orderdb-test (currently blocked becauseSigningClienthost is hardcoded and a mock seam was forbidden as test-only prod code; full-path control flow was instead covered by char-by-char review in Task 7).