Skip to content

fix(ci,test): un-rot the anvil bring-up e2e and gate it so it cannot rot again - #1473

Merged
thiras merged 1 commit into
mainfrom
fix/anvil-bringup-e2e-compile-rot
Jul 26, 2026
Merged

thiras merged 1 commit into
mainfrom
fix/anvil-bringup-e2e-compile-rot

Conversation

@thiras

@thiras thiras commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

crates/node/tests/anvil_bringup_shutdown_e2e.rs has not compiled since 2026-07-23. Two initializers fix it; the interesting part is why nobody noticed.

The rot

ResolvedConfig gained a content field in #1380 (07-23) and ResolvedCache gained max_rate_per_mb in #1420 (07-24). Neither threaded the new field into this test's config builder:

error[E0063]: missing field `max_rate_per_mb` in initializer of `ResolvedCache`
error[E0063]: missing field `content` in initializer of `ResolvedConfig`

Adding the two initializers is the entire fix — the test then passes on the first run, so nothing it asserts had actually regressed. It was only unbuildable, not broken.

Why CI stayed green for three days

The anvil e2e (settlement) job ran a single-target filter:

cargo nextest run -p decdn-node --features anvil-e2e --test anvil_settlement_e2e

So this file was built by no job at all. Two things follow, and both happened:

I hit this while running the full anvil suite by hand for #1472 and confirmed it reproduces on a clean main.

The gate

The job now names both anvil targets explicitly instead of filtering to one:

cargo nextest run -p decdn-node --features anvil-e2e \
  --test anvil_settlement_e2e \
  --test anvil_bringup_shutdown_e2e

A bare -p decdn-node --features anvil-e2e would be shorter, but it drags the whole unit suite in behind the feature flag and duplicates the test job. The explicit list keeps the job scoped while turning a missing target into a build failure rather than silence — and the inline comment says so, so the next person adding an anvil_* target knows to extend it.

The added target fits the job's existing shape: it needs only anvil + forge (both already on PATH via foundry-setup) and drives runtime::run in-process, so the "no daemon/CLI binary on disk" property the settlement/journeys split relies on still holds. Costs ~25s.

Verified locally — both targets together:

Starting 5 tests across 2 binaries
Summary [9.617s] 5 tests run: 5 passed, 0 skipped

Incidental: a duplicated metric row

Found while auditing the metric registry for #1443. decdn_probe_holds_disabled_total was documented twice in adr/appendix-observability.md — under § Slash-Safety Metrics and again under § Probe Metrics — and the two copies had already drifted in wording. The § Slash-Safety Metrics row is canonical (that section's own preamble says the probe-hold capacity metrics are grouped there deliberately), so the § Probe Metrics copy is removed and replaced with a pointer naming all five probe-hold metrics and where they live.

Correction to something I wrote on #1443: I said decdn_probe_stake_lane_reserved_total was missing from the informal→canonical mapping table. That was wrong, and I have not "fixed" it. That table maps informal names used in earlier ADRs to their canonical forms; the stake-lane counter was born canonical in #757 and has no informal predecessor, so having no row is correct.

🤖 Generated with Claude Code

…rot again

`crates/node/tests/anvil_bringup_shutdown_e2e.rs` has not compiled since
2026-07-23. `ResolvedConfig` gained a `content` field in #1380 and
`ResolvedCache` gained `max_rate_per_mb` in #1420; neither threaded the new
field into this builder. Adding the two initializers is the whole fix — the
test then passes on the first run, so nothing about the behaviour it asserts had
actually regressed.

The interesting part is why nobody noticed for three days. The `anvil e2e
(settlement)` job ran `--test anvil_settlement_e2e`, a single-target filter, so
this file was never built by any job in CI. It was even edited in its broken
state by #1465 the day before this fix, because touching a file that no job
compiles produces no signal. `cargo build --workspace --all-targets` does not
catch it either: the target is behind the off-by-default `anvil-e2e` feature.

So the job now names both anvil targets explicitly rather than filtering to one.
A bare `-p decdn-node --features anvil-e2e` would have been shorter but drags
the full unit suite in behind the feature flag and duplicates the `test` job;
the explicit list keeps the job scoped while making a missing target a build
failure instead of silence. The added target needs only `anvil` + `forge`, both
already on PATH in that job, and drives `runtime::run` in-process, so it fits
the "no daemon binary on disk" property the split relies on. Adds ~25s.

Both targets pass together locally: 5 tests across 2 binaries.

Incidental, found while auditing the metric registry for #1443:
`decdn_probe_holds_disabled_total` was documented twice in
`adr/appendix-observability.md` — once under § Slash-Safety Metrics and again
under § Probe Metrics — and the two copies had already drifted in wording. The
§ Slash-Safety Metrics row is canonical (that section's preamble states the
probe-hold capacity metrics are grouped there deliberately), so the § Probe
Metrics copy is removed and replaced with a pointer naming all five probe-hold
metrics and why they live elsewhere.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 26, 2026 17:14
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@thiras, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Free

Run ID: e5ad1597-765e-41e2-8cd3-4fc462719888

📥 Commits

Reviewing files that changed from the base of the PR and between 1ccec3d and dc8739b.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • adr/appendix-observability.md
  • crates/node/tests/anvil_bringup_shutdown_e2e.rs

Note

🎁 Summarized by CodeRabbit Free

Your 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 @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

@github-actions

Copy link
Copy Markdown

Contracts coverage

Line coverage: 89.92% (2615/2908 lines)
▲ +0.00pp vs base (89.92% → 89.92%)
Run: 30212155166

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a feature-gated anvil e2e integration test that had silently stopped compiling due to newly-added config fields, and updates CI so all anvil e2e targets are explicitly built/run to prevent this kind of rot from going undetected. Also removes a duplicated metric registry row in the observability appendix to keep documentation canonical and non-divergent.

Changes:

  • Update anvil_bringup_shutdown_e2e test config builder to initialize newly-required ResolvedCache.max_rate_per_mb and ResolvedConfig.content.
  • Adjust CI’s anvil e2e job to run both anvil integration test binaries explicitly (settlement + bring-up/shutdown).
  • Remove the duplicated decdn_probe_holds_disabled_total row from the Probe Metrics section and replace it with a pointer to the canonical Slash-Safety section.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
crates/node/tests/anvil_bringup_shutdown_e2e.rs Restores compilation by initializing newly-added resolved config fields in the test’s config builder.
adr/appendix-observability.md De-duplicates metric documentation by keeping probe-hold metrics canonical in Slash-Safety and pointing to it from Probe Metrics.
.github/workflows/ci.yml Prevents future anvil e2e test rot by running both feature-gated anvil test binaries explicitly in CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown

Coverage report

Total: 81.10% (was 81.10%, ● 0.00%) — 52376/64583 lines

No coverage data for changed Rust files.

History
Commit Total Δ vs base
dc8739b (HEAD) 81.10% ● 0.00%

@thiras
thiras merged commit 98517d7 into main Jul 26, 2026
25 checks passed
@thiras
thiras deleted the fix/anvil-bringup-e2e-compile-rot branch July 26, 2026 17:29
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