Skip to content

Run stats assertions in CI and clarify cache contracts - #136

Merged
arthurprs merged 2 commits into
masterfrom
research/stats-contracts
Nov 22, 2026
Merged

arthurprs merged 2 commits into
masterfrom
research/stats-contracts

Conversation

@arthurprs

Copy link
Copy Markdown
Owner

CI compiles stats but does not execute the ordinary stats tests. Add stats-enabled cargo test commands for the default, std and sharded lock backends in the existing OS matrix.

Correct the API documentation to match executable behavior: entry callbacks receive a shared key, guarded mutation can change weight, and statistics count internal lookups and placeholder joins rather than one outcome per public call. Describe resident access counts, replacement resets, totals across clear and the 64-bit atomic requirement. Runtime code and counter units stay unchanged.

Five focused stats characterizations cover cold/retried loads, placeholder joins, async waiter delivery, entry actions/reset behavior and async entry probing. A separate local negative control initializes access counts to 99: the rebuilt default library suite passes, while the rebuilt stats-enabled test_item_stats fails its 0-versus-99 assertion. That mutation is excluded from this branch.

Validation on upstream b971639 with Rust 1.97.1:

  • Full cargo test for default, stats, std, std+stats, sharded-lock and sharded-lock+stats configurations.
  • Exact Rust 1.95.0 library checks for those configurations.
  • Rustfmt and Clippy (-D warnings) for the default and stats library builds.
  • Focused stats characterizations under std-backend Miri.
  • Stats documentation build with rustdoc warnings denied.

Hosted CI duration and cost are not measured locally.

The existing ignored Lifecycle doctest and stats test-build dead-code warning remain visible. Local validation runs on Linux; hosted macOS/Windows jobs are separate.

@arthurprs
arthurprs marked this pull request as ready for review November 21, 2026 23:43
@arthurprs
arthurprs merged commit 749c30f into master Nov 22, 2026
12 checks passed
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.

1 participant