-
Notifications
You must be signed in to change notification settings - Fork 182
test: ci test for forest-cli state compute
#5964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
d67aca0 to
fe91a34
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
scripts/tests/calibnet_other_check.sh (1)
19-25: Normalize the CLI output and validate CID to avoid false negativesSome environments may emit trailing whitespace or quotes; normalizing and validating the CID prevents spurious failures and speeds up diagnosis.
Apply this diff:
-echo "Test subcommand: state compute at epoch 0" -cid=$($FOREST_CLI_PATH state compute --epoch 0) +echo "Test subcommand: state compute at epoch 0" +# Normalize output to a single unquoted line and validate format to fail fast. +cid="$($FOREST_CLI_PATH state compute --epoch 0 | tr -d '\r' | head -n1 | sed -e 's/^"//' -e 's/"$//')" +if ! [[ "$cid" =~ ^bafy[[:alnum:]]+$ ]]; then + echo "Unexpected output from 'state compute --epoch 0': $cid" + exit 1 +fi # Expected state root CID, same reported as in Lotus. This should break only if the network is reset. if [ "$cid" != "bafy2bzacecgqgzh3gxpariy3mzqb37y2vvxoaw5nwbrlzkhso6owus3zqckwe" ]; then echo "Unexpected state root CID: $cid" exit 1 fi
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
scripts/tests/calibnet_other_check.sh(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: hanabi1224
PR: ChainSafe/forest#5930
File: build.rs:64-77
Timestamp: 2025-08-13T09:43:20.301Z
Learning: hanabi1224 prefers hard compile-time errors in build scripts rather than runtime safeguards or collision detection, believing it's better to fail fast and fix root causes of issues like malformed snapshot names.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: tests-release
- GitHub Check: Build forest binaries on Linux AMD64
- GitHub Check: tests
🔇 Additional comments (1)
scripts/tests/calibnet_other_check.sh (1)
19-25: Good addition: hard fail on CID mismatch for epoch 0Exiting with status 1 on CID mismatch makes the test meaningful and will catch regressions early.
| exit 1 | ||
| fi | ||
| start_epoch=$(( head_epoch > 900 ? head_epoch - 900 : 0 )) | ||
| $FOREST_CLI_PATH state compute --epoch "$start_epoch" -n 10 -v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how long does it take?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<10s
Summary of changes
Changes introduced in this pull request:
forest-cli state computewith--n-epochsargumentReference issue to close (if applicable)
Closes #5953
Other information and links
Change checklist
Summary by CodeRabbit