Skip to content

docs: charter complexity phase 8 and record the two gates disagreeing - #404

Merged
David-Noble-at-work merged 1 commit into
developfrom
docs-complexity-phase-8
Aug 14, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
docs-complexity-phase-8

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Summary

make check fails its complexity step on two functions the 4b-3 ladder never cleared. Both
predate the #373 Windows campaign and neither was touched by it:

27 git guessDirName    pkg/op/provider/git/helpers.go:182:1
22 cli runSelfInstall  internal/cli/selfinstall.go:211:1

They join docs/plans/complexity-refactors.md as phase 8 (total 61 → 63); the plan returns to
in-progress.

The finding worth more than the two entries

The repository's two complexity gates disagree:

  • make complexity (standalone fzipp/gocyclo, threshold 20) fails on both — so make check
    is not a clean local signal today.
  • make lint-all reports 0 issues on linux, darwin, and windows, even though
    .golangci.yaml enables gocyclo at min-complexity: 15.

runSelfInstall is explained: it carries //nolint:gocognit,gocyclo, which golangci honors and
standalone gocyclo ignores. guessDirName is not — no suppression anywhere in the file, no
path exclusion covering it, and golangci-lint run --enable-only gocyclo ./pkg/op/provider/git/...
still returns 0 issues.

Hypothesis: min-complexity is not reaching the linter (golangci's default is 30, which would
explain silence at 27 and 22 alike). Not confirmed, so the plan records it as an open question
rather than a diagnosis. Resolving it is part of the phase — a threshold that silently does not
apply is a gate passing on nothing — and the phase ends by confirming zero findings under both
tools.

Open question for the reviewer

Issue #312 is closed (2026-08-04). Phase 8 needs either a reopen or its own tracking issue
before its implementation PR. Recorded as undecided rather than settled unilaterally.

Docs only; no code paths touched.

Assisted-by: Claude

make check fails its complexity step on two functions the 4b-3 ladder
never cleared -- git.guessDirName 27 (pkg/op/provider/git/helpers.go:182)
and cli.runSelfInstall 22 (internal/cli/selfinstall.go:211). Both predate
the #373 Windows campaign and neither was touched by it. They join the
plan as phase 8; the total moves 61 -> 63 and the plan returns to
in-progress.

The more useful finding is that the repository's two complexity gates
disagree. make complexity (standalone fzipp/gocyclo, threshold 20) fails
on both. make lint-all reports 0 issues on all three GOOS values even
though .golangci.yaml enables gocyclo at min-complexity 15.
runSelfInstall is explained -- it carries a //nolint:gocognit,gocyclo
that golangci honors and standalone gocyclo ignores. guessDirName is
not: no suppression anywhere in the file, no path exclusion covering it,
and running golangci-lint with only gocyclo enabled against that package
still returns 0 issues.

The hypothesis is that min-complexity is not reaching the linter --
golangci's own default is 30, which would explain silence at 27 and 22
alike -- but that was not confirmed, so it is recorded as an open
question rather than a diagnosis. Resolving it belongs to the phase: a
threshold that silently does not apply is a gate passing on nothing, so
the phase ends by confirming zero findings under both tools rather than
one.

Issue #312 is closed; the phase needs a reopen or its own tracking issue
before its PR. Noted in the plan as undecided rather than settled here.

Assisted-by: Claude
Signed-off-by: David Noble <[email protected]>
@David-Noble-at-work David-Noble-at-work self-assigned this Aug 14, 2026
@David-Noble-at-work
David-Noble-at-work merged commit 99a0dbb into develop Aug 14, 2026
7 of 8 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the docs-complexity-phase-8 branch August 14, 2026 00:17
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.

1 participant