Skip to content

ci: clippy never runs with --features anvil-e2e; the gated e2e targets currently fail lint #1551

Closed

Description

@thiras

CI's clippy job lints the workspace without the anvil-e2e feature, so every test target gated behind it is never linted — and they currently fail clippy.

Gap. .github/workflows/ci.yml:63 runs cargo clippy --workspace --all-targets -- -D warnings with no --features anvil-e2e. The two anvil jobs (anvil-e2e-settlement, ci.yml:566; anvil-e2e-journeys, ci.yml:643) only run cargo nextest run, which never lints. Net: crates/e2e/tests/* and the gated decdn-node tests are exempt from the lint wall every other target obeys.

Current state (verified 2026-08-01, HEAD b2a9651): cargo clippy -p decdn-e2e -p decdn-node --all-targets --features anvil-e2e -- -D warnings exits 101 with at least:

  • crates/e2e/tests/slash_appeal.rs:71 — cognitive_complexity (46/25) + too_many_lines (135/100)
  • crates/e2e/tests/g_origin_01_publish.rs — 2 errors incl. too_many_lines
  • crates/e2e/tests/cli_fetch_topup.rs:744 — items_after_statements

Fix.

  • clean up the existing violations (fix, or narrow #[allow] with a reason)
  • add a lint step covering the feature — e.g. extend the clippy job with cargo clippy -p decdn-e2e -p decdn-node --all-targets --features anvil-e2e -- -D warnings (shares the clippy cache key) — so the gap cannot reopen

Activity

  1. added
    prio:medium
    rust
    kind:test
    on Aug 1, 2026
  2. github-actions commented on Aug 1, 2026

    @github-actions

    🎯 Triage report

    The CI clippy job omits --features anvil-e2e, so all test targets gated behind that feature escape the -D warnings lint wall. The issue author has already verified the gap against HEAD (b2a96512) and listed three concrete failures. The fix has two parts: clean up the existing violations, then extend the clippy job to cover the feature so the gap cannot silently reopen.

    📊 Assessment

    Dimension Value Reasoning
    Type Task Concrete CI gap with a fix checklist; not a runtime bug or new capability.
    Labels technical, medium, rust, testing (already applied) All four existing labels are accurate; github_actions could also apply but labels are already representative.
    Coding agent Suitable Requirements are fully specified: exact files, exact flags, exact errors. Success criterion is clear (clippy exits 0 with the new step). Self-contained scope.

    🔗 Similar issues

    No duplicates or closely related issues found.

    💡 Notes and suggestions

    Reproduction:

    cargo clippy -p decdn-e2e -p decdn-node --all-targets --features anvil-e2e -- -D warnings

    Fix checklist:

    • crates/e2e/tests/slash_appeal.rs:71 — cognitive_complexity (46 > 25) + too_many_lines (135 > 100): refactor into helper functions, or add a narrowly-scoped #[allow(clippy::cognitive_complexity, reason = "...")] if the test truly cannot be decomposed.
    • crates/e2e/tests/g_origin_01_publish.rs — 2 errors including too_many_lines: same options as above.
    • crates/e2e/tests/cli_fetch_topup.rs:744 — items_after_statements: move the item declaration above the preceding statement.
    • Extend .github/workflows/ci.yml clippy job (around line 63) to add a second invocation:
      - name: Clippy (anvil-e2e feature)
        run: cargo clippy -p decdn-e2e -p decdn-node --all-targets --features anvil-e2e -- -D warnings
      This shares the existing clippy cache key so it adds minimal CI time.

    Notes:

    • anvil-e2e is a publish = false, test-only crate, so there is no concern about feature-flag leakage into published artifacts.
    • Prefer #[allow(..., reason = "...")] over broad suppression — clippy::restriction lints like too_many_lines are easier to review when the suppression explains why the exception is justified.
    • Consider whether cognitive_complexity in slash_appeal.rs signals that the test should be split into smaller scenario tests (which would also improve failure diagnosis).

    Generated by Agentic Triage for #1551 · sonnet46 · 12.6 AIC · ⌖ 8.44 AIC · ⊞ 6K · ◷

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/issue-triage.md@94ec5db57374c5b04a4b8eef8b4413f9af44d63f
    
  3. self-assigned this
    on Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:testprio:mediumrust

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions