Skip to content

ci(semver): compare rivet-core against the PR's base branch, not an unrelated crates.io crate (#968) - #975

Open
avrabe wants to merge 1 commit into
mainfrom
ci/semver-baseline-rev
Open

avrabe wants to merge 1 commit into
mainfrom
ci/semver-baseline-rev

Conversation

@avrabe

@avrabe avrabe commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #968. The maintainer chose this option: compare against the PR base, with a version bump as the way to allow an intended break.

The problem

Semver Checks (rivet-core public API) is a required need of CI Gate. With no baseline flag, cargo semver-checks compares against crates.io, where rivet-core is an unrelated 0.1.0. Every PR ran 0 checks: 0 pass, 254 skip and passed.

The change

  • --baseline-rev "origin/${{ github.base_ref }}", plus fetch-depth: 0 so the base ref exists.
  • A GitHub ::warning whenever 0 checks run. A version bump legitimately runs zero checks, and without the warning that looks exactly like the empty comparison this PR fixes.

Local evidence (cargo-semver-checks 0.50.0, against origin/main)

Case Exit Output
no change 0 196 checks: 196 pass, 58 skip
rename pub fn load_schemas (negative control) 100 function_missing: pub fn removed or renamed
same rename + workspace version 0.38.0 (escape hatch) 0 0 checks: 0 pass, 254 skip → warning

The step's shell logic was tested with a stand-in command. A normal pass exits 0 with no warning. A real failure keeps exit 100 through the tee pipe. A zero-check run exits 0 with the warning.

What this changes for upcoming PRs

  • The v0.38.0 release PR bumps the version, so it will run zero checks and show the warning. That's intended.
  • REQ-346 step 2, the rivet_yaml rename, changes Artifact.fields' public type. The gate will now fail it unless that PR also bumps the minor version.

yamllint 0; actionlint reports nothing beyond the pre-existing custom runner labels (rust-cpu, light, lean-mem). No Rust source changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_015HMQUV3u86jN2hmCtXNTc9

@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…nrelated crates.io crate (#968)

The semver gate is a CI Gate need, and it checked nothing.
`cargo semver-checks check-release` with no baseline takes its baseline
from crates.io. The `rivet-core` there is an unrelated 0.1.0, so every
PR reported `0 checks: 0 pass, 254 skip` and passed. The ci.yml comment
said it compared "relative to the base branch", and it never did.

It now runs with `--baseline-rev origin/<base>` and fetches full
history. Checked locally with cargo-semver-checks 0.50.0 against
origin/main:

  no change                        exit 0    196 checks: 196 pass, 58 skip
  pub fn load_schemas renamed      exit 100  function_missing (1 fail)
  same rename + workspace 0.38.0   exit 0    0 checks: 0 pass, 254 skip

The third row is the escape hatch, which the maintainer chose. An
intended break is allowed by bumping the workspace version in the same
PR, so the break is visible in the diff. Its output has the same shape
as the vacuous run this fixes, so the step now prints a GitHub warning
whenever zero checks ran. The shell logic was tested with a stand-in
command for all three outcomes. A normal pass exits 0 with no warning,
a real failure keeps exit 100 through the tee pipe, and a zero-check
run exits 0 with the warning.

yamllint exits 0, and actionlint reports nothing beyond the pre-existing
custom runner labels. No Rust source changes.

Refs: DD-063

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015HMQUV3u86jN2hmCtXNTc9
@avrabe
avrabe force-pushed the ci/semver-baseline-rev branch from aac9d3d to 1e6444c Compare September 17, 2026 18:26

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 1e6444c Previous: f16245a Ratio
store_insert/10000 19081537 ns/iter (± 1483168) 12844170 ns/iter (± 331034) 1.49
store_lookup/100 1941 ns/iter (± 4) 1606 ns/iter (± 10) 1.21
store_lookup/10000 356081 ns/iter (± 3057) 289329 ns/iter (± 1813) 1.23
store_by_type/100 95 ns/iter (± 2) 76 ns/iter (± 0) 1.25
store_by_type/1000 95 ns/iter (± 0) 76 ns/iter (± 0) 1.25
store_by_type/10000 95 ns/iter (± 0) 76 ns/iter (± 0) 1.25
diff/1000 719479 ns/iter (± 6170) 581112 ns/iter (± 7534) 1.24
diff/10000 10477173 ns/iter (± 581313) 7291375 ns/iter (± 149125) 1.44
query/1000 14514 ns/iter (± 75) 11672 ns/iter (± 131) 1.24

This comment was automatically generated by workflow using github-action-benchmark.

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.

semver-checks gate is vacuous: it compares rivet-core against the squatted crates.io 0.1.0 and runs 0 of 254 checks

1 participant