Add paper trade approval gate#131
Conversation
|
Thanks Simon — PR is up against It looks like GitHub has the forked-PR workflows waiting in
No rush at all. Once those are approved/run, I’ll watch for any failures and keep any fix scoped to the paper-mode approval/risk/audit path in this PR. |
|
Thanks Simon — reviewed both. The blocking issue is just Black formatting on the two approval-gate files:
The Python 3.11/3.12 unit tests and security scan passed. I pushed a formatting-only follow-up commit to the PR branch and will watch the rerun. |
|
Quick update after the formatting-only follow-up commit: the new head The two fresh runs waiting in
No code action needed from me until those are approved/run. I'll keep watching and only touch this PR again if the rerun fails or you/reviewer asks for a change. |
|
Rerun is green now. The formatting-only commit
No further code action from me unless you or a reviewer wants a change. |
|
@rpelevin here is my review: Main issue: The code itself looks reasonable for a first approval-gate component. It deep-copies the payload, computes a canonical digest, blocks changed payloads, blocks unapproved execution, and records audit events. Specific concerns:
|
|
Thanks Simon, that is fair. I pushed follow-up commit
Local checks passed before push:
This still does not claim to close all of #102. The MCP server, dashboard Propose + Confirm UI, persisted approval mode, and compliance-grade immutable audit storage remain broader issue scope. |
sjackson0109
left a comment
There was a problem hiding this comment.
Good effort for your first contribution to this project. Thank you for your efforts!
|
Thanks Simon, appreciate the review and merge. I’ll keep this as a merged first slice only: paper-mode proposal approval, digest-bound execution, existing risk validation, circuit-breaker routing, and audit handoff. I’ll treat the remaining Issue 102 work as separate scope: MCP wiring, dashboard Propose + Confirm, persisted approval mode, and immutable audit storage. No further action from me unless you want a follow-up slice in one of those areas. |
Summary
Scope
This first slice is intentionally limited to the approval / risk / audit path for paper trading.
It does not touch live exchange execution, credentials, MCP transport, GUI, or the broader order execution engine.
Tests
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest test_trade_proposal_approval.py -vPYTHONDONTWRITEBYTECODE=1 python3 -m unittest test_paper_trading_integration.py -vPYTHONDONTWRITEBYTECODE=1 python3 -m unittest test_paper_mode.py -vgit diff --checkStrongly linked to #102