Overview
This task creates the DockerComposeTopology aggregate and derives required networks from service configurations. This is PR 5 in the 5-PR refactoring strategy and completes Epic #287.
Parent Epic: #287
Depends On: #294 (Phase 1 - completed)
Specification: docs/issues/phase-2-topology-aggregate.md
Goals
Tasks
P2.1: Create DockerComposeTopology Aggregate
P2.2: Derive Required Networks in Context
Acceptance Criteria
Service enum exists with all 5 services (Tracker, MySQL, Prometheus, Grafana, Caddy)
DockerComposeTopology aggregate derives required networks from services
required_networks field added to DockerComposeContext
- Template uses
required_networks loop instead of conditionals
- No conditional network logic remains in template
- All invariants enforced (no orphan networks, deterministic order)
- All existing tests pass
- E2E tests verify behavioral equivalence
Related
Overview
This task creates the
DockerComposeTopologyaggregate and derives required networks from service configurations. This is PR 5 in the 5-PR refactoring strategy and completes Epic #287.Parent Epic: #287
Depends On: #294 (Phase 1 - completed)
Specification: docs/issues/phase-2-topology-aggregate.md
Goals
DockerComposeTopologyaggregate with service topology collectionServiceenum for type-safe service identificationTasks
P2.1: Create DockerComposeTopology Aggregate
Serviceenum insrc/domain/topology/service.rsDockerComposeTopologyaggregate insrc/domain/topology/aggregate.rsServiceTopologystructrequired_networks()method with deduplication and sortingP2.2: Derive Required Networks in Context
NetworkDefinitiontype to context modulerequired_networks: Vec<NetworkDefinition>toDockerComposeContextderive_required_networks()in builderrequired_networksAcceptance Criteria
Serviceenum exists with all 5 services (Tracker, MySQL, Prometheus, Grafana, Caddy)DockerComposeTopologyaggregate derives required networks from servicesrequired_networksfield added toDockerComposeContextrequired_networksloop instead of conditionalsRelated