ci: bump mordant to 00778d3 so that the unused_pub count is stable - #43810
Conversation
At d0dca00 the job passes or fails at random. `cargo mordant` reported three associated constants of `bun_sys::Tag` two or three times each, depending on the order in which cargo finished the three targets, so the unused_pub count for src/sys/lib.rs was 65 or 68 over the same code. 00778d3 matches and reports an item by its position (crate, file, offset of the name) and no longer by a key that differs per target. The count no longer depends on the order. It also stops reporting items that only one target uses, which the other targets' records made look unused, and it reports items that share a name under different cfgs one by one. The regenerated baseline only goes down: src/sys/lib.rs 65 to 56, and the entries for src/io/lib.rs (1) and src/spawn_sys/spawn_process.rs (5) are gone.
|
Warning Review limit reached
This review includes 2 billable files and costs up to $0.50.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 8 minutes for your next included review. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Repository: oven-sh/bun/.coderabbit.yaml Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (2)
Comment |
|
Status: merged.
|
There was a problem hiding this comment.
LGTM, a straightforward CI pin bump with a decrease-only baseline regeneration.
What was reviewed:
- The bump follows the procedure in .github/workflows/CLAUDE.md (MORDANT_REV changed, MORDANT_TOOLCHAIN kept); the binary cache key at rust-lints.yml:167 includes the rev, so stale mordant binaries cannot be restored.
- The baseline deltas (-9 in src/sys/lib.rs, -1 src/io/lib.rs, -5 src/spawn_sys/spawn_process.rs = 15) match the description's 188 to 173 total, consistent with a regenerated file rather than a hand edit.
- No stale references to the old revision remain in the repo; the job is advisory, so a lost per-target entry would surface as a warning on the PR check, not a blocked merge.
Extended reasoning...
The PR changes two files: the pinned mordant revision in the advisory mordant job of .github/workflows/rust-lints.yml, and mordant-baseline.toml, where three unused_pub entries shrink or disappear and no count increases. It touches no Rust source, no runtime code, and no security-sensitive surface. The removed baseline counts sum exactly to the difference the description reports, the cache key already covers both pin values, the job is continue-on-error so the worst case is a visible warning, and neither path is covered by .github/CODEOWNERS. I could not fetch mordant's rust-toolchain file at the new revision to independently confirm the nightly is unchanged, but a mismatch would fail the PR's own mordant check at the cargo install step rather than silently pass.
Problem
mordantjob passes or fails at random at the pinnedd0dca00.cargo mordantreports three associated constants ofbun_sys::Tagtwo or three times each, so theunused_pubcount forsrc/sys/lib.rsis 65 or 68 over the same code. The baseline records 65, and the first run on ci: bump mordant to d0dca00 #43805 counted 68.cfg(windows)impl block shifts that index on Windows only, and mordant dropped a duplicate finding only when it sat next to its twin. The order of the three targets' records is the order in which cargo finishes them.Fix
MORDANT_REVmoves to00778d35391dc1a75381008754fd40726c1682f0(Match and report an unused_pub item by its position, not by its key scarletindustries/mordant#29). It matches and reports an item by its position: crate, file, offset of the name.MORDANT_TOOLCHAINstaysnightly-2026-09-01.mordant-baseline.tomlis regenerated and only goes down:src/sys/lib.rs65 to 56, and the entries forsrc/io/lib.rs(1) andsrc/spawn_sys/spawn_process.rs(5) are gone.bun scripts/rust-mordant.tsis clean from an emptytarget/mordant, and clean again on a warm run. Themordantcheck on this PR is the CI proof.Background
pubitem is recorded up to three times.cargo mordantdecidesunused_pubafter the build, from all of those records.Notes
What changes in the findings, measured over this tree with no baseline:
Tag::epoll_ctl(Linux),Tag::uv_spawn(Windows),FilePollRef::set_flag,ExtraPipe::fd.Tagconstants that were reported two or three times are reported once.src/sys/lib.rs, for items that share a name under differentcfgs, such asO::NOATIME, which is defined at three places. Each is a separate unused item. The old key was the same for all of them, so they were merged into one finding.no test proof · iteration 0 · no src or test change; test-proof not applicable