Skip to content

[Code Quality] Reduce the 3 god files and address coupling score increase (0.038 → 0.058) #48219

Description

@github-actions

Description

The Daily Sentrux quality report (2026-07-26) flagged two concerning trends:

  1. God files increased from 2 → 3: Large, overloaded files that violate single-responsibility and increase coupling
  2. Coupling score spiked from 0.038 → 0.058 (+53%): Cross-module dependencies added in recent commits may have introduced inappropriate coupling

With 1,026 complex functions already tracked as the primary bottleneck, god files compound the problem by concentrating complexity.

Suggested Changes

  1. Identify the 3 god files: Run make golint-custom or use the Sentrux quality tool to identify which files are flagged as god files today
  2. Split each god file into focused modules using the established extract* pattern already used in compiler_custom_jobs.go
  3. Investigate coupling increase: Review recent commits for new cross-package imports; refactor to reduce coupling toward a target of 0.04 or below
  4. Track resolution: After splitting, re-run the Sentrux quality check to confirm god_files returns to ≤2

Files Affected

  • Unknown until Sentrux scan identifies the 3 god files (likely in pkg/compiler/ or pkg/cli/ based on growth trend)
  • Potentially: new sub-packages or files created during the split

Success Criteria

  • God files count ≤ 2 (reduced from 3)
  • Coupling score ≤ 0.045 (reduced from 0.058)
  • All existing tests pass: make test-unit
  • No behavior changes

Source

Extracted from Daily Sentrux Report - 2026-07-26

Priority

Medium — coupling increase of 53% is a red flag; god files grow exponentially harder to refactor over time

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · sonnet46 · 41.7 AIC · ⌖ 8.4 AIC · ⊞ 7.2K ·

  • expires on Jul 27, 2026, 11:11 AM UTC-08:00

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