EP052 / Local Arena

Simulated market · real Python decisions · durable SQLite balances. Click each stage for its contract.

1. Browser → local server

Serve the workspace at 127.0.0.1:8052. Validate Host and same-origin mutation requests. No external network adapters or credentials.

2. Operator → cycle control

Step advances one cycle while paused. Run starts a single server-owned loop; pause prevents subsequent cycles. Restart always pauses. Create a new simulation without deleting old run files.

3. Reference agents → typed intents

Twenty versioned simulated strategy prices feed three existing deterministic reference agents through SDK lifecycle validation. Reject invalid intents; volatile regime may produce HOLD.

4. Settlement → durable accounting

Use existing ArenaAccounting buy transactions: whole units, cash/holdings/inventory conservation, idempotent operation ID. Persist cycle journal before execution; retry interrupted cycle with same IDs.

5. Server → workspace

Snapshot API and server-sent snapshots update cash, holdings, valuations, strategy inventory and decision log. Stream reconnects fetch authoritative state; do not claim event-only production replay.

6. Verification → user review

HTTP tests and full regression, then real browser controls, persisted reload and screenshots. User review remains pending; does not certify full EP052 production readiness.