feat: M3 limit-order-book market + sharpebench-sim 0.0.8 (O(1) checkpoint)#13
Conversation
Price-time-priority continuous-double-auction engine: integer price ticks (no float keys), FIFO time priority, process_limit/process_market with partial fills, cancel + priority-preserving modify, canonical-order deterministic batch step, and a depth-ladder/microprice/queue-imbalance snapshot. Golden-hash pinned; 11 tests pass. WIP: the pyo3 PyOrderBook binding + the Python LOB env are pending (the parallel build was interrupted by infra limits); engine is self-contained and validated.
pyo3 PyOrderBook wraps the deterministic CDA engine (reset_book/step_book over a flat order JSON, fills + depth-ladder out). LOBMarketEnv is a PettingZoo ParallelEnv where N market makers quote into one shared book against a seeded noise trader; per-agent depth-ladder obs + mark-to-mid-minus-inventory reward, leak-free (book clears before the next obs). Passes parallel_api_test. Completes M3 (engine committed in 4b00b93).
Bump the sharpebench deps 0.0.7 -> 0.0.8 (TRF turnover cost, parameterized vol/jump generator, and env clone_state/restore_state now available). Wire the O(1) engine snapshot: PyTradingEnv.clone_state/restore_state (serde EnvState), OpenOutcryEnv passthrough, and a native=True fast path on CheckpointableEnv that rewinds in O(1) instead of replaying the decision prefix. Native and replay paths agree byte-for-byte. CostModel literals updated for the additive trf_cost field.
|
Warning Review limit reached
More reviews will be available in 55 minutes and 32 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (13)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Finishes the two big deferred technical items.
M3 limit-order-book market
A deterministic integer-tick continuous-double-auction engine (
lob_market.rs): price-time priority, market/limit/cancel/modify (priority-preserving on size-decrease), partial fills, golden-hash-pinned. Exposed viaPyOrderBook(JSON boundary) andLOBMarketEnv— a PettingZoo ParallelEnv where N market makers quote into one shared book against a seeded noise trader, with a depth-ladder/microprice/queue-imbalance observation. Passesparallel_api_test. Leak-free (book clears before the next obs); byte-identical tape.sharpebench-sim 0.0.8 consumed
Released
sharpebench-sim 0.0.8(TRF turnover cost, parameterized vol/jump generator, envclone_state/restore_state) and bumped the deps. Wired the O(1) native checkpoint:CheckpointableEnv(native=True)rewinds via the engine snapshot instead of replaying the decision prefix; native and replay paths agree byte-for-byte. (TRF cost + parameterized vol/jump are now available in the engine for future wiring.)Verification
cargo 70 tests (incl. 11 LOB engine) + wasm32 + clippy clean; maturin + pytest 339 passed, 2 skipped. 124 exports.
Remaining blocked items (need your input): EdgeLint/OrderLog (missing
sharpebench-stats/holotypecrates), TapeTrace + Gordon adapter (Gordon do-not-touch constraint), Hub publish (auth).