Skip to content

ci: cover rs-unified-sdk-jni and missing contract crates in package filters#4203

Merged
QuantumExplorer merged 1 commit into
v4.1-devfrom
ci/package-filters-missing-crates
Jul 22, 2026
Merged

ci: cover rs-unified-sdk-jni and missing contract crates in package filters#4203
QuantumExplorer merged 1 commit into
v4.1-devfrom
ci/package-filters-missing-crates

Conversation

@QuantumExplorer

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

Pushes and PRs that touch only packages/rs-unified-sdk-jni never trigger the Rust workspace tests job: the crate is absent from .github/package-filters/rs-packages-no-workflows.yml, so the changes job in tests.yml reports no Rust packages changed and cargo fmt / clippy / cargo test are skipped entirely. This is exactly how misformatted code from #4192 landed on v4.1-dev and broke the cargo fmt --check --all step for every unrelated PR (fixed directly in bcd0ac2). The dedicated kotlin-sdk-build.yml workflow does trigger on the crate, but it only builds the JNI library and runs emulator tests — it never runs fmt or clippy.

Auditing every file in .github/package-filters/ against the root Cargo.toml workspace members and the yarn workspaces turned up more of the same class of gap:

  • packages/document-history-contract (Rust crate, added with the document-history work) had no filter entry and was missing from the data-contracts alias — contract-only changes skipped Rust CI too.
  • @dashevo/document-history-contract and @dashevo/keyword-search-contract are yarn workspaces with mocha unit suites that were never wired into the JS test matrix.
  • document-history-contract was also missing from the inline swift-sdk-changed filter in tests.yml, even though rs-sdk-ffi embeds it via data-contracts.

What was done?

  • rs-packages-no-workflows.yml (gates the Rust workspace tests): added rs-unified-sdk-jni with its dependency closure (platform-wallet-ffi + rs-sdk-ffi aliases, mirroring the rs-unified-sdk-ffi entry), and document-history-contract (own entry + data-contracts alias, mirroring its optional dependency in packages/data-contracts/Cargo.toml).
  • js-packages-no-workflows.yml / js-packages-direct.yml (gate the JS test matrix): added entries for both contract packages and aliased them into @dashevo/wasm-dpp like the other embedded system contracts. Neither has JS-side dependents, so no other consumer lists change.
  • tests.yml: added packages/document-history-contract/** to the inline swift-sdk-changed filter.
  • rs-packages.yml, rs-packages-direct.yml, js-packages.yml, test-suite-triggers.yml: same additions for consistency. Note these four files are not referenced by any workflow anymore (only the -no-workflows pair and js-packages-direct.yml are used by tests.yml), so they are kept in sync here rather than extended in behavior — deleting them could be a follow-up if they are truly dead.

After this change, all 46 Cargo workspace members are matched by at least one pattern in the live Rust filter.

How Has This Been Tested?

Validated with a script that:

  • parses all touched YAML files (anchors/aliases resolve cleanly);
  • checks every workspace member in the root Cargo.toml against the live Rust filter's patterns — no uncovered members remain;
  • simulates the dorny/paths-filter matching: a packages/rs-unified-sdk-jni/src/lib.rs change now matches the rs-unified-sdk-jni key (so rs-packages != '[]' and the Rust workspace job runs), and a document-history-contract change cascades through data-contractsdpp → dependents, matching the behavior of the existing contract crates.

Breaking Changes

None — CI-only. The new filter keys can only add test jobs for changes that previously ran none.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

…ilters

Pushes and PRs touching only packages/rs-unified-sdk-jni never triggered
the Rust workspace tests job, because the crate was absent from
rs-packages-no-workflows.yml — so cargo fmt/clippy/test were skipped
entirely for it. That is how misformatted code landed on v4.1-dev and
broke the formatting check for every unrelated PR (fixed directly in
bcd0ac2). The dedicated kotlin-sdk-build workflow does trigger on the
crate but only builds and runs emulator tests; it never runs fmt or
clippy.

Audited every .github/package-filters file against the Cargo workspace
members and yarn workspaces:

- rs filters: add rs-unified-sdk-jni (with its platform-wallet-ffi and
  rs-sdk-ffi dependency closure) and document-history-contract
  (including the data-contracts alias, mirroring its optional dep in
  packages/data-contracts).
- js filters: add @dashevo/document-history-contract and
  @dashevo/keyword-search-contract — both are yarn workspaces with
  mocha unit suites that were never wired into the JS test matrix —
  and alias them into @dashevo/wasm-dpp like the other embedded
  contracts.
- tests.yml: add document-history-contract to the inline
  swift-sdk-changed filter (rs-sdk-ffi embeds it via data-contracts).
- test-suite-triggers.yml: add both contracts to the system-contracts
  section for consistency.

All 46 workspace members are now covered by the live Rust filter.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@QuantumExplorer, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ff16f2c5-bd88-431f-82d2-ce4da9815c5e

📥 Commits

Reviewing files that changed from the base of the PR and between bcd0ac2 and 639964f.

📒 Files selected for processing (8)
  • .github/package-filters/js-packages-direct.yml
  • .github/package-filters/js-packages-no-workflows.yml
  • .github/package-filters/js-packages.yml
  • .github/package-filters/rs-packages-direct.yml
  • .github/package-filters/rs-packages-no-workflows.yml
  • .github/package-filters/rs-packages.yml
  • .github/package-filters/test-suite-triggers.yml
  • .github/workflows/tests.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/package-filters-missing-crates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added this to the v4.1.0 milestone Jul 22, 2026
@thepastaclaw

thepastaclaw commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

🕓 Ready for review — 59 ahead in queue (commit 639964f)
Queue position: 60/72 · 2 reviews active
ETA: start ~09:50 UTC · complete ~10:19 UTC (median 28m across 30 recent reviews; 2 slots)
Queued 3h 42m ago · Last checked: 2026-07-22 19:40 UTC

@QuantumExplorer QuantumExplorer left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@QuantumExplorer
QuantumExplorer merged commit 4760c4b into v4.1-dev Jul 22, 2026
18 of 20 checks passed
@QuantumExplorer
QuantumExplorer deleted the ci/package-filters-missing-crates branch July 22, 2026 16:07
QuantumExplorer added a commit that referenced this pull request Jul 23, 2026
Three more v4.1-dev breakages that only surface on full (dispatch or
version-change) CI runs:

- Docker image builds fail at cargo-chef prepare: #4171 made
  document-history-contract a dependency of data-contracts but the
  Dockerfile never copies the new crate. Add it everywhere
  token-history-contract appears. This also broke Test Suite and
  Dashmate E2E, which need the images.

- keyword-search-contract unit tests were copy-pasted from
  wallet-utils-contract and still tested its txMetadata document type,
  which this contract does not define; every case threw. Rewrite the
  suite against the real schema (contractKeywords, shortDescription,
  fullDescription). Two behaviors surfaced while doing so are asserted
  as such: wrong-length identifier fields throw at document creation
  (identifier conversion precedes schema validation), and fullDescription's
  schema maxLength (10000) sits above the system per-field cap (5120),
  so overlength strings yield a field-size error, not a maxLength error.

- document-history-contract asserted a minimum on purchase.price, but
  the schema deliberately leaves the integer unbounded so the property
  stays sum-aggregatable; consensus validates actual amounts. Assert
  the type check and the intentional absence of a schema minimum
  instead.

These suites were never exercised in CI before #4203 added the missing
package filters, and the contract-test jobs only run on full pipelines.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants