Skip to content

Refactor maturity analytics helpers#224

Merged
ccf merged 1 commit intomainfrom
refactor/backend-analytics-services
May 1, 2026
Merged

Refactor maturity analytics helpers#224
ccf merged 1 commit intomainfrom
refactor/backend-analytics-services

Conversation

@ccf
Copy link
Copy Markdown
Owner

@ccf ccf commented May 1, 2026

Summary

  • Extract toolchain reliability aggregation out of the monolithic maturity analytics service
  • Extract harness configuration fingerprint construction into a dedicated helper module
  • Extract project readiness and context quality scoring into a dedicated helper module
  • Keep the public maturity analytics API/response behavior unchanged while shrinking the orchestration service

Tests

  • ruff check .
  • ruff format --check .
  • bandit -r src/ -c pyproject.toml
  • pytest --import-mode=importlib tests/test_maturity.py -q
  • pytest --import-mode=importlib -q (963 passed)

Notes

  • Backend-only refactor; no frontend/UI changes.
  • Existing untracked screenshot/audit artifacts were left untouched.

Note

Low Risk
Low risk refactor that mostly moves existing maturity analytics aggregation logic into dedicated helper modules; main risk is subtle regression in scoring/sorting due to code movement and new helper boundaries.

Overview
Refactors maturity_service.get_maturity_analytics by extracting three large analytics builders into dedicated modules: toolchain reliability (maturity_reliability.py), harness configuration fingerprints (maturity_harness_fingerprints.py), and project readiness/context quality scoring (maturity_context_quality.py).

The service now delegates to build_toolchain_reliability, build_harness_configuration_fingerprints, and build_project_readiness_and_context_quality, removing inlined helper functions and duplicated computations (e.g., context_signal_count) while keeping the response shape and ordering logic the same.

Reviewed by Cursor Bugbot for commit fdb651e. Bugbot is set up for automated code reviews on this repo. Configure here.

@ccf ccf merged commit a4c3bbf into main May 1, 2026
6 checks passed
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