fix(ci): reliability and correctness fixes#36
Conversation
- Add timeout-minutes: 15 to contracts-release-check and contracts-production-mode-smoke jobs to prevent multi-hour stuck runs when forge script hangs on anvil JSON-RPC calls - Replace rg (ripgrep) fallback with grep -Eo in smoke-production-mode.sh; rg is not guaranteed on GitHub-hosted runners - Pin slither-analyzer==0.11.5 in Makefile slither-install target to match the version pinned in CI workflows - Add [profile.default.invariant] runs = 256 to foundry.toml to make invariant run count explicit and consistent across all invocations
WalkthroughThis PR updates the contracts infrastructure with four independent configuration and tooling improvements: Foundry test profiles are reorganized with a new invariant test block, slither-analyzer is pinned to version 0.11.5, the smoke test script replaces ripgrep with grep for hash extraction, and two CI jobs receive explicit 15-minute timeouts. ChangesContracts Build and Test Infrastructure
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@contracts/script/ops/smoke-production-mode.sh`:
- Around line 64-68: The current fallback extracts the first 64-hex string from
SEND_OUT (variable VERIFIER_TX) which can pick up blockHash instead of the
transaction hash; modify the logic so SEND_OUT is obtained with a
machine-readable form (use cast send --json) and parse the transactionHash field
explicitly (e.g., jq -r '.transactionHash') to set VERIFIER_TX; if cast --json
isn't available, change the grep extraction to target the transaction-specific
label (match the token after "transactionHash" or "Transaction hash" rather than
the first 0x... sequence) so VERIFIER_TX always contains the transaction hash
used by cast receipt.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: bc05c7a8-dd73-4f5a-b62c-4a250829c808
📒 Files selected for processing (4)
.github/workflows/contracts-ci.ymlcontracts/Makefilecontracts/foundry.tomlcontracts/script/ops/smoke-production-mode.sh
Summary
Four targeted fixes for CI reliability and consistency issues identified in the workflow analysis.
Changes
contracts-ci.yml: addtimeout-minutes: 15tocontracts-release-checkandcontracts-production-mode-smokejobs — prevents multi-hour stuck runs when forge script hangs on anvil JSON-RPC pollingcontracts/script/ops/smoke-production-mode.sh: replacergfallback withgrep -Eo— ripgrep is not guaranteed on GitHub-hosted ubuntu runnerscontracts/Makefile: pinslither-analyzer==0.11.5inslither-installtarget to match the version pinned in CI workflowscontracts/foundry.toml: add[profile.default.invariant] runs = 256to make invariant run count explicit and consistent across all invocationsVerification
forge test --no-match-path 'test/invariant/**': passesScope
.github/workflowscontractsRisk
Low. No contract or test logic changes. Timeout values are conservative (15 min vs typical 3-5 min runtime).
Summary by CodeRabbit