Skip to content

refactor(operator-trend): collapse the last 3 renderer/selector clone families onto parametrized bases (T3-2 phase 7c)#93

Merged
saagpatel merged 1 commit into
mainfrom
refactor/resolution-trend-collapse-final-renderers
Jun 20, 2026
Merged

refactor(operator-trend): collapse the last 3 renderer/selector clone families onto parametrized bases (T3-2 phase 7c)#93
saagpatel merged 1 commit into
mainfrom
refactor/resolution-trend-collapse-final-renderers

Conversation

@saagpatel

Copy link
Copy Markdown
Owner

refactor(operator-trend): collapse the last 3 renderer/selector clone families onto parametrized bases (T3-2 phase 7c)

Finish the clone-collapse phase for operator_resolution_trend.py by
collapsing the last three worthwhile clone families:

  • refresh-recovery summaries (rebuild / restore / rerestore)
    -> _refresh_recovery_summary_base
  • tier-rollup summaries (rebuild_reentry / rerestore / rererestore)
    -> _tier_summary_base
  • freshness hotspot selectors (rebuild_reentry / restore)
    -> _freshness_hotspots_base

Each was an exact structural clone differing only in per-tier keys, status
tokens, and reworded prose; collapsing removes the triplicated
render/selector skeletons and their drift risk.

Proven byte-identical by exhaustive branch differentials (512 cases/tier
for the 6-branch refresh summaries; 112/tier for the tier rollups; a
9-class grouping/filter/sort/cap corpus per freshness tier). Signatures
verified identical across tiers before wrapping. The full suite is the
integration backstop (no composer golden covers this file).

The remaining clone families (16 side-from-status mappers, direction
helpers) are intentionally left: collapsing 4-7 line functions costs more
wrapper+spec scaffolding than it saves, and they are exact clones with zero
drift. The only remaining structural target here is the 1,852-line
_build_resolution_trend.

Verification: pytest 2539 passed / 2 skipped; mypy clean; ruff clean.

… families onto parametrized bases (T3-2 phase 7c)

Finish the clone-collapse phase for operator_resolution_trend.py by
collapsing the last three worthwhile clone families:

- refresh-recovery summaries (rebuild / restore / rerestore)
  -> _refresh_recovery_summary_base
- tier-rollup summaries (rebuild_reentry / rerestore / rererestore)
  -> _tier_summary_base
- freshness hotspot selectors (rebuild_reentry / restore)
  -> _freshness_hotspots_base

Each was an exact structural clone differing only in per-tier keys, status
tokens, and reworded prose; collapsing removes the triplicated
render/selector skeletons and their drift risk.

Proven byte-identical by exhaustive branch differentials (512 cases/tier
for the 6-branch refresh summaries; 112/tier for the tier rollups; a
9-class grouping/filter/sort/cap corpus per freshness tier). Signatures
verified identical across tiers before wrapping. The full suite is the
integration backstop (no composer golden covers this file).

The remaining clone families (16 side-from-status mappers, direction
helpers) are intentionally left: collapsing 4-7 line functions costs more
wrapper+spec scaffolding than it saves, and they are exact clones with zero
drift. The only remaining structural target here is the 1,852-line
_build_resolution_trend.

Verification: pytest 2539 passed / 2 skipped; mypy clean; ruff clean.
@saagpatel saagpatel merged commit ac4a297 into main Jun 20, 2026
3 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