From d41b94a77431adde487a3fe95c2964784c454615 Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Tue, 5 May 2026 20:01:01 +0700 Subject: [PATCH] ci: drop '!path' negation patterns from JS package filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `tests.yml`'s `Determine changed packages` job runs the JS filter through `dorny/paths-filter@v3` with the default `predicate-quantifier: some`. Under `some`, each pattern in a filter is OR'd independently — including `!`-prefixed ones, which "match" every file that **doesn't** match the negated path. So a single `!packages/rs-dpp/**/tests.rs` rule effectively matches every file in the repo that isn't an rs-dpp test, which trips the filter on Swift-only and Rust-only changes alike and cascades through every other filter that aliases `*wasm-dpp` / `*wasm-sdk` (dapi, dapi-client, wallet-lib, dash, dashmate, platform-test-suite, evo-sdk, …). Concrete example from PR #3591 (swift-sdk-only diff): the changes job logged `Filter @dashevo/wasm-dpp = true` with the four touched swift files listed under `Matching files`, and the `js-packages` matrix expanded to 11 packages — every JS test suite ran for free. Drop the negation lines on `wasm-dpp` (5) and `wasm-sdk` (6). Net effect on intended behavior: rs-dpp / rs-sdk / rs-dapi-client / rs-drive-proof-verifier test-file edits now trigger the corresponding WASM tests too, which is cheap insurance compared to the previous false-positive cost across the entire JS matrix. Inline comments call out the constraint so a future contributor trying to "tighten" the filter doesn't reintroduce the same shape. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../js-packages-no-workflows.yml | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/package-filters/js-packages-no-workflows.yml b/.github/package-filters/js-packages-no-workflows.yml index 91f3a58a79e..1ecb9012439 100644 --- a/.github/package-filters/js-packages-no-workflows.yml +++ b/.github/package-filters/js-packages-no-workflows.yml @@ -34,12 +34,18 @@ - packages/rs-platform-version/** - packages/rs-platform-versioning/** - packages/rs-dpp/** - # Exclude Rust test files — they don't affect WASM builds - - '!packages/rs-dpp/**/tests.rs' - - '!packages/rs-dpp/**/tests/**' - - '!packages/rs-dpp/**/test_helpers/**' - - '!packages/rs-dpp/**/test_utils.rs' - - '!packages/rs-dpp/**/test_utils/**' + # NOTE: do not add `!packages/rs-dpp/**/tests.rs` style negation + # patterns here. The dispatcher in `tests.yml` runs these filters + # via `dorny/paths-filter@v3` with the default + # `predicate-quantifier: some`, under which each pattern (including + # `!`-prefixed ones) is OR'd independently. A `!` pattern then + # "matches" every file that doesn't match the negated path — i.e. + # virtually every file in the repo — which trips this filter on + # Swift-only / Rust-only changes and cascades through every other + # filter that aliases `*wasm-dpp` (dapi, dapi-client, wallet-lib, + # dash, dashmate, platform-test-suite, …). Cheaper to over-trigger + # the WASM tests on rs-dpp test-only edits than to mis-trigger + # half the JS test matrix on every PR. '@dashevo/wasm-dpp2': &wasm-dpp2 - packages/wasm-dpp2/** @@ -96,13 +102,10 @@ dashmate: - packages/rs-platform-version/** - packages/rs-dash-platform-macros/** - packages/dapi-grpc/** - # Exclude Rust test files — they don't affect WASM builds - - '!packages/rs-drive-proof-verifier/**/tests.rs' - - '!packages/rs-drive-proof-verifier/**/tests/**' - - '!packages/rs-sdk/**/tests.rs' - - '!packages/rs-sdk/**/tests/**' - - '!packages/rs-dapi-client/**/tests.rs' - - '!packages/rs-dapi-client/**/tests/**' + # NOTE: do not add `!path` negation patterns here — see the long + # explanation on `@dashevo/wasm-dpp` above. Same `dorny/paths-filter@v3` + # + `predicate-quantifier: some` interaction trips this filter on + # unrelated changes and cascades into every consumer (`*wasm-sdk`). '@dashevo/evo-sdk': &evo-sdk - packages/js-evo-sdk/**