Skip to content

fix: reject invalid fill quantities before mutating orders - #20

Merged
dev-belly merged 1 commit into
mainfrom
codex/fill-quantity-contract-20261023
Oct 24, 2026
Merged

dev-belly merged 1 commit into
mainfrom
codex/fill-quantity-contract-20261023

Conversation

@dev-belly

@dev-belly dev-belly commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Order.apply_fill accepted booleans, fractional values and NaN as filled quantity. A NaN fill could silently poison filled and remaining quantities while moving the order state.

Require a positive Python integer before any transition or quantity update. Eight invalid-input regressions assert that filled quantity, status and lifecycle timestamps remain unchanged. Existing partial/complete integer fills remain covered.

Validation: the full local Python suite passes 918 tests with 154 compiled/optional skips. The existing PR CI passes Python 3.11–3.13, C++ unit/differential tests, sanitizers, installed distributions and reproducibility. No trading service or order API was contacted.

@dev-belly
dev-belly marked this pull request as ready for review October 24, 2026 06:13
@dev-belly
dev-belly merged commit 7551d36 into main Oct 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant