Skip to content

[Code Quality] Refactor top 2 god files identified by Sentrux (highest-complexity sources) #45587

Description

@github-actions

Description

The Daily Sentrux Report (2026-07-15) detected 2 "god files" — files with extremely high cyclomatic complexity that are the primary driver of the low quality signal (5219/10000). These files have the highest concentration of the 1,021 complex functions in the codebase.

God files hurt maintainability, testability, and onboarding. They are the highest-ROI refactor targets.

Suggested Changes

  1. Run go run ./cmd/gh-aw --help or use static analysis to identify the 2 god files
  2. For each god file:
    • Extract large functions (>50 lines) into focused helper files
    • Group related helpers into sub-packages if appropriate
    • Add table-driven tests for the extracted functions
  3. Target cyclomatic complexity < 15 per function

Files Affected

  • 2 god files TBD — use gocyclo -top 10 ./... or sentrux to identify them

Success Criteria

  • 0 god files in Sentrux report
  • Complex function count drops from 1,021
  • Quality signal improves from 5219/10000
  • All existing tests continue to pass

Source

Extracted from Daily Sentrux Report — 2026-07-15 discussion #45580

Priority

High — highest direct impact on quality score; god files are the primary bottleneck

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · 180.5 AIC · ⌖ 7.67 AIC · ⊞ 7K · ◷

  • expires on Jul 15, 2026, 5:18 PM UTC-08:00

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions