|
2 | 2 |
|
3 | 3 | **Issue**: [#281](https://github.com/torrust/torrust-tracker-deployer/issues/281) |
4 | 4 | **Type**: Refactor |
5 | | -**Status**: In Progress |
| 5 | +**Status**: ✅ Completed |
6 | 6 |
|
7 | 7 | ## Overview |
8 | 8 |
|
@@ -34,27 +34,28 @@ See: [`docs/refactors/plans/strengthen-domain-invariant-enforcement.md`](../refa |
34 | 34 | - [x] `TryFrom<HttpApiSection> for HttpApiConfig` |
35 | 35 | - [x] Documentation and ADRs |
36 | 36 |
|
37 | | -### Phase 1: Tracker Configuration Types |
| 37 | +### Phase 1: Tracker Configuration Types ✅ |
38 | 38 |
|
39 | | -- [ ] `UdpTrackerConfig` - validated constructor, private fields, getters |
40 | | -- [ ] `HttpTrackerConfig` - validated constructor, private fields, getters |
41 | | -- [ ] `HealthCheckApiConfig` - validated constructor, private fields, getters |
42 | | -- [ ] `TryFrom` implementations for each DTO section |
| 39 | +- [x] `UdpTrackerConfig` - validated constructor, private fields, getters |
| 40 | +- [x] `HttpTrackerConfig` - validated constructor, private fields, getters |
| 41 | +- [x] `HealthCheckApiConfig` - validated constructor, private fields, getters |
| 42 | +- [x] `TryFrom` implementations for each DTO section |
43 | 43 |
|
44 | | -### Phase 2: Cross-Cutting Invariants |
| 44 | +### Phase 2: Cross-Cutting Invariants ✅ |
45 | 45 |
|
46 | | -- [ ] `TrackerCoreConfig` - database configuration validation |
47 | | -- [ ] `TrackerConfig` - validates at construction (socket conflicts) |
48 | | -- [ ] `UserInputs` - validated constructor (Grafana requires Prometheus) |
| 46 | +- [x] `TrackerCoreConfig` - database configuration validation |
| 47 | +- [x] `TrackerConfig` - validates at construction (socket conflicts) |
| 48 | +- [x] `UserInputs` - validated constructor (Grafana requires Prometheus) |
| 49 | +- [x] `HttpsConfig` - validated constructor (email validation) |
49 | 50 |
|
50 | 51 | ## Acceptance Criteria |
51 | 52 |
|
52 | | -- [ ] All domain configuration types use validated constructors |
53 | | -- [ ] All fields are private with getter methods |
54 | | -- [ ] All types implement custom `Deserialize` with validation |
55 | | -- [ ] All DTO→Domain conversions use `TryFrom` trait |
56 | | -- [ ] Validation logic moved from application to domain layer |
57 | | -- [ ] Pre-commit checks pass: `./scripts/pre-commit.sh` |
| 53 | +- [x] All domain configuration types use validated constructors |
| 54 | +- [x] All fields are private with getter methods |
| 55 | +- [x] All types implement custom `Deserialize` with validation |
| 56 | +- [x] All DTO→Domain conversions use `TryFrom` trait |
| 57 | +- [x] Validation logic moved from application to domain layer |
| 58 | +- [x] Pre-commit checks pass: `./scripts/pre-commit.sh` |
58 | 59 |
|
59 | 60 | ## Contributing Guide |
60 | 61 |
|
|
0 commit comments