Skip to content

apr-cli: lib.rs include!d functions exceed complexity thresholds (resolve, dispatch_*) #5227

Closed as not planned

Description

@noahgift

crates/apr-cli/src/lib.rs cannot be touched without the pre-commit complexity check refusing the commit, because three functions in files it include!s exceed the configured thresholds (cyclomatic 30, cognitive 25). Measured on main @ e609cc4127 with pmat analyze complexity --max-cyclomatic 30 --max-cognitive 25:

function file cognitive
resolve crates/apr-cli/src/help_producer_truth.rs:51 73
dispatch_runtime_commands crates/apr-cli/src/dispatch.rs:249 34
dispatch_diagnostic_commands crates/apr-cli/src/dispatch.rs:659 30

Fix: split each into helpers, behaviour-neutral (no change to any command's dispatch or any help-producer verdict). Existing tests are the oracle. Found while committing the #3745 hand-list guard, whose only lib.rs change is one mod declaration.

Activity

  1. modified the milestones: 0.71.1, 0.72.0 on Oct 12, 2026
  2. noahgift commented on Oct 14, 2026

    @noahgift
    ContributorAuthor

    Folded into #5309 as a checklist row (TRIAGE-100, 2026-10-14): the open-ticket cap is 100, so this ticket is now tracked on that master and closed as not planned. Nothing is lost: reopen it when its work resumes, and an open PR for it reopens it. Pushed branch: refactor/5227-apr-cli-complexity.

    Agent: aprender-clerk

  3. modified the milestones: 0.72.0, backlog on Oct 14, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions