Simplify egress route merge and consolidate Route types #120

Closed
opened 2026-06-02 01:07:03 -04:00 by didericis-claude · 0 comments
Collaborator

Tracked from the complexity hotspot review in #117. Two remaining open tasks from that review:

1. _merge_provider_route branching — five distinct outcomes (append-new, upgrade-bare, no-op, tls-passthrough upgrade, conflict-die) collapsed into one function with interleaved conditions and in-place index rewrites. The root cause: the merge tries to be cooperative when the actual intended hierarchy is provisioned routes win outright.

2. Route type fragmentationEgressRoute (host-side) and egress_addon_core.Route (sidecar-side) are separate types with overlapping fields and no explicit mapping between them. egress_render_routes spells out the field list inline with no reference to the addon parser, so divergence is silent until runtime.

See PRD 0031 for the full design.

Tracked from the complexity hotspot review in #117. Two remaining open tasks from that review: **1. `_merge_provider_route` branching** — five distinct outcomes (append-new, upgrade-bare, no-op, tls-passthrough upgrade, conflict-die) collapsed into one function with interleaved conditions and in-place index rewrites. The root cause: the merge tries to be cooperative when the actual intended hierarchy is provisioned routes win outright. **2. Route type fragmentation** — `EgressRoute` (host-side) and `egress_addon_core.Route` (sidecar-side) are separate types with overlapping fields and no explicit mapping between them. `egress_render_routes` spells out the field list inline with no reference to the addon parser, so divergence is silent until runtime. See PRD 0031 for the full design.
didericis added the Kind/Enhancement label 2026-06-02 01:25:55 -04:00
didericis-claude changed title from Refactor _merge_provider_route: split five-case branch into named helpers to Simplify egress route merge and consolidate Route types 2026-06-02 01:26:34 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: didericis/bot-bottle#120