Skip to content

test: two allow patterns for the same long-journey lints across crates/e2e/tests #1576

Closed

Description

@yigitdot

clippy::too_many_lines / clippy::cognitive_complexity are suppressed two different ways in the same directory, for the identical reason ("one sequential on-chain journey reads more clearly unsplit"):

File-level #![allow(...)] — suppresses the lint for every function in the file, including short helpers that should still be covered:

  • crates/e2e/tests/g_gov_02_rate_bounds.rs, g_gov_03_real_evidence.rs, g_node_06_unbond.rs (both lints)
  • crates/e2e/tests/cli_fetch_topup.rs, cli_fetch_resume.rs, cli_bundle_pull_channel_id.rs, coop_close_watermark_reconcile.rs (too_many_lines)
  • crates/node/tests/anvil_settlement_e2e.rs, anvil_bringup_shutdown_e2e.rs (both lints)

Function-scoped #[allow(..., reason = ...)] — introduced by #1569 on slash_appeal.rs's run() and g_origin_01_publish.rs's run_transfer().

The function-scoped form is the better one: it keeps every other function in those files under the lint, and reason = puts the justification where it is enforced. cli_fetch_topup.rs now sits next to both patterns.

Proposal: narrow the file-level allows to the specific journey functions that need them, matching the #1569 form. Mechanical, no behavior change — but it will surface any other function in those files that has quietly grown past the threshold, which is the point.

Found while reviewing #1569.

Activity

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

    @github-actions

    🎯 Triage report

    The issue identifies an inconsistency in how clippy::too_many_lines and clippy::cognitive_complexity are suppressed across crates/e2e/tests and crates/node/tests: several files use file-level #![allow(...)] (suppressing all functions including short helpers), while #1569 introduced the stricter function-scoped #[allow(..., reason = ...)] form. The ask is to narrow all file-level suppresses to match the #1569 pattern, which is purely mechanical and carries no behavior change.

    📊 Assessment

    Dimension Value Reasoning
    Type Task Mechanical code-quality cleanup with clear scope, no logic change
    Labels unchanged (technical, rust, testing, low) Existing labels are accurate; no additions needed
    Coding agent Suitable Requirements are unambiguous: convert file-level #![allow(...)] in the listed files to function-scoped #[allow(..., reason = ...)] on the specific journey functions. No design decisions required.

    🔗 Similar issues

    💡 Notes and suggestions

    Files to update (replace file-level #![allow(...)] with function-scoped #[allow(..., reason = "...")] on the journey function):

    • crates/e2e/tests/g_gov_02_rate_bounds.rs — both lints
    • crates/e2e/tests/g_gov_03_real_evidence.rs — both lints
    • crates/e2e/tests/g_node_06_unbond.rs — both lints
    • crates/e2e/tests/cli_fetch_topup.rs — too_many_lines
    • crates/e2e/tests/cli_fetch_resume.rs — too_many_lines
    • crates/e2e/tests/cli_bundle_pull_channel_id.rs — too_many_lines
    • crates/e2e/tests/coop_close_watermark_reconcile.rs — too_many_lines
    • crates/node/tests/anvil_settlement_e2e.rs — both lints
    • crates/node/tests/anvil_bringup_shutdown_e2e.rs — both lints

    Reference form (from #1569):

    #[allow(clippy::too_many_lines, reason = "one sequential on-chain journey reads more clearly unsplit")]
    async fn run() { ... }

    Validation: After the change, cargo clippy --features anvil-e2e (or whichever invocation covers e2e, see #1551) should pass. Any function in those files that silently exceeded the threshold will now surface as a new clippy warning — that's the intended side effect and should be fixed or suppressed with its own reason = annotation.

    Generated by Agentic Triage for #1576 · sonnet46 · 15.5 AIC · ⌖ 5.69 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. alpergundogdu commented on Aug 3, 2026

    @alpergundogdu
    Contributor

    Resolved by #1581 (merged, commit 373401e). The multi-issue "Closes" line only auto-closed the first number; closing manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:testprio:lowrust

    Type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions