fix: install cargo-semver-checks correctly when skip_semver_checks is false#9
Merged
Merged
Conversation
… false The conditional added in ae50ddb to skip the install when semver checks are disabled was if: ${{ inputs.skip_semver_checks == 'false' }} `inputs.skip_semver_checks` is declared `type: boolean` on the workflow_call inputs, so the value flowing in is a JS-style boolean, not a string. In GitHub Actions expression syntax, comparing a boolean to a string with `==` coerces the boolean to a number (false → 0, true → 1) and parses the string as a number (`'false'` → NaN). Both `0 == NaN` and `1 == NaN` evaluate to false, so the conditional is *always* false regardless of what the caller passes — meaning the install step is always skipped. The next step (`Prepare release`) then explodes when `holochain_release_util prepare` invokes `cargo semver-checks` and the binary isn't on PATH. The minimal fix is to evaluate the boolean directly: if: ${{ !inputs.skip_semver_checks }} This installs the tool when `skip_semver_checks` is false (the default) and skips the install when it's true, which matches the intent of the original commit message. Tested by inspection of the GitHub Actions expression docs on loose-equality coercion. Reproduced as a CI failure on holochain/holochain-wasmer at https://github.com/holochain/holochain-wasmer/actions/runs/24160654985/job/70510871869 where the prepare run on v1.7.0 dies with `cargo semver-checks command failed with status: exit status: 101` and the underlying "no such command: 'semver-checks'" error from cargo.
|
✔️ 8076a5c - Conventional commits check succeeded. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughModified the GitHub Actions workflow to use direct boolean evaluation instead of string comparison for the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ThetaSinner
approved these changes
Apr 8, 2026
synchwire
added a commit
to holochain/holochain-wasmer
that referenced
this pull request
Apr 8, 2026
Picks up holochain/actions#9, which fixes the broken `if: ${{ inputs.skip_semver_checks == 'false' }}` conditional on the cargo-semver-checks install step. v1.7.0 had that conditional always evaluating false (boolean compared to a string in GitHub Actions expression syntax), so the install step was always skipped and the prepare step then died with `no such command: 'semver-checks'`. v1.8.0 evaluates the boolean directly. The setup_script hook from #8 (which downloads LLVM for the `wasmer-sys-llvm` semver check) is unchanged and still wired up in this workflow file.
2 tasks
ThetaSinner
pushed a commit
to holochain/holochain-wasmer
that referenced
this pull request
Apr 8, 2026
Picks up holochain/actions#9, which fixes the broken `if: ${{ inputs.skip_semver_checks == 'false' }}` conditional on the cargo-semver-checks install step. v1.7.0 had that conditional always evaluating false (boolean compared to a string in GitHub Actions expression syntax), so the install step was always skipped and the prepare step then died with `no such command: 'semver-checks'`. v1.8.0 evaluates the boolean directly. The setup_script hook from #8 (which downloads LLVM for the `wasmer-sys-llvm` semver check) is unchanged and still wired up in this workflow file.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The conditional added in ae50ddb to skip the `Install cargo-semver-checks` step when semver checks are disabled was:
```yaml
if: ${{ inputs.skip_semver_checks == 'false' }}
```
`inputs.skip_semver_checks` is declared `type: boolean` on the `workflow_call` inputs, so the value flowing in is a JS-style boolean, not a string. GitHub Actions expression syntax coerces a boolean to a number for `==` comparisons (false → 0, true → 1) and parses the string operand as a number (`'false'` → `NaN`). Both `0 == NaN` and `1 == NaN` evaluate to false, so the conditional is always false regardless of what the caller passes.
Net effect on `v1.7.0`: the install step is always skipped, the next step (`Prepare release`) invokes `holochain_release_util prepare`, that runs `cargo semver-checks`, and cargo dies with `no such command: 'semver-checks'`. Reproduced as a real CI failure at holochain/holochain-wasmer Actions run #24160654985.
Fix
Evaluate the boolean directly instead of comparing it to a string:
```yaml
if: ${{ !inputs.skip_semver_checks }}
```
This installs the tool when `skip_semver_checks` is false (the default) and skips the install when it's true — which is what ae50ddb's commit message said it intended to do.
Test plan
Summary by CodeRabbit