refactor(operator-trend): collapse the two remaining refresh renderer clone families onto parametrized bases (T3-2 phase 6g)#90
Merged
saagpatel merged 1 commit intoJun 20, 2026
Conversation
… clone families onto parametrized bases (T3-2 phase 6g)
Collapse the last two reset-reentry renderer clone families in the file:
- refresh-recovery hotspot selectors (`..._refresh_hotspots`,
`..._rebuild_reentry_refresh_hotspots`) onto `_refresh_hotspots_base`
+ `_RefreshHotspotsSpec` (score/status/path keys + confirmation /
clearance status sets).
- refresh-recovery summary renderers (`..._refresh_recovery_summary`,
`..._rebuild_reentry_refresh_recovery_summary`) onto
`_refresh_recovery_summary_base` + `_RefreshRecoverySummarySpec`
(status/score/reason keys + per-tier tokens + reworded prose).
Each pair was a structural literal-only clone; collapsing removes the
duplicated render/selector skeleton and its drift risk. Public signatures
unchanged; specs (including prose `str.format` templates over
`{label}` / `{score}` / `{hotspot_label}`) were extracted from the source
AST, never hand-typed.
Proven byte-identical: exhaustive branch differentials (640 cases per
summary tier; a grouping/filter/sort/cap corpus per hotspots tier across
both modes) plus the composer golden contract (zero diff). After this the
file has no remaining literal-only renderer clones.
Verification: `uv run pytest -q` 2539 passed / 2 skipped; mypy clean;
ruff check 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 two remaining refresh renderer clone families onto parametrized bases (T3-2 phase 6g)
Collapse the last two reset-reentry renderer clone families in the file:
..._refresh_hotspots,..._rebuild_reentry_refresh_hotspots) onto_refresh_hotspots_base_RefreshHotspotsSpec(score/status/path keys + confirmation /clearance status sets).
..._refresh_recovery_summary,..._rebuild_reentry_refresh_recovery_summary) onto_refresh_recovery_summary_base+_RefreshRecoverySummarySpec(status/score/reason keys + per-tier tokens + reworded prose).
Each pair was a structural literal-only clone; collapsing removes the
duplicated render/selector skeleton and its drift risk. Public signatures
unchanged; specs (including prose
str.formattemplates over{label}/{score}/{hotspot_label}) were extracted from the sourceAST, never hand-typed.
Proven byte-identical: exhaustive branch differentials (640 cases per
summary tier; a grouping/filter/sort/cap corpus per hotspots tier across
both modes) plus the composer golden contract (zero diff). After this the
file has no remaining literal-only renderer clones.
Verification:
uv run pytest -q2539 passed / 2 skipped; mypy clean;ruff check clean.