Repository navigation
fix: config single-source-of-truth doc + CI-aware anvil-e2e deploy timeout - #1428
Conversation
…meout Two low-risk consistency/CI-hygiene fixes. #1402 (config single source of truth): - adr/012-client.md: replace the stale "Default configuration" TOML block (used long-gone keys: [network] rpc_url, [bootstrap], [keys], [cache] probe_cache_*) with a pointer to the CI-validated canonical example examples/configs/arbitrum-sepolia-client.toml plus a schema-terms description. This was the one copy that actively contradicted the schema. - crates/cli config.rs: document DEFAULT_CONFIG as canonical and list its guard tests; strengthen default_config_template_parses_with_every_section into a compile-enforced completeness check (exhaustive FileConfig destructure) so a new schema section forgotten in the template fails CI; add examples_use_only_template_sections to catch sample/template section drift. #1384 (anvil-e2e deploy-timeout hardening, additive on top of #785): - crates/e2e chain.rs: add ci_scaled()/scale_for_ci() + CI_TIMEOUT_MULTIPLIER and apply CI-aware scaling to DEPLOY_TIMEOUT and FORGE_BUILD_TIMEOUT, since the observed flakiness is CPU starvation under CI contention, not slowness. Local budgets unchanged so a genuine local hang still fails fast. Verified: cargo clippy --all-targets -D warnings, cargo fmt --check, cargo doc --workspace --document-private-items (RUSTDOCFLAGS=-D warnings), and the new/affected unit tests all pass. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Warning Review limit reached
Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
WalkthroughThe changes align client configuration documentation and CLI templates with the live schema, add tests for template/example consistency, and scale Forge subprocess timeouts only when running in CI. ChangesConfiguration alignment
CI timeout scaling
Estimated code review effort: 3 (Moderate) | ~20 minutes Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
Pull request overview
This PR tightens config documentation and CI robustness by (1) removing drift-prone inline schema copies in ADR docs in favor of CI-validated canonical examples, and (2) scaling Foundry deploy/build timeouts under CI to reduce anvil-e2e flakes due to runner contention.
Changes:
- Update ADR-012 client configuration guidance to point to the canonical, schema-validated example config file instead of duplicating the schema inline.
- Strengthen
decdn config init’sDEFAULT_CONFIGguard tests to enforce template/schema completeness at compile time and prevent example/template section drift. - Scale
forge build/forge scriptwall-clock budgets under CI via a pure, unit-tested scaling helper (scale_for_ci).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
crates/e2e/src/chain.rs |
Adds CI-aware timeout scaling for Foundry build/deploy steps to reduce anvil-e2e contention flakes. |
crates/cli/src/commands/config.rs |
Documents DEFAULT_CONFIG as the canonical template and adds stronger compile-/CI-guards against schema/template/example drift. |
adr/012-client.md |
Replaces a stale inline config block with a pointer to the canonical client example and updates terminology to match the current schema. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Only bare section headers are uncommented, so every section is | ||
| // Some but each field stays at its built-in default (None on the | ||
| // wire form). Spot-check the four added sections are recognized. | ||
| assert!(parsed.gossip.is_some(), "[gossip] header parsed"); | ||
| assert!(parsed.security.is_some(), "[security] header parsed"); | ||
| assert!(parsed.dht.is_some(), "[dht.rate_limit] header parsed"); | ||
| assert!(parsed.probe.is_some(), "[probe.rate_limit] header parsed"); | ||
| assert!(parsed.receipts.is_some(), "[receipts] header parsed"); | ||
| assert!(parsed.content.is_some(), "[content] header parsed"); | ||
| // `Some` with each field left at its built-in default. |
There was a problem hiding this comment.
Reworded in 31a1996: the comment now states each uncommented line is a value-less section header, "some nested ([dht.rate_limit], [probe.rate_limit]) but each mapping to a top-level section" — so it no longer reads as top-level-only.
Coverage reportTotal: 81.08% (was 81.07%, ▲ +0.01%) — 52414/64646 lines
History
|
The uncommented lines include nested headers ([dht.rate_limit], [probe.rate_limit]); reword so "section headers" isn't misread as top-level-only. Addresses PR #1428 review feedback. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Summary
A small, low-risk "consistency + CI-hygiene" batch. Neither fix needs a design decision, touches payment-critical code, or overlaps any open PR.
#1402 — config single source of truth
adr/012-client.md: the client "Default configuration" block was actively stale — it used key/section names that no longer exist ([network] rpc_url,[bootstrap],[keys],[cache] probe_cache_*). Replaced the inline copy with a pointer to the CI-validated canonical exampleexamples/configs/arbitrum-sepolia-client.tomlplus a correct schema-terms description, so there is nothing left to re-drift.crates/cli/src/commands/config.rs: documentedDEFAULT_CONFIGas the canonical template and enumerated its guard tests. Strengtheneddefault_config_template_parses_with_every_sectioninto a compile-enforced completeness check (exhaustiveFileConfigdestructure) — adding a schema section now fails to compile until it is surfaced in the template. Addedexamples_use_only_template_sectionsto catch sample/template section drift. The existing schema-parity guards (assert_sample_config_matches_schema,render_config_emits_parseable_toml) already covered the examples.#1384 — anvil-e2e deploy-timeout hardening
crates/e2e/src/chain.rs: addedci_scaled()/ purescale_for_ci()(read-onlyCIenv check, ×2) and applied it toDEPLOY_TIMEOUTandFORGE_BUILD_TIMEOUT. This is additive on top of Flaky anvil-e2e:forge scriptdeploy subprocess hangs unbounded, freezing the test for minutes #785 (which already landed the backoff + snapshot-revert + 45→60s bump) and implements the issue's top suggestion ("scale it when CI is set"). Local budgets are unchanged.Review
A multi-agent review (code / comments / tests) found no critical or important logic defects. Its findings — a "2-core vs 4-core" comment contradiction, an inaccurate guard-test description, a test-coverage gap for the "section forgotten in the template entirely" case, and an overstated ADR
[payment]bullet — are all addressed in this PR.Verification
cargo clippy --all-targets -- -D warningscargo fmt -- --checkcargo doc --workspace --no-deps --document-private-items(RUSTDOCFLAGS=-D warnings)decdn-cliconfig tests,decdn-e2eci_scaling_widens_the_budget_only_under_ci)Closes #1402
Closes #1384
🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Tests