Skip to content

#3669 batch: two functions over the complexity ratchet (run_shapes_gate NEW 13/28, dispatch_runtime_commands GROWN 41->43) — extract helpers, no behaviour change #3681

Closed

Description

@noahgift

Batch #3669's guard-tree was RED on check_complexity_ratchet.sh vs main 79a3af79d:

RED  NEW    crates/aprender-contracts/src/lint/shapes_gate.rs::run_shapes_gate  cyclomatic 13 cognitive 28
RED  GROWN  crates/apr-cli/src/dispatch.rs::dispatch_runtime_commands  cognitive 41 -> 43, cyclomatic 15 -> 16

The first comes from #3600's edits and the second from #3604 (--revalidate env seam) and #3638/#3602 (the accelerator classifier). None of the constituents can be dropped from the 0.69 platform.

Acceptance

  1. run_shapes_gate is under the threshold (cyclomatic < 30, cognitive ≤ 25) and dispatch_runtime_commands is back to main's 15/41. bash scripts/check_complexity_ratchet.sh reports none new, none grown.
  2. No behaviour change. Each extraction moves code verbatim into a helper: same order, same outcomes. cargo test -p aprender-contracts --lib has the same pass count as before (1684), and cargo test -p apr-cli --lib dispatch/registry pass. Clippy -D warnings is clean on both crates.
  3. Nothing else in the diff: only shapes_gate.rs and dispatch.rs, plus this row's roadmap fragment.

Refs #3669 #3600 #3604 #3602

Activity

  1. added this to the 0.69.0 milestone on Sep 21, 2026
  2. noahgift commented on Sep 21, 2026

    @noahgift
    MemberAuthor

    Non-author seat-fill for PMAT-3681 (aprender-62, not the author): bash scripts/check_complexity_ratchet.sh at the pushed batch head d0771c5c5 (release/0.69-batch), rc=0:

    comparand   MERGEBASE    79a3af79d
    merge       HEAD         d0771c5c5
    measured    base  10405 .rs file(s), 668 function(s) over cyclomatic>30 or cognitive>25
    measured    merge 10413 .rs file(s), 668 function(s) over cyclomatic>30 or cognitive>25
    PASS (D2): 79a3af79d vs d0771c5c5 measured by pmat 3.41.1 — none new, none grown.
    

    Measured in my own worktree (agent-wt/review-3669), which is the tree pushed as d0771c5c5.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions