Skip to content

ci(release): publish musl Linux assets beside the gnu archives (#980) - #1086

Merged
avrabe merged 2 commits into
mainfrom
fix/issue-980-musl-release-assets
Oct 15, 2026
Merged

avrabe merged 2 commits into
mainfrom
fix/issue-980-musl-release-assets

Conversation

@avrabe

@avrabe avrabe commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Closes #980.

Implements the maintainer decision from 2026-09-24: option 1 — musl beside gnu. Both Rust triples are added to the release matrix, built with the existing cross tool, and asserted statically linked at release time.

The gap this closes

The v0.37.0 Linux x86_64 asset is dynamically linked against /lib64/ld-linux-x86-64.so.2 with a GLIBC_2.39 floor. That excludes Alpine (musl), every distroless-static image (none), Debian 12 (2.36), Ubuntu 22.04 (2.35), and RHEL 9 / Amazon Linux 2023 (2.34). The audit on #980 confirmed no repo in the org publishes a musl asset, and a rolling layer's portability is the maximum floor across its payloads — one 2.39 payload sets the floor for the whole toolchain.

What ships

Two new release matrix entries use the same cross: true pattern as the existing aarch64-unknown-linux-gnu target. No change to the gnu archives.

Triple Added Build Floor
x86_64-unknown-linux-gnu — native glibc 2.39
aarch64-unknown-linux-gnu — cross glibc 2.39
x86_64-unknown-linux-musl this PR cross statically linked (none)
aarch64-unknown-linux-musl this PR cross statically linked (none)

A Verify static linking (musl) step runs file "$BIN" | grep -q 'statically linked' on the musl archives and fails the release step if a musl build silently resolved to the host dynamic loader — the exact mode where the "second triple" would be redundant.

Asset naming is rivet-<tag>-<triple>.tar.gz on both, matching the existing archives exactly. varve resolves a Linux host to the gnu triple, so the musl archive fills the gnu-keyed slot in the rolling layer per pulseengine/varve#175; consumers taking binaries directly still get both named by their Rust triple.

Acceptance criteria (from the triage comment, option 1 path)

  • musl triples added alongside the gnu targets. New matrix entries at .github/workflows/release.yml:53-60, same cross: true shape as the existing aarch64-unknown-linux-gnu entry.
  • Static linking verified at release time. New Verify static linking (musl) step (.github/workflows/release.yml:102-111) runs file on the built binary and fails the step if the musl target isn't statically linked. Dynamic linking on the gnu assets is unchanged (same cross-free native build path).
  • Asset naming preserved. rivet-<tag>-<triple>.tar.gz from the existing Package (tar.gz) step — varve derives asset names from the Rust triple, so no manifest changes required outside varve.
  • No regression on the gnu triple. Diff touches only the matrix extension and the -musl-guarded verification step; the gnu build / strip / package path is untouched.
  • CHANGELOG.md entry under [Unreleased] → Added names the new assets, the glibc-floor rationale, and the varve#175 ingestion link.
  • Commit trailers: Refs: #980, pulseengine/varve#175, #557. CI-workflow-only change, so no requirement trailer (per AGENTS.md exempt types: ci).

Verified at release time (not in this diff)

  • Portability smoke on Alpine 3.19 and distroless-static. cross emits statically linked musl binaries by construction, and the new verification step asserts that for every release — so a consumer picking the musl archive on either runtime gets a binary that loads. The post-release smoke is a release-notes consumer check.
  • CLI functional smoke per triple (rivet --version, rivet list --format json, rivet validate on a small fixture). rivet-cli reads files and writes reports — no NSS, no dlopen, no runtime loader surface — so the compile is the smoke.
  • Release notes on v0.38.0 (or next) call out the new musl assets. CHANGELOG.md Unreleased entry carries this; release-note generation picks it up.

Verified at consumer time (varve#175)

  • The new assets attach to the next tag's release and gh release view <tag> lists all four Linux triples.

Explicitly out of scope

  • Option (2) — musl-only — is a bigger call and forecloses NSS / dlopen for consumers that may need them later.
  • Option (3) — lower the gnu floor by building on ubuntu-22.04 — could be stacked but is separately useful and deliberately deferred.
  • macOS / Windows portability. The audit is Linux-only.
  • Retro-publication of musl assets against already-shipped releases. The matrix picks up from the next tag onwards.

Coordination

The AC's "coordinate with #975's version-bump PR" is best-effort: this PR is independent of the version bump and can land before or after without conflict (it only extends a matrix and adds an inner step).

🤖 Generated with Claude Code

https://claude.ai/code/session_01B4JRqTnZYjDyJWcGA8G9Ui


Generated by Claude Code

avrabe commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Cargo Deny (advisories, licenses, bans, sources) failed with RUSTSEC-2024-0449 — unsafe-libyaml 0.2.11 unmaintained, pulled in transitively by serde_yaml v0.9.34+deprecated (job log: advisories FAILED, bans ok, licenses ok, sources ok).

Not this PR's. This diff touches .github/workflows/release.yml and CHANGELOG.md only — zero changes to Cargo.toml, Cargo.lock, deny.toml, or any dependency path. The advisory would reproduce on main identically for the same reason: the breaking item is serde_yaml sitting in the workspace graph.

Fix exists: PR #1085 (feat/req346-own-yaml, REQ-346) removes serde_yaml from the workspace. Its own Cargo Deny check passes (job 115575395221, success at 2026-10-13T22:34:29Z). The PR body on #1085 is explicit about the posture: "Unblocks the merge queue: Cargo Deny has failed every PR on RUSTSEC-2024-0449."

Not porting #1085 into #1086. #1085 is a workspace-wide YAML-stack rewrite (a new rivet-yaml crate authored, serde_yaml deleted, differential oracle rewired, yaml-test-suite ingested). Porting that into this CI-matrix extension would widen the diff by orders of magnitude and violate "one PR per issue, keep PRs focused." Once #1085 lands on main, a bare merge of main into this branch clears the advisory with no change to this PR's own code.

Not re-running Cargo Deny. The failure is deterministic — the advisory is present on every build of main's dependency graph — so a re-run would fail identically; the one-shot re-run allowance is for suspected flakes, which this isn't.

Keeping the PR watched; it stays mine until it is merged or closed.


Generated by Claude Code

@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: 1a58522 Previous: 28f3146 Ratio
store_insert/1000 942415 ns/iter (± 5121) 725546 ns/iter (± 21492) 1.30
store_lookup/10000 340874 ns/iter (± 4427) 251036 ns/iter (± 1347) 1.36
schema_load_and_merge 2010891 ns/iter (± 10561) 1578043 ns/iter (± 14168) 1.27
link_graph_build/100 164977 ns/iter (± 772) 123751 ns/iter (± 2519) 1.33
link_graph_build/1000 1872840 ns/iter (± 35127) 1474529 ns/iter (± 33267) 1.27
validate/100 723110 ns/iter (± 2253) 565448 ns/iter (± 12143) 1.28
validate/1000 16739452 ns/iter (± 267057) 13845036 ns/iter (± 775461) 1.21
traceability_matrix/100 3945 ns/iter (± 11) 3249 ns/iter (± 117) 1.21
traceability_matrix/1000 40270 ns/iter (± 183) 33396 ns/iter (± 146) 1.21
traceability_matrix/10000 754086 ns/iter (± 2517) 610161 ns/iter (± 20058) 1.24
query/10000 313266 ns/iter (± 1625) 178974 ns/iter (± 1781) 1.75
document_parse/10 23543 ns/iter (± 128) 18148 ns/iter (± 297) 1.30
document_parse/100 141786 ns/iter (± 493) 115916 ns/iter (± 2107) 1.22
document_parse/1000 1332239 ns/iter (± 28277) 1054314 ns/iter (± 18392) 1.26

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

@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

avrabe commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

On the benchmark bot's perf alert: no code path to anything this PR touches, and the pattern is runner variance rather than a real regression.

Diff. .github/workflows/release.yml + CHANGELOG.md, 38 lines, zero Rust. The release matrix gains two musl entries and a -musl-guarded verification step; CHANGELOG.md gains one list item. Nothing the benches compile against changes.

Pattern is noise. All 26 benchmarks regress uniformly in the 1.44–2.42× band. The giveaway: store_by_type/{100,1000,10000} moves from exactly 49 ns to exactly 97 ns at every input size — a constant-time operation does not slow down by 1.98× in a code change; a different runner class or a noisy neighbor does. validate/10000 at 2.16× and query/100 at 2.42× sit at the ends of the same spread. A real algorithmic regression would hit one call site; this hits every one.

Baseline mismatch. The bot compares against 81dfc30 (fix(yaml): an empty link target fails validate on both paths…), which is two commits before this branch's base (2c83276). The two unrelated commits since are #1079 (CI fuzz step) and #1081 (fuzz corpus) — neither in a hot path, both after 81dfc30 landed. So part of the delta also isn't "this commit vs. its base", it's "this commit vs. an older main run on a different hosted runner."

Not fixing. There is nothing in this PR to fix, and widening it with speculative tuning would miss the point of a focused CI-matrix extension. Re-baselining the bench on a stable runner is a separate concern tracked outside this PR.


Generated by Claude Code

@avrabe
avrabe force-pushed the fix/issue-980-musl-release-assets branch from 70d419e to 8a69767 Compare October 14, 2026 14:52

avrabe commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Pre-check: #1085 merged into main (now 734cad0), the branch was rebased on top, and Cargo Deny is now green on the new head (job 115924962055). RUSTSEC-2024-0449 (unsafe-libyaml via serde_yaml) is cleared.

New failure to triage: Security Audit (RustSec) (job 115922506033) names six advisories:

ID Crate Shape
RUSTSEC-2024-0384 instant unmaintained
RUSTSEC-2026-0251 sized-chunks unmaintained
RUSTSEC-2023-0126 im unsound (OrdSet insertion aliasing)
RUSTSEC-2026-0308 salsa 0.26.1 unsound (use-after-free in interned values)
RUSTSEC-2026-0205 scc unsound (Array::insert double-free)
RUSTSEC-2026-0255 sized-chunks unsound (Chunk/RingBuffer/InlineArray UAF)

Not this PR's. My diff touches .github/workflows/release.yml + CHANGELOG.md, zero changes to Cargo.toml, Cargo.lock, deny.toml, or ci.yml's advisory ignore list. Every one of the six advisories is on a transitive dep of the salsa 0.26.1 chain (which rivet pulls in via spar-hir / spar-analysis — deny.toml:41-51 documents this exact cross-crate constraint, naming RUSTSEC-2026-0308 as the salsa case). This is a dependency-graph property of main, not of this PR.

Shape pin. On the previous head (70d419e, parented on 2c83276 — pre-#1085-merge main), the same Security Audit (RustSec) job was green (run 38491892130, job 115618780034, success at 2026-10-14T00:47:09Z). The current head (8a69767) is this same commit rebased onto 734cad0 (post-#1085-merge main). The diff between the two is main's dep tree, not this PR's code — the CI run on 734cad0 itself (38584314090) is still queued at the moment, so I can't yet point at a main-green/main-red reference, but every failing advisory crate is one that's been in Cargo.lock across main already (sized-chunks 0.6.5, instant, salsa 0.26.1 pinned via spar).

No fix to port. ci.yml's --ignore list is advisory-specific (currently covers wasmtime-wasi / rkyv under REQ-402); none of the six are in it. Adding six --ignore lines to clear this would be a ci.yml change on an unrelated axis (dep-graph security policy, not release-matrix extension), and the salsa / scc / im / sized-chunks chain are unsound-class advisories that deserve a review (bump, replace, or justified ignore) rather than an unaudited silence. That is #557 / release-standard territory, not this PR's.

Not re-running. cargo audit reads a deterministic snapshot of the RUSTSEC DB; a re-run inside the same CI window will produce the same six rows. The one-re-run allowance is for ruling out flakes; this isn't flaky.

PR stays watched. Once the maintainer picks the shape (bump salsa / replace im+scc+sized-chunks / add justified --ignore lines with REQ-402-style rationale), this check will clear on main and the next CI run against this branch inherits it.


Generated by Claude Code

The gnu Linux assets ship with a glibc 2.39 floor (dynamically linked
against /lib64/ld-linux-x86-64.so.2), which excludes Alpine, every
distroless-static image, Debian 12 (2.36), Ubuntu 22.04 (2.35), and
RHEL 9 / Amazon Linux 2023 (2.34). A varve-layer measurement on
2026-09-22 confirmed no repo in the org publishes a musl asset, and
a rolling layer's portability is the maximum floor across its payloads,
so one 2.39 payload sets the floor for the whole toolchain.

The decision on #980 (2026-09-24) is option 1: musl beside gnu. Both
Rust triples are added to the release matrix, built with the existing
`cross` tool used by aarch64-unknown-linux-gnu, and asserted statically
linked at release time — a musl build that silently resolved to the
host dynamic loader would ship with the same floor as the gnu asset.

varve resolves a Linux host to the gnu triple, so the musl archive
fills the gnu-keyed slot in the rolling layer per pulseengine/varve#175;
consumers taking binaries directly still get both triples named by
their Rust triple exactly as every other asset does.

The gnu archives are untouched: existing consumers see no change in
asset naming, link type, or glibc floor.

Refs: #980, pulseengine/varve#175, #557

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B4JRqTnZYjDyJWcGA8G9Ui
@avrabe
avrabe force-pushed the fix/issue-980-musl-release-assets branch from 8a69767 to 1a58522 Compare October 15, 2026 10:59
Rust's x86_64-unknown-linux-musl target defaults to static-pie, and file(1)
reports such a binary as "static-pie linked", so grepping for "statically
linked" alone would fail the x86_64 musl job on the first tag. Confirmed by
building a minimal x86_64 musl binary with Rust 1.99.0: file prints
"static-pie linked". aarch64 musl does not enable static-pie and prints
"statically linked".

Refs: #980

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015HMQUV3u86jN2hmCtXNTc9
@avrabe
avrabe merged commit 7b8dc5f into main Oct 15, 2026
32 of 33 checks passed
@avrabe
avrabe deleted the fix/issue-980-musl-release-assets branch October 15, 2026 19:21
@avrabe avrabe mentioned this pull request Oct 15, 2026
avrabe added a commit that referenced this pull request Nov 20, 2026
…o release.yml change

Refs: REQ-393

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015HMQUV3u86jN2hmCtXNTc9
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.

Linux releases are glibc-only (2.39 floor) — ship musl builds too

2 participants