Skip to content

[Testing] Add regression tests for network data race fixes - #8635

Open
janezpodhostnik wants to merge 1 commit into
janez/fix-flaky-unit-tests-batch-2from
janez/flaky-test-regression-coverage-network
Open

[Testing] Add regression tests for network data race fixes#8635
janezpodhostnik wants to merge 1 commit into
janez/fix-flaky-unit-tests-batch-2from
janez/flaky-test-regression-coverage-network

Conversation

@janezpodhostnik

@janezpodhostnik janezpodhostnik commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Adds deterministic regression coverage for the network-layer race fixes from #8633. Each new test was verified to fail (assertion failure or -race report) with the corresponding fix reverted, and to pass with it.

Changes

  • network/slashing: first tests for the package. Verify the violations consumer does not mutate the caller's Violation and that one violation can be reported concurrently through all entry points.
  • RPC inspector: verify async inspection does not mutate the inspected RPC (the publish message list stays byte-for-byte in place), since libp2p pubsub keeps using the RPC concurrently.
  • ALSP SpamRecordCache: same-record concurrent Get/AdjustWithInit test. The existing concurrency tests only exercised disjoint records and did not catch the race. Also verifies the returned penalty is the one produced by the caller's own adjustment.
  • AppSpecificScoreCache: same-peer concurrent update/read test, for the same reason.
  • Scoring registry: unit test for the silence-period state machine, including the new "registry not started yet" branch (previously the zero start time spuriously ended the silence period before startup).

Related: #8633


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@janezpodhostnik
janezpodhostnik requested a review from a team as a code owner August 3, 2026 14:14
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e9f3a04c-0260-4cf8-a1c2-15b7388283ae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@janezpodhostnik janezpodhostnik changed the title Add regression tests for network data race fixes [Testing] Add regression tests for network data race fixes Aug 4, 2026
@janezpodhostnik janezpodhostnik self-assigned this Aug 4, 2026
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