Skip to content

refactor(operator-trend): collapse the two remaining refresh renderer clone families onto parametrized bases (T3-2 phase 6g)#90

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

refactor(operator-trend): collapse the two remaining refresh renderer clone families onto parametrized bases (T3-2 phase 6g)#90
saagpatel merged 1 commit into
mainfrom
refactor/operator-trend-collapse-refresh-renderers

Conversation

@saagpatel

Copy link
Copy Markdown
Owner

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-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.

… 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.
@saagpatel saagpatel merged commit e50e35d 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