Follow-up from PR #251 non-blocking review.
Scope:
- Make direct
ValidatedPosition construction enforce the same text/numeric invariants as from_wire.
- Reject arbitrarily large Python/JSON integers with sanitized
SessionContractError before float() can raise OverflowError.
- Add focused regression coverage.
Boundary: research-only contract hardening; no simulator algorithm, QPK store, live execution, orders, funds, or leverage changes.
Follow-up from PR #251 non-blocking review.
Scope:
ValidatedPositionconstruction enforce the same text/numeric invariants asfrom_wire.SessionContractErrorbeforefloat()can raiseOverflowError.Boundary: research-only contract hardening; no simulator algorithm, QPK store, live execution, orders, funds, or leverage changes.