MarketData Adapter: runtime startup/shutdown + health/metrics + tests + CI#199
Open
VirilePeak wants to merge 79 commits intoPolymarket:mainfrom
Open
MarketData Adapter: runtime startup/shutdown + health/metrics + tests + CI#199VirilePeak wants to merge 79 commits intoPolymarket:mainfrom
VirilePeak wants to merge 79 commits intoPolymarket:mainfrom
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
…-automatic) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…secrets) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… file to prevent duplicate webhook processing after restart Co-authored-by: Cursor <cursoragent@cursor.com>
…enen Wert zu überschreiben — verhindert Verlust benutzerdefinierter PYTHONPATH-Einträge beim Start. Co-authored-by: Cursor <cursoragent@cursor.com>
…rice drop detection logic, and refactor market token fetching to use httpx directly
…on branch Co-authored-by: Cursor <cursoragent@cursor.com>
…ing for market data retrieval
YAML value for 'commit-message' contained a colon causing a nested mapping parse error; changed to block scalar. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…n PR) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… test Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…irmation store, exit safety; tests and scripts Co-authored-by: Cursor <cursoragent@cursor.com>
…n confirmation key Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ptance; remove duplicate confirmation block Co-authored-by: Cursor <cursoragent@cursor.com>
…irmed) Co-authored-by: Cursor <cursoragent@cursor.com>
…when scheduling market data consumer Co-authored-by: Cursor <cursoragent@cursor.com>
…available Co-authored-by: Cursor <cursoragent@cursor.com>
…odule introspection issues Co-authored-by: Cursor <cursoragent@cursor.com>
…pter EventBus and handle realtime soft-stops Co-authored-by: Cursor <cursoragent@cursor.com>
…st-effort) Co-authored-by: Cursor <cursoragent@cursor.com>
…'await' outside async) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…eation (best-effort) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…t token Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…/unsubscribe Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…r; ensure subscribe scheduling uses module var Co-authored-by: Cursor <cursoragent@cursor.com>
…to increase live data coverage Co-authored-by: Cursor <cursoragent@cursor.com>
…; reconcile loop + heartbeat Co-authored-by: Cursor <cursoragent@cursor.com>
…to subscribe/unsubscribe Co-authored-by: Cursor <cursoragent@cursor.com>
…ests Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…g_threshold; export reconcile state/desire map Co-authored-by: Cursor <cursoragent@cursor.com>
…unts + missing cycles Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… token; add message-flow verification warning (no msgs while subs>0) Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… (fallback to opened_at) Co-authored-by: Cursor <cursoragent@cursor.com>
…irement) Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
Main points: entry gate is now enforced via chokepoint + low-level guard; kill-switch cooldown is persistent via RISK_STATE_PATH; CI green; tests added.\n\nPlease focus review on: order_executor gate wiring, execute_order enforcement flag, kill-switch persistence/atomic write.\n\nAddendum: trade reporting CLI added (tools/research/trade_report.py + scripts/trade_report.py) to aggregate artifacts and report ALL vs ONLY_REAL, confidence breakdown, rolling windows, exit reasons and blocked reasons (best-effort). Tests included. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Entry/Risk Gate ist jetzt “un-umgehbarâ€^] (Chokepoint + low-level enforcement) Kill-Switch Cooldown ist persistent (überlebt Restart via RISK_STATE_PATH) Details: - src/order_executor.py::place_entry_order_with_gate() als zentraler Chokepoint - ^Ggents/polymarket/polymarket.py::execute_order(... gate_checked=...) wirft, wenn ENTRY_GATE_ENFORCE_POLY=True und Gate nicht geprüft wurde Neue Settings: - MAX_ENTRY_SPREAD, HARD_REJECT_SPREAD, ENTRY_REQUIRE_FRESH_BOOK, ENTRY_GATE_ENFORCE_POLY - Kill-switch: KILL_SWITCH_* + RISK_STATE_PATH Persistence: - Default data/risk_state.json, atomarer Schreibvorgang (temp + rename), auto-clear nach Ablauf Tests hinzugefügt: - ests/order_executor/test_executor_gate.py - ests/risk/test_entry_gate.py - ests/risk/test_kill_switch_persistence.py Risk/Notes: - Default ENTRY_GATE_ENFORCE_POLY=True kann in Notfällen deaktiviert werden (nicht empfohlen) - Gate kann initial viele Einträge blocken, wenn Märkte untradable (erwartetes Verhalten) \n\n### Addendum: trade performance reporting CLI\n- Adds ools/research/trade_report.py CLI to aggregate trade artifacts (JSON/JSONL/CSV) and report ALL vs ONLY_REAL (non-smoke/test/paper), confidence breakdown, rolling windows, exit reasons and blocked reasons (best-effort).\n- Wrapper script: scripts/trade_report.py\n- Includes pytest fixtures + unit test: ests/research/test_trade_report.py\n- Example: python -m tools.research.trade_report --roots --out-md report.md --out-json report.json --last-n 50 --since-hours 24 --print-blocked\n\nCI note: ensure CI runs pytest -q so the new test runs automatically.