fix: use live Codecov badge instead of hardcoded coverage %#27
fix: use live Codecov badge instead of hardcoded coverage %#27
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PR updates CI/CD workflows with enhanced reporting and concurrency management, downgrades the MSRV from 1.95.0 to 1.93.0, modernizes project badges via dynamic Codecov integration, and excludes test suites from Miri execution due to inline assembly dependencies. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 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)
Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
==========================================
+ Coverage 94.20% 95.84% +1.63%
==========================================
Files 75 75
Lines 8048 9183 +1135
Branches 8048 9183 +1135
==========================================
+ Hits 7582 8801 +1219
+ Misses 422 338 -84
Partials 44 44
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Around line 26-27: The current README badges use static images that always
show "clean/proven"; replace those hardcoded badge URLs for the Miri and Kani
badges with GitHub Actions workflow status badge URLs for the respective
workflows (nightly.yml and verify.yml) so the images reflect live build status;
update the two badge image src values referenced by the existing links with the
standard GitHub Actions badge path for each workflow (keep the existing anchor
and alt text "Miri clean" and "Kani proven" to preserve semantics).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0337d58b-6db9-4bc2-96ec-ab7a3d76638f
📒 Files selected for processing (2)
.github/workflows/nightly.ymlREADME.md
README.md
Outdated
| <a href="https://github.com/Milerius/Mantis/actions/workflows/nightly.yml"><img src="https://img.shields.io/badge/miri-clean-2ea44f?style=for-the-badge" alt="Miri clean"></a> | ||
| <a href="https://github.com/Milerius/Mantis/actions/workflows/verify.yml"><img src="https://img.shields.io/badge/kani-proven-2ea44f?style=for-the-badge" alt="Kani proven"></a> |
There was a problem hiding this comment.
Miri/Kani badges are hardcoded green, not live status.
On Line 26 and Line 27, the badge URLs are static status labels, so they can show “clean/proven” even when workflows fail. Use GitHub Actions workflow-status badge URLs instead.
Suggested diff
- <a href="https://github.com/Milerius/Mantis/actions/workflows/nightly.yml"><img src="https://img.shields.io/badge/miri-clean-2ea44f?style=for-the-badge" alt="Miri clean"></a>
- <a href="https://github.com/Milerius/Mantis/actions/workflows/verify.yml"><img src="https://img.shields.io/badge/kani-proven-2ea44f?style=for-the-badge" alt="Kani proven"></a>
+ <a href="https://github.com/Milerius/Mantis/actions/workflows/nightly.yml"><img src="https://img.shields.io/github/actions/workflow/status/Milerius/Mantis/nightly.yml?branch=main&style=for-the-badge&label=miri-clean" alt="Miri clean"></a>
+ <a href="https://github.com/Milerius/Mantis/actions/workflows/verify.yml"><img src="https://img.shields.io/github/actions/workflow/status/Milerius/Mantis/verify.yml?branch=main&style=for-the-badge&label=kani-proven" alt="Kani proven"></a>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <a href="https://github.com/Milerius/Mantis/actions/workflows/nightly.yml"><img src="https://img.shields.io/badge/miri-clean-2ea44f?style=for-the-badge" alt="Miri clean"></a> | |
| <a href="https://github.com/Milerius/Mantis/actions/workflows/verify.yml"><img src="https://img.shields.io/badge/kani-proven-2ea44f?style=for-the-badge" alt="Kani proven"></a> | |
| <a href="https://github.com/Milerius/Mantis/actions/workflows/nightly.yml"><img src="https://img.shields.io/github/actions/workflow/status/Milerius/Mantis/nightly.yml?branch=main&style=for-the-badge&label=miri-clean" alt="Miri clean"></a> | |
| <a href="https://github.com/Milerius/Mantis/actions/workflows/verify.yml"><img src="https://img.shields.io/github/actions/workflow/status/Milerius/Mantis/verify.yml?branch=main&style=for-the-badge&label=kani-proven" alt="Kani proven"></a> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` around lines 26 - 27, The current README badges use static images
that always show "clean/proven"; replace those hardcoded badge URLs for the Miri
and Kani badges with GitHub Actions workflow status badge URLs for the
respective workflows (nightly.yml and verify.yml) so the images reflect live
build status; update the two badge image src values referenced by the existing
links with the standard GitHub Actions badge path for each workflow (keep the
existing anchor and alt text "Miri clean" and "Kani proven" to preserve
semantics).
Benchmark ReportCommit: LinuxCPU: Latency (ns/op, lower is better)Single Push+Pop
Burst 100
Burst 1000
Batch 100
Batch 1000
Full Drain
Instructions per Op (lower is better)Full results (all fields)
macOSCPU: Latency (ns/op, lower is better)Single Push+Pop
Burst 100
Burst 1000
Batch 100
Batch 1000
Full Drain
Instructions per Op (lower is better)Full results (all fields)
Sequence Lock (mantis-seqlock)LinuxCPU: seqlock_read_contended
seqlock_read_uncontended
seqlock_write
macOSCPU: seqlock_read_contended
seqlock_read_uncontended
seqlock_write
Fixed-Point Arithmetic (mantis-fixed)LinuxCPU: fixed_checked_add
fixed_checked_div
fixed_checked_mul_trunc
fixed_display
fixed_mul_round_vs_trunc
fixed_parse
fixed_rescale
macOSCPU: fixed_checked_add
fixed_checked_div
fixed_checked_mul_trunc
fixed_display
fixed_mul_round_vs_trunc
fixed_parse
fixed_rescale
Market-State Engine (mantis-market-state)LinuxCPU: market_state_array_book
market_state_engine
macOSCPU: market_state_array_book
market_state_engine
|
- Kani: add set -o pipefail so tee doesn't swallow failures - Kani: add continue-on-error with comment explaining MSRV incompatibility (Kani 0.67.0 bundles rustc 1.93.0, our MSRV is 1.95.0) - Kani: include "error" in summary grep pattern - Mutants: add step summary with caught/missed counts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…fix pipefail - MSRV 1.95 → 1.93: matches Kani 0.67.0's bundled rustc - Kani: remove continue-on-error, add set -o pipefail so failures propagate - CI: add concurrency group — new pushes cancel previous PR runs - Mutants: add step summary with caught/missed counts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…etch) unsupported
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@crates/queue/src/raw/slot.rs`:
- Line 61: The module-level attribute #[cfg(all(test, not(miri)))] in the slot
tests disables all tests under this module for Miri; remove that module-level
gating and instead annotate only the specific incompatible tests with
#[cfg(not(miri))] or #[ignore] (or a feature gate) so Miri still runs the rest
of the test suite. Locate the attribute on the slot test module (the
#[cfg(all(test, not(miri)))] line in slot.rs) and replace it with #[cfg(test)]
(or remove it), then for each test function inside (or any helper test modules)
that require std, timing, or other non-Miri behavior, add #[cfg(not(miri))] or
#[ignore] to that test function symbol (or use a cargo feature gate) so only
those tests are skipped under Miri. Ensure similar changes are applied to the
other affected test modules (storage, handle, presets, engine, copy_ring) rather
than excluding entire modules.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1a72c470-26db-414b-b347-1eda777dc343
📒 Files selected for processing (12)
.github/workflows/ci.yml.github/workflows/nightly.ymlCargo.tomlcrates/queue/src/copy_ring/engine.rscrates/queue/src/engine.rscrates/queue/src/handle.rscrates/queue/src/presets.rscrates/queue/src/raw/slot.rscrates/queue/src/storage.rscrates/queue/tests/spsc_basic.rscrates/queue/tests/spsc_copy_basic.rscrates/queue/tests/spsc_stress.rs
✅ Files skipped from review due to trivial changes (7)
- crates/queue/src/presets.rs
- crates/queue/tests/spsc_stress.rs
- crates/queue/tests/spsc_basic.rs
- .github/workflows/ci.yml
- Cargo.toml
- crates/queue/src/handle.rs
- crates/queue/tests/spsc_copy_basic.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/nightly.yml
crates/queue/src/raw/slot.rs
Outdated
| } | ||
|
|
||
| #[cfg(test)] | ||
| #[cfg(all(test, not(miri)))] |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check how broadly Miri is being excluded in queue tests.
rg -n --type=rust '#\[cfg\(all\(test,\s*not\(miri\)\)\)\]|#!\[cfg\(not\(miri\)\)\]' crates/queueRepository: Milerius/Mantis
Length of output: 669
Enable Miri for queue tests by gating individual incompatible tests instead of entire modules.
This module and six others in crates/queue/src/ exclude all tests from Miri using #[cfg(all(test, not(miri)))], and three integration test files use #![cfg(not(miri))] at the crate root, eliminating memory-safety coverage for unsafe code paths in slot, storage, handle, presets, engine, and copy_ring. Instead of excluding whole test modules, use #[ignore] or feature gates on specific tests that are incompatible with Miri (e.g., tests requiring std or timing-sensitive assertions).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@crates/queue/src/raw/slot.rs` at line 61, The module-level attribute
#[cfg(all(test, not(miri)))] in the slot tests disables all tests under this
module for Miri; remove that module-level gating and instead annotate only the
specific incompatible tests with #[cfg(not(miri))] or #[ignore] (or a feature
gate) so Miri still runs the rest of the test suite. Locate the attribute on the
slot test module (the #[cfg(all(test, not(miri)))] line in slot.rs) and replace
it with #[cfg(test)] (or remove it), then for each test function inside (or any
helper test modules) that require std, timing, or other non-Miri behavior, add
#[cfg(not(miri))] or #[ignore] to that test function symbol (or use a cargo
feature gate) so only those tests are skipped under Miri. Ensure similar changes
are applied to the other affected test modules (storage, handle, presets,
engine, copy_ring) rather than excluding entire modules.
…ptest - Exclude queue unit tests from Miri (cold_path + prefetch use inline asm) - Exclude integration tests from Miri via #![cfg(not(miri))] - Exclude proptest module from Miri (getcwd not available in isolation) - Fix doc backticks in integration test comments Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… asm) - CI + nightly: cargo miri test -p mantis-queue --lib (skip integration tests) - CI: add Miri for strategy, events, types, market-state (safe crates) - Revert integration test cfg(not(miri)) — handled by --lib flag instead - Nightly Miri extended: also --lib only Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 57 new targeted tests across convert.rs and mul_div.rs to kill missed mutants: operator-swap coverage (+ vs *, / vs -), sign handling (neg*neg, pos*neg), trunc-vs-round distinction at tie and above/below tie points, overflow boundaries (MIN, MAX, widen/narrow overflow), exact-vs-lossy rescale, and zero/identity edge cases. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… mutants Add targeted tests to cover 20 previously-missed mutants across mantis-market-state (array_book.rs: out-of-bounds price, zero-qty removal, Change action, clear_side per-side, depth ordering/clamping, level_count decrement, total_depth ask path, empty-buffer guard) and mantis-events (flags.rs: raw bit values, contains/is_empty edge cases, with immutability; market.rs: Ask side and Delete action on BookDeltaPayload, Bid aggressor on TradePayload; event.rs: header field propagation, snapshot flags, counter round-trip, seq distinctness; control.rs: all TimerKind reprs, boundary counter values; body.rs: discriminant uniqueness, kind mapping cross-checks). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add 40 new tests covering spread(), last_trade(), is_stale(), is_ready(), micro_price(), check_bbo_price_change(), and the Trade/TopOfBook arms of process() — targeting the 73 missed mutations identified across operator replacements and deleted match arms. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ok, events 656 → 797 tests (+141). Targeting mutation testing gaps: - market-state/engine.rs (40 tests): spread, last_trade, is_stale, is_ready, micro_price, check_bbo_price_change, process Trade/TopOfBook - fixed/convert.rs (24 tests): trunc vs round, widen/narrow, sign handling, exact rescale, overflow, anti-mutation assertions - fixed/mul_div.rs (33 tests): sign combos, rounding bias, div overflow, scalar ops, saturating ops, boundary values - market-state/book/array_book.rs (13 tests): delta edge cases, clear, empty book, depth buffer, level count - events (31 tests): flags bit ops, market payloads, event constructors, timer/heartbeat, EventKind distinctness Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary by CodeRabbit