Skip to content

CI: scope cargo-hack to shipped crates via composed switcheroo presets#2730

Draft
citizen-stig wants to merge 2 commits intodevfrom
nikolai/cargo-hack-exclude-demos
Draft

CI: scope cargo-hack to shipped crates via composed switcheroo presets#2730
citizen-stig wants to merge 2 commits intodevfrom
nikolai/cargo-hack-exclude-demos

Conversation

@citizen-stig
Copy link
Copy Markdown
Member

The hack and hack_default_targets jobs previously ran cargo switcheroo disable, which forced cargo-hack's feature-powerset search over the whole workspace — including demo-rollup, benchmarks, soak-testing, fuzz harnesses, and prover binaries that we don't ship. Replace disable with an additive composition (set default + add zkvms/ethereum/ celestia/demo-stf) so only shipped crates are checked.

While building the composition surfaced 13 shipped crates that were in the workspace but in no preset (silently covered only by disable). Distribute them into default.json / ethereum.json and add new celestia.json and demo-stf.json presets. Fix a stale path typo in examples.json (sov-soak-lib -> sov-soak-testing-lib).

Add scripts/check_preset_coverage.sh + scripts/switcheroo/excluded.json as a pre-flight step in the two hack jobs: fail fast if any workspace member is neither covered by a preset nor explicitly excluded, and flag preset entries whose paths no longer exist. Prevents the same kind of silent omission from recurring when new crates are added.

Only the two hack jobs are touched; other cargo switcheroo disable callers (nextest, doctests, coverage) remain unchanged.

Description

Summary of the changes...

  • I have updated CHANGELOG.md with a new entry if my PR makes any breaking changes or fixes a bug. If my PR removes a feature or changes its behavior, I provide help for users on how to migrate to the new behavior.
  • I have carefully reviewed all my Cargo.toml changes before opening the PRs. (Are all new dependencies necessary? Is any module dependency leaked into the full-node (hint: it shouldn't)?)

Linked Issues

  • Fixes # (issue, if applicable)
  • Related to # (issue)

Testing

Describe how these changes were tested. If you've added new features, have you added unit tests?

Docs

Describe where this code is documented. If it changes a documented interface, have the docs been updated?

Rendered docs are available at https://sovlabs-ci-rustdoc-artifacts.us-east-1.amazonaws.com/<BRANCH_NAME>/index.html

citizen-stig and others added 2 commits April 14, 2026 12:10
The hack and hack_default_targets jobs previously ran `cargo switcheroo
disable`, which forced cargo-hack's feature-powerset search over the
whole workspace — including demo-rollup, benchmarks, soak-testing, fuzz
harnesses, and prover binaries that we don't ship. Replace `disable`
with an additive composition (`set default` + `add zkvms/ethereum/
celestia/demo-stf`) so only shipped crates are checked.

While building the composition surfaced 13 shipped crates that were in
the workspace but in no preset (silently covered only by `disable`).
Distribute them into `default.json` / `ethereum.json` and add new
`celestia.json` and `demo-stf.json` presets. Fix a stale path typo in
`examples.json` (sov-soak-lib -> sov-soak-testing-lib).

Add `scripts/check_preset_coverage.sh` + `scripts/switcheroo/excluded.json`
as a pre-flight step in the two hack jobs: fail fast if any workspace
member is neither covered by a preset nor explicitly excluded, and flag
preset entries whose paths no longer exist. Prevents the same kind of
silent omission from recurring when new crates are added.

Only the two hack jobs are touched; other `cargo switcheroo disable`
callers (nextest, doctests, coverage) remain unchanged.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous commit extended default.json with 8 orphaned shipped crates
but forgot to regenerate the committed [workspace.default-members] array
in Cargo.toml. The `check` job's "Exit if working tree is dirty" step
(rust.yml:128) and the dedicated `cargo-switcheroo-default` job both run
`cargo switcheroo set default && git diff --exit-code` to enforce that
the two stay in sync, so CI was failing.

Run `cargo switcheroo set default` to bring Cargo.toml back in sync.

Co-Authored-By: Claude Opus 4.6 (1M context) <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.

1 participant