refactor(operator-trend): collapse the last 3 renderer/selector clone families onto parametrized bases (T3-2 phase 7c)#93
Merged
saagpatel merged 1 commit intoJun 20, 2026
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_summary_base
-> _tier_summary_base
-> _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.