Skip to content

fix(checks-rs): detect the tarpaulin install instead of asking for it - #127

Merged
jleni merged 1 commit into
mainfrom
fix/tarpaulin-install-autodetect
Aug 12, 2026
Merged

fix(checks-rs): detect the tarpaulin install instead of asking for it#127
jleni merged 1 commit into
mainfrom
fix/tarpaulin-install-autodetect

Conversation

@jleni

@jleni jleni commented Aug 12, 2026

Copy link
Copy Markdown
Member

Value

  • No consumer has to opt out of a tool it doesn't use. feat(checks-rs): make the cargo-tarpaulin install optional #126 got the default backwards — it made skipping tarpaulin opt-in, when not using tarpaulin is the only case that actually occurs.
  • Zero configuration for everyone. Consumers on another coverage engine stop downloading tarpaulin without changing a line; consumers on the default coverage_command keep working unchanged.
  • Removes the need for a downstream PR — Zondax/kunobi-frontend#3313 exists only to set the old opt-out and can be closed.

Technical

  • The data. Searching both orgs for consumers of _checks-rs.yaml returns three workflow files: kunobi-frontend/ci.yaml (two jobs, enable_coverage: true but coverage_command overridden to a cargo-llvm-cov dispatcher), kunobi-frontend/benchmark.yaml (enable_coverage: false), and web-golem/ci.yaml (@v11, enable_coverage: false). None installs and uses tarpaulin. default: true was protecting a case with no occurrences.

  • Why not simply default: false. The workflow's own default coverage_command is cargo tarpaulin --all-features --out Json --output-dir ., so a future consumer taking the default would have hit cargo tarpaulin: command not found — a silent break traded for the current one.

  • The change derives the decision from the command and keeps an explicit override:

    if: inputs.enable_coverage && (inputs.force_tarpaulin_install || contains(inputs.coverage_command, 'tarpaulin'))
    case installs?
    default coverage_command (names tarpaulin) ✅ yes — no breakage
    overridden to llvm-cov / nextest ⛔ no — no opt-out needed
    reaches tarpaulin indirectly (make coverage) + force_tarpaulin_install: true ✅ yes
  • Why keep an input at all rather than rely on the string alone: a command like pnpm run coverage or make coverage can invoke tarpaulin without naming it, and the heuristic cannot see that. force_tarpaulin_install is the escape hatch, named for what it now does.

  • Renamed from install_tarpaulin; it shipped hours ago in feat(checks-rs): make the cargo-tarpaulin install optional #126 and has no consumers yet, so no migration is needed.

  • Verified the workflow parses and that the condition evaluates correctly for all three cases above.

Follow-up to #126.

#126 added install_tarpaulin defaulting to true, so every consumer that does
not use tarpaulin had to know to opt out. That is backwards: across both orgs
there are three consumers of this workflow, and none of them installs and
uses tarpaulin — the default was protecting a case with no occurrences.

Derive it from coverage_command instead, keeping an explicit override:

  if: enable_coverage && (force_tarpaulin_install || contains(coverage_command, 'tarpaulin'))

- Default coverage_command names tarpaulin, so a consumer on the default
  still gets it installed. A bare `default: false` would have broken them
  with "cargo tarpaulin: command not found".
- Consumers on another engine skip the download with no configuration.
- force_tarpaulin_install covers commands that reach tarpaulin indirectly
  (a make target, a wrapper script), where the string cannot be seen.

Renamed from install_tarpaulin to match the narrower meaning. The old name
shipped hours ago and has no consumers yet.
@jleni
jleni merged commit 58832ee into main Aug 12, 2026
1 check passed
@jleni
jleni deleted the fix/tarpaulin-install-autodetect branch August 12, 2026 12:26
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