fix(ci): let the nightly Miri job honour strict-provenance ignores - #664
fix(ci): let the nightly Miri job honour strict-provenance ignores#664martintmk wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Pins parking_lot_core to a specific upstream git revision to fix a nightly Miri strict-provenance failure caused by integer↔pointer round-tripping in WordLock, while keeping the existing strict-provenance CI coverage unchanged.
Changes:
- Add a
[patch.crates-io]override forparking_lot_corepointing at the upstream provenance-safe fix commit. - Update
Cargo.locksoparking_lot_coreis sourced from the pinned git revision instead of crates.io.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Cargo.toml | Adds a crates.io patch override pinning parking_lot_core to the upstream strict-provenance fix commit. |
| Cargo.lock | Updates the resolved source for parking_lot_core to match the new git patch. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #664 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 582 583 +1
Lines 62852 62891 +39
=======================================
+ Hits 62852 62891 +39
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 23 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.patches/parking_lot_core/Cargo.toml:11
- The vendored
parking_lot_corenow uses strict-provenance pointer APIs (e.g.,ptr::without_provenance_mut, pointer.map_addr()/.with_addr()), which are not available on Rust 1.71. Keepingrust-version = "1.71.0"misrepresents the minimum supported Rust version and can lead to confusing build failures on older toolchains.
rust-version = "1.71.0"
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
deny.toml:67
- This comment says the allowlist is "commit-pinned", but
allow-gitonly allows the repository URL (any commit). The commit pinning happens in Cargo.toml viarev, so the comment here is misleading.
# Temporary, commit-pinned upstream fix for parking_lot_core strict provenance.
Sander Saares (sandersaares)
left a comment
There was a problem hiding this comment.
If we need to use random Git patch then I would rather just exclude this from the Miri checking until a proper patched version is available. Plus file an upstream "hey release a fix please" issue.
The scheduled `miri-strict-provenance` job set `MIRIFLAGS` but never `RUSTFLAGS=--cfg miri_strict_provenance`, so the `#[cfg_attr(miri_strict_provenance, ignore = "...")]` suppression the workspace already relies on was never active there. The gated test kept running under `-Zmiri-strict-provenance` and kept aborting the whole `internity` test binary on parking_lot_core's integer-to-pointer cast in `word_lock.rs`, breaking `main` nightly after nightly. Set the cfg in the job, mirroring the `just anvil-miri-strict-provenance` recipe it inlines, and gate the remaining `internity` tests that contend a `parking_lot` lock and hit the same cast. The tests keep their coverage under the tree-borrows and race-coverage Miri jobs and on every host target; only strict provenance skips them. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e5e8bde to
5112ae3
Compare
|
🤖 Clawpilot here! Posted automatically by Clawpilot (an AI agent), not by a human. Please verify before acting. Sander Saares (@sandersaares) martintmk — taken as directed. The git patch and the While implementing the exclusion I found the actual reason nightly kept failing, which changes the fix from "add a suppression" to "make the existing suppression work":
So the fix sets Verified locally that the mechanism actually works rather than assuming it: On the upstream ask: crates.io still shows 0.9.12 (2025-10-03) as newest, the |
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to CI configuration plus test-only ignore attributes, with only a small maintainability follow-up noted.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
|
|
@sasaares, just to double check, your random patch applies to a previous version of this PR, right? I don't see any random patches, just exclusion of a few tests. |
…nce job The step-level `env:` map replaces any inherited value, while the `just anvil-miri-strict-provenance` recipe this job mirrors prepends to it. Nothing sets either variable at workflow, job or `$GITHUB_ENV` level today, so this is latent rather than a live defect - but the sibling `miri-race-coverage` job already writes `MIRIFLAGS` via `$GITHUB_ENV`, so the trap is one edit away. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The changes consistently apply the existing cfg-based suppression mechanism and correctly wire that cfg into the strict-provenance Miri CI step.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite

🤖 Clawpilot here! Posted automatically by Clawpilot (an AI agent), not by a human. Please verify before acting.
Summary
Approach changed after review. The
[patch.crates-io]git pin ofparking_lot_coreand thedeny.tomlallow-gitcarve-out are gone; the branch is rebased onto currentmainand now contains only a CI fix plus three test attributes.Root cause (revised)
The workspace already has the exclusion mechanism this needs.
crates/internity/tests/basic.rsgatesfreeze_races_writer_and_stays_prefix_consistentbehind#[cfg_attr(miri_strict_provenance, ignore = "...")],cfg(miri_strict_provenance)is declared in the workspacecheck-cfglist, andjust anvil-miri-strict-provenancedefines that cfg viaRUSTFLAGS.The scheduled
miri-strict-provenancejob in.github/workflows/nightly.ymlinlines the cargo invocation instead of calling that recipe, and it sets onlyMIRIFLAGS— neverRUSTFLAGS=--cfg miri_strict_provenance. So the cfg was never defined in CI, theignorenever applied, the test ran anyway, andparking_lot_core's integer-to-pointer cast atword_lock.rs:320aborted the wholeinternitytest binary. That is why nightly kept failing even after the suppression was added.Changes
.github/workflows/nightly.yml— setRUSTFLAGS: --cfg miri_strict_provenanceon the strict-provenance step, mirroring thejustrecipe it inlines, and document the mechanism next to the job.crates/internity/tests/basic.rs— apply the samecfg_attrignore to the three remaining tests that contend aparking_lotlock and reach the same cast:concurrent_intern_is_consistent,concurrent_intern_then_concurrent_resolve,threaded_intern_bytes_is_consistent_across_threads.internity,cachetandcachet_tierare the only workspace crates that depend onparking_lot, and the first two sort beforeinternity, so they already clear the job today.Why this shape
This is what was asked for on this PR: exclude the affected tests from strict-provenance Miri until a fixed
parking_lot_coreis released, rather than pull a third-party git revision into the build.unknown-git = "deny"stays intact anddeny.tomlis untouched. No coverage is lost outside strict provenance — the tests still run on every host target and under themiri-tree-borrowsandmiri-race-coveragenightly jobs.crates.io still has no fixed release:
parking_lot_core0.9.12 (2025-10-03) is the newest version, and the upstreamAtomicPtrcommit is unreleased. The upstream "please cut a release" issue is still to be filed; there is no open issue for it onAmanieu/parking_lottoday.Note: setting
RUSTFLAGSin the job env overrides.cargo/config.toml'starget-cpu=x86-64-v3, which is irrelevant under Miri and matches what thejustrecipe already does.Validation
cargo +1.96.1 test -p internity --test basic --all-features— 52 passed, 0 ignored (normal builds are unaffected).--cfg miri_strict_provenanceinjected — 48 passed, 4 ignored, nounexpected_cfgswarning. This is the direct proof that the cfg reaches the integration test and that theignoreattributes fire.cargo +1.96.1 clippy -p internity --all-features --all-targets -D warnings— clean.rustfmt +nightly-2026-05-30 --check --config-path unstable-rustfmt.tomlon the changed file — clean.nightly.ymlparses as valid YAML.The failing path itself is Linux-only (the threaded tests are
cfg(not(all(miri, windows)))), so the scheduled job onmainremains the platform-exact confirmation.Bug: https://o365exchange.visualstudio.com/O365%20Core/_workitems/edit/7734570