From 8266833fa96793891af5a01f4b7a609cdecb34e3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 11:07:38 +0000 Subject: [PATCH 1/2] ci: bump the github-actions group with 2 updates Bumps the github-actions group with 2 updates: [actions/dependency-review-action](https://github.com/actions/dependency-review-action) and [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv). Updates `actions/dependency-review-action` from 5.0.0 to 5.0.1 - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](https://github.com/actions/dependency-review-action/compare/a1d282b36b6f3519aa1f3fc636f609c47dddb294...bbc44d14a204704ccc493733616cd1e93a0321ec) Updates `astral-sh/setup-uv` from 10.3.3 to 10.4.0 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/68559e99cc807c1eb7e9238fd43a15bba460eec2...1db35dd8eee11c5894872e0b383ae6c406cf738d) --- updated-dependencies: - dependency-name: actions/dependency-review-action dependency-version: 5.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: astral-sh/setup-uv dependency-version: 10.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 16 ++++++++-------- .github/workflows/compatibility.yml | 6 +++--- .github/workflows/docs.yml | 2 +- .github/workflows/private-comparisons.yml | 4 ++-- .github/workflows/release.yml | 2 +- .github/workflows/security.yml | 2 +- .github/workflows/successor-integration.yml | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 737bb5e8..5f46af9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: contents: read steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0 + - uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1 lint: name: Lint @@ -41,7 +41,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" @@ -88,7 +88,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" @@ -127,7 +127,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" @@ -166,7 +166,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" @@ -218,7 +218,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" @@ -280,7 +280,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" @@ -334,7 +334,7 @@ jobs: fetch-depth: 0 - name: Install uv - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml index 65b28aa0..d181014c 100644 --- a/.github/workflows/compatibility.yml +++ b/.github/workflows/compatibility.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv and Python ${{ matrix.python-version }} - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" python-version: ${{ matrix.python-version }} @@ -79,7 +79,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv and Python 3.15 - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" python-version: "3.15" @@ -141,7 +141,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv and Python ${{ matrix.python-version }} - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 74e55fde..90655e8b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 - name: Install uv - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" diff --git a/.github/workflows/private-comparisons.yml b/.github/workflows/private-comparisons.yml index 0a6d3d6e..e80fd85d 100644 --- a/.github/workflows/private-comparisons.yml +++ b/.github/workflows/private-comparisons.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" @@ -74,7 +74,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 155b49a5..914072fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -233,7 +233,7 @@ jobs: with: ref: ${{ github.sha }} - - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + - uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" python-version: "3.12" diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index fedb49a7..aae2923d 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Install uv and Python - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: version: "latest" python-version: ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/successor-integration.yml b/.github/workflows/successor-integration.yml index f2df7464..ab91cd6c 100644 --- a/.github/workflows/successor-integration.yml +++ b/.github/workflows/successor-integration.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 - - uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + - uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: python-version: ${{ matrix.python }} - name: Build the actual consumer wheel From 52c2374cab7b3f7795bf6856fbb80db247142577 Mon Sep 17 00:00:00 2001 From: Stefan Jansen Date: Mon, 23 Nov 2026 19:16:29 -0500 Subject: [PATCH 2/2] Separate order correctness properties from unstable timing deadlines --- tests/property/test_order_type_invariants.py | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/property/test_order_type_invariants.py b/tests/property/test_order_type_invariants.py index f0cfb4c4..7d5c28b3 100644 --- a/tests/property/test_order_type_invariants.py +++ b/tests/property/test_order_type_invariants.py @@ -16,7 +16,7 @@ def _make_broker(cash: float = 200_000.0) -> Broker: - return Broker(cash, NoCommission(), NoSlippage()) + return Broker(cash, NoCommission(), NoSlippage(), allow_short_selling=True) def _set_bar( @@ -46,7 +46,7 @@ def _set_bar( # --------------------------------------------------------------------------- -@settings(max_examples=200) +@settings(max_examples=200, deadline=None) @given( limit=st.floats(min_value=50.0, max_value=150.0, allow_nan=False, allow_infinity=False), bar_high=st.floats(min_value=50.0, max_value=200.0, allow_nan=False, allow_infinity=False), @@ -66,11 +66,12 @@ def test_limit_buy_never_fills_above_limit(limit: float, bar_high: float, bar_lo broker._process_orders() limit_fills = [f for f in broker.fills if f.order_type == "limit"] + assert len(limit_fills) == int(bar_low <= limit) for fill in limit_fills: assert fill.price <= limit + 1e-8, f"Limit BUY filled at {fill.price} > limit {limit}" -@settings(max_examples=200) +@settings(max_examples=200, deadline=None) @given( limit=st.floats(min_value=50.0, max_value=150.0, allow_nan=False, allow_infinity=False), bar_high=st.floats(min_value=50.0, max_value=200.0, allow_nan=False, allow_infinity=False), @@ -90,6 +91,7 @@ def test_limit_sell_never_fills_below_limit(limit: float, bar_high: float, bar_l broker._process_orders() limit_fills = [f for f in broker.fills if f.order_type == "limit"] + assert len(limit_fills) == int(bar_high >= limit) for fill in limit_fills: assert fill.price >= limit - 1e-8, f"Limit SELL filled at {fill.price} < limit {limit}" @@ -99,7 +101,7 @@ def test_limit_sell_never_fills_below_limit(limit: float, bar_high: float, bar_l # --------------------------------------------------------------------------- -@settings(max_examples=200) +@settings(max_examples=200, deadline=None) @given( stop=st.floats(min_value=50.0, max_value=200.0, allow_nan=False, allow_infinity=False), bar_open=st.floats(min_value=50.0, max_value=200.0, allow_nan=False, allow_infinity=False), @@ -121,11 +123,12 @@ def test_stop_buy_never_fills_below_stop( broker._process_orders() stop_fills = [f for f in broker.fills if f.order_type == "stop"] + assert len(stop_fills) == int(bar_high >= stop) for fill in stop_fills: assert fill.price >= stop - 1e-8, f"Stop BUY filled at {fill.price} < stop {stop}" -@settings(max_examples=200) +@settings(max_examples=200, deadline=None) @given( stop=st.floats(min_value=10.0, max_value=150.0, allow_nan=False, allow_infinity=False), bar_open=st.floats(min_value=10.0, max_value=200.0, allow_nan=False, allow_infinity=False), @@ -147,6 +150,7 @@ def test_stop_sell_never_fills_above_stop( broker._process_orders() stop_fills = [f for f in broker.fills if f.order_type == "stop"] + assert len(stop_fills) == int(bar_low <= stop) for fill in stop_fills: assert fill.price <= stop + 1e-8, f"Stop SELL filled at {fill.price} > stop {stop}" @@ -156,7 +160,7 @@ def test_stop_sell_never_fills_above_stop( # --------------------------------------------------------------------------- -@settings(max_examples=100) +@settings(max_examples=100, deadline=None) @given( entry_price=st.floats(min_value=50.0, max_value=150.0, allow_nan=False, allow_infinity=False), tp_offset=st.floats(min_value=1.0, max_value=20.0, allow_nan=False, allow_infinity=False), @@ -189,12 +193,7 @@ def test_bracket_exactly_one_exit( entry, tp, sl = orders broker._process_orders() - if entry.status != broker.__class__.__dict__.get("_x", None): - # Entry should have filled (market order at current price) - pass - - if entry.filled_price is None: - return # Entry didn't fill (shouldn't happen with market) + assert entry.filled_price is not None # Bar 1: exit bar with random high/low exit_close = (exit_high + exit_low) / 2 @@ -206,6 +205,7 @@ def test_bracket_exactly_one_exit( tp_filled = tp.status.value == "filled" sl_filled = sl.status.value == "filled" + assert (tp_filled or sl_filled) == (exit_high >= tp_price or exit_low <= sl_price) if tp_filled or sl_filled: # Exactly one should have filled, not both assert not (tp_filled and sl_filled), (