The pre-commit workflow's gocyclo hook fails on current main:
12 config recEffectiveSavingsPct internal/config/store_postgres_recommendations.go:320:1
recEffectiveSavingsPct was introduced by PR #1206 (merged as cfead3b) with cyclomatic complexity 12, above the hook's -over 10 threshold. The hook runs gocyclo -over 10 over all non-test Go files, so every PR's "Run pre-commit hooks" CI job now fails regardless of what the PR touches (observed on PR #1219, and reproducible locally with gocyclo -over 10 internal/config/store_postgres_recommendations.go on main).
PR #1220 (fix/main-ci-failing-jobs) fixed the lint, govulncheck, and test failures on main but did not address this one.
Fix: refactor recEffectiveSavingsPct to complexity <= 10, for example by extracting the on-demand baseline reconstruction into a helper. Behavior must stay identical (the function's semantics are covered by the #1103/#1148 net-savings rules documented in its comment).
The pre-commit workflow's gocyclo hook fails on current main:
recEffectiveSavingsPctwas introduced by PR #1206 (merged as cfead3b) with cyclomatic complexity 12, above the hook's-over 10threshold. The hook runsgocyclo -over 10over all non-test Go files, so every PR's "Run pre-commit hooks" CI job now fails regardless of what the PR touches (observed on PR #1219, and reproducible locally withgocyclo -over 10 internal/config/store_postgres_recommendations.goon main).PR #1220 (fix/main-ci-failing-jobs) fixed the lint, govulncheck, and test failures on main but did not address this one.
Fix: refactor
recEffectiveSavingsPctto complexity <= 10, for example by extracting the on-demand baseline reconstruction into a helper. Behavior must stay identical (the function's semantics are covered by the #1103/#1148 net-savings rules documented in its comment).