From eb5ee75e73ba6b36be8d30610fbdd5dcfec4e8b8 Mon Sep 17 00:00:00 2001 From: yu1005 <109812036+jeromychu23@users.noreply.github.com> Date: Fri, 6 Mar 2026 14:16:42 +0800 Subject: [PATCH 1/3] Bump package and conda recipe version to 0.1.4 --- Cargo.lock | 2 +- Cargo.toml | 2 +- recipe/meta.yaml | 2 +- src/lib.rs | 85 ++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 86 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 390043c..8aad74a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,7 +16,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hello_rust" -version = "0.1.3" +version = "0.1.4" dependencies = [ "pyo3", ] diff --git a/Cargo.toml b/Cargo.toml index b4a8ebf..204ea54 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hello_rust" -version = "0.1.3" +version = "0.1.4" edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3e6a0c7..401590f 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ {% set name = "hello-rust" %} -{% set version = "0.1.3" %} +{% set version = "0.1.4" %} package: name: {{ name|lower }} diff --git a/src/lib.rs b/src/lib.rs index 88b5574..9e83354 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -259,6 +259,7 @@ fn propagate_target_rows( if !is_valid_target(Some(start_target.clone())) { continue; } + let anchor_target = start_target.clone(); let start_self_key = composite_key(&start_row, self_cols)?; if let Some(kv) = block_key { @@ -267,7 +268,7 @@ fn propagate_target_rows( rows, &self_index_all, &start_self_key, - &start_target, + &anchor_target, target_col, kv, )? { @@ -291,7 +292,7 @@ fn propagate_target_rows( rows, &self_index_all, ¤t_parent, - ¤t_target, + &anchor_target, target_col, kv, )? { @@ -641,6 +642,86 @@ mod tests { assert_eq!(leaf_ts, "7"); }); } + + #[test] + fn blocker_checks_use_start_target_as_anchor_across_ancestors() { + Python::attach(|py| { + let rows: Vec> = vec![ + [ + ("id", "gp"), + ("parent_id", "root"), + ("event", "Install"), + ("kind", "target"), + ("ts", "2022-01-01T00:00:00.000Z"), + ], + [ + ("id", "gp"), + ("parent_id", "root"), + ("event", "Remove"), + ("kind", "other"), + ("ts", "2023-08-01T00:00:00.000Z"), + ], + [ + ("id", "p"), + ("parent_id", "gp"), + ("event", "Other"), + ("kind", "target"), + ("ts", "2023-07-15T12:03:00.000Z"), + ], + [ + ("id", "p"), + ("parent_id", "gp"), + ("event", "Remove"), + ("kind", "other"), + ("ts", "2023-07-15T12:00:00.000Z"), + ], + [ + ("id", "leaf"), + ("parent_id", "p"), + ("event", "Other"), + ("kind", "target"), + ("ts", "2024-02-05T16:30:00.000Z"), + ], + ] + .into_iter() + .map(|pairs| { + let d = PyDict::new(py); + for (k, v) in pairs { + d.set_item(k, v).expect("set test item"); + } + d.unbind() + }) + .collect(); + + let self_cols = vec!["id".to_string()]; + let parent_cols = vec!["parent_id".to_string()]; + let target_key = HashMap::from([("kind".to_string(), "target".to_string())]); + let blocker = HashMap::from([("event".to_string(), "Remove".to_string())]); + + propagate_target_rows( + py, + &rows, + &self_cols, + &parent_cols, + "ts", + &target_key, + Some(&blocker), + "event", + "Install", + Plan::Backward, + ) + .expect("propagation with anchored blocker checks"); + + let leaf_ts: String = rows[4] + .bind(py) + .get_item("ts") + .expect("leaf ts item") + .expect("leaf ts exists") + .extract() + .expect("leaf ts string"); + assert_eq!(leaf_ts, "2022-01-01T00:00:00.000Z"); + }); + } } #[pymodule] From f8b71087e8b102d8eff1d2c6cc36463fef790a49 Mon Sep 17 00:00:00 2001 From: yu1005 <109812036+jeromychu23@users.noreply.github.com> Date: Fri, 6 Mar 2026 14:28:55 +0800 Subject: [PATCH 2/3] Pin maturin-action tool version to 1.12.5 in CI workflows --- .github/workflows/CI.yml | 5 +++++ .github/workflows/build-wheels.yml | 1 + 2 files changed, 6 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9fd25ff..3d0e0e3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -44,6 +44,7 @@ jobs: - name: Build wheels uses: PyO3/maturin-action@v1 with: + maturin-version: "1.12.5" target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} @@ -75,6 +76,7 @@ jobs: - name: Build wheels uses: PyO3/maturin-action@v1 with: + maturin-version: "1.12.5" target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} @@ -108,6 +110,7 @@ jobs: - name: Build wheels uses: PyO3/maturin-action@v1 with: + maturin-version: "1.12.5" target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} @@ -134,6 +137,7 @@ jobs: - name: Build wheels uses: PyO3/maturin-action@v1 with: + maturin-version: "1.12.5" target: ${{ matrix.platform.target }} args: --release --out dist --find-interpreter sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} @@ -150,6 +154,7 @@ jobs: - name: Build sdist uses: PyO3/maturin-action@v1 with: + maturin-version: "1.12.5" command: sdist args: --out dist - name: Upload sdist diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 953e1c1..3a5a47d 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -24,6 +24,7 @@ jobs: - name: Build wheels with maturin uses: PyO3/maturin-action@v1 with: + maturin-version: "1.12.5" command: build args: --release --interpreter python${{ matrix.python-version }} manylinux: auto From db81faeec23a26da2058bd0cc7295981d3e77bfd Mon Sep 17 00:00:00 2001 From: yu1005 <109812036+jeromychu23@users.noreply.github.com> Date: Fri, 6 Mar 2026 14:48:11 +0800 Subject: [PATCH 3/3] Add scheduled canary workflow to track maturin auto-upgrades --- .github/workflows/maturin-canary.yml | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/maturin-canary.yml diff --git a/.github/workflows/maturin-canary.yml b/.github/workflows/maturin-canary.yml new file mode 100644 index 0000000..a169ac1 --- /dev/null +++ b/.github/workflows/maturin-canary.yml @@ -0,0 +1,42 @@ +name: Maturin Canary + +on: + schedule: + - cron: '0 3 * * 1' + workflow_dispatch: + +permissions: + contents: read + +jobs: + canary: + name: canary-${{ matrix.platform.name }} + runs-on: ${{ matrix.platform.runner }} + strategy: + fail-fast: false + matrix: + platform: + - name: linux-x86_64 + runner: ubuntu-22.04 + target: x86_64 + manylinux: auto + - name: musllinux-x86_64 + runner: ubuntu-22.04 + target: x86_64 + manylinux: musllinux_1_2 + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: '3.x' + - name: Build wheels with latest allowed maturin + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --find-interpreter + manylinux: ${{ matrix.platform.manylinux }} + - name: Upload canary wheels + uses: actions/upload-artifact@v6 + with: + name: canary-${{ matrix.platform.name }} + path: dist