Skip to content

fix: message wait race in devnet tests - #7576

Merged
LesnyRumcajs merged 1 commit into
mainfrom
fix-flaky-wait-for-message
Sep 1, 2026
Merged

fix: message wait race in devnet tests#7576
LesnyRumcajs merged 1 commit into
mainfrom
fix-flaky-wait-for-message

Conversation

@LesnyRumcajs

@LesnyRumcajs LesnyRumcajs commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary of changes

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • This pull request is based on an issue that a maintainer has accepted (see Before Opening a Pull Request).
  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

Summary by CodeRabbit

  • Bug Fixes
    • Improved on-chain message execution tracking with consistent polling and retry behavior.
    • Prevented temporary “message not found” responses from prematurely failing operations.
    • Applied remaining timeouts more reliably during execution checks.
    • Standardized errors when a message cannot be loaded, making failures clearer and more consistent.
  • Tests
    • Added coverage for unknown message handling and message execution polling behavior.

@LesnyRumcajs
LesnyRumcajs requested a review from a team as a code owner September 1, 2026 11:54
@LesnyRumcajs
LesnyRumcajs requested review from EclesioMeloJunior and akaladarshi and removed request for a team September 1, 2026 11:54
@LesnyRumcajs
LesnyRumcajs force-pushed the fix-flaky-wait-for-message branch from a41bbaa to 40537c5 Compare September 1, 2026 11:55
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Essentials

Run ID: 3ce5611a-b6aa-43bd-8b9b-fb6fbc25cf0e

📥 Commits

Reviewing files that changed from the base of the PR and between 6bba885 and 40537c5.

📒 Files selected for processing (5)
  • src/dev/subcommands/devnet_cmd/eth_gas.rs
  • src/dev/subcommands/devnet_cmd/eth_skip_sender.rs
  • src/dev/subcommands/tests_cmd/helpers.rs
  • src/state_manager/message_search.rs
  • src/state_manager/mod.rs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • filecoin-project/lotus (manual)

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Walkthrough

The change adds shared message-execution polling, standardizes message-loading errors, and updates Ethereum devnet commands to use the shared helper.

Changes

Message execution polling

Layer / File(s) Summary
Message loading error contract
src/state_manager/message_search.rs, src/state_manager/mod.rs
The state manager uses and re-exports the FAILED_TO_LOAD_MESSAGE sentinel. Tests verify the sentinel for unknown CIDs.
Shared execution polling
src/dev/subcommands/tests_cmd/helpers.rs
poll_until_message_executed retries failed message loads, applies the remaining timeout, uses the shared lookback, and humanizes other RPC errors.
Devnet command integration
src/dev/subcommands/devnet_cmd/eth_gas.rs, src/dev/subcommands/devnet_cmd/eth_skip_sender.rs
Ethereum gas and skip-sender execution polling now uses poll_until_message_executed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 40537

This localized test and message-waiting change has no actionable merge-blocking risk remaining beyond normal checks and review.

Suggested reviewers: akaladarshi, eclesiomelojunior, sudo-shashank

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 76.92% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: fixing a message-wait race in devnet tests caused by delayed message delivery.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-flaky-wait-for-message
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix-flaky-wait-for-message

Warning

Some tools did not complete. Review the errors below.

🔧 Clippy (1.97.1)

Clippy execution timed out


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

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 53.19149% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.85%. Comparing base (6bba885) to head (40537c5).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/dev/subcommands/tests_cmd/helpers.rs 0.00% 20 Missing ⚠️
src/dev/subcommands/devnet_cmd/eth_gas.rs 0.00% 1 Missing ⚠️
src/dev/subcommands/devnet_cmd/eth_skip_sender.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/state_manager/message_search.rs 90.70% <100.00%> (+0.31%) ⬆️
src/state_manager/mod.rs 69.81% <ø> (ø)
src/dev/subcommands/devnet_cmd/eth_gas.rs 0.00% <0.00%> (ø)
src/dev/subcommands/devnet_cmd/eth_skip_sender.rs 0.00% <0.00%> (ø)
src/dev/subcommands/tests_cmd/helpers.rs 0.00% <0.00%> (ø)

... and 7 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bba885...40537c5. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@LesnyRumcajs
LesnyRumcajs added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit f3bf584 Sep 1, 2026
37 checks passed
@LesnyRumcajs
LesnyRumcajs deleted the fix-flaky-wait-for-message branch September 1, 2026 12:48
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.

2 participants