Skip to content

refactor(metrics): split report assembly into phases - #42

Merged
sturlese merged 1 commit into
mainfrom
refactor/metrics-report-phases
Aug 30, 2026
Merged

refactor(metrics): split report assembly into phases#42
sturlese merged 1 commit into
mainfrom
refactor/metrics-report-phases

Conversation

@sturlese

Copy link
Copy Markdown
Owner

Summary

Refactor metrics.build_report() into explicit private computation phases while preserving its public contract and observable behavior.

Changes

  • extract full-history weekly aggregation and adoption inputs
  • isolate decision-window workflow KPI assembly
  • separate governance completion from report total finalization
  • add characterization tests for temporal boundaries, all-history adoption, orphan evidence, weekly aggregation, and stable ordering

Testing

  • python -m pytest --cov=flightdeck --cov-fail-under=85 — 258 passed, 94.48% coverage
  • python -m pytest tests/test_metrics.py — 29 passed before and after the production refactor
  • python -m pytest tests/test_cli_and_html.py — 33 passed
  • ruff check src tests — passed
  • offline demo, ledger verification, and dashboard generation — passed

Notes

  • no public API, dataclass, formula, serialized output, or persisted format changes
  • existing future-run inclusion and all-history adoption semantics are intentionally preserved and characterized
  • Build Squad tester and architecture auditor verdicts: PASS
  • no documentation change is required because the module boundary remains evidence-to-KPIs

Separate full-history aggregation, decision-window KPIs, governance completion, and report finalization behind private helpers. Add characterization coverage for boundary, adoption, orphan-run, and ordering behavior.
@sturlese
sturlese merged commit 1faedbc into main Aug 30, 2026
5 checks passed
@sturlese
sturlese deleted the refactor/metrics-report-phases branch August 30, 2026 10:06
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