Skip to content

Commit dfe7b71

Browse files
committed
docs(configuration): address Copilot PR review comments
- Fix stale spec filenames in progress log entries for issues torrust#1979, torrust#1980, and torrust#1981 (old intermediate names → correct final names) - Replace .expose() with .expose_secret() in 4 places in spec torrust#1490 (the correct secrecy crate API is ExposeSecret::expose_secret()) - Replace scheme() + bind_to() with protocol() + bind_address() in 2 places in spec torrust#1415 (actual ServiceBinding API from torrust-net-primitives) - Fix malformed markdown table in spec torrust#1980 where unescaped | in an rg command broke the table columns Addresses review comments on PR torrust#1982.
1 parent 1770bce commit dfe7b71

5 files changed

Lines changed: 25 additions & 25 deletions

docs/issues/open/1415-1978-use-service-binding-instead-of-socket-addr.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ A future issue could build an "internal connection URL" from the OS-resolved IP
6666
- Health check info structs
6767
- Metrics labels
6868
- Domain events (if applicable)
69-
- No new types — `ServiceBinding` already has `scheme()` and `bind_to()` methods
69+
- No new types — `ServiceBinding` already has `protocol()` and `bind_address()` methods
7070
- No changes to `torrust-net-primitives` external crate
7171

7272
### Out of Scope
@@ -80,14 +80,14 @@ A future issue could build an "internal connection URL" from the OS-resolved IP
8080

8181
## Implementation Plan
8282

83-
| ID | Status | Task | Notes |
84-
| --- | ------ | ------------------------------------------------------------------------ | ----------------------------------------------------- |
85-
| T1 | TODO | Identify all places where bare `SocketAddr` is used for service identity | Logs, health check, metrics, events, server launchers |
86-
| T2 | TODO | Replace `SocketAddr` with `ServiceBinding` in those places | `ServiceBinding` already has `scheme()` + `bind_to()` |
87-
| T3 | TODO | Update startup logging to use `ServiceBinding` | Replace manual URL string construction |
88-
| T4 | TODO | Update health check info to include `ServiceBinding` | For issue #1409 |
89-
| T5 | TODO | Update metrics to use `ServiceBinding` scheme as a label | For issue #1403/#1414 |
90-
| T6 | TODO | Run `linter all` and tests | |
83+
| ID | Status | Task | Notes |
84+
| --- | ------ | ------------------------------------------------------------------------ | ------------------------------------------------------------ |
85+
| T1 | TODO | Identify all places where bare `SocketAddr` is used for service identity | Logs, health check, metrics, events, server launchers |
86+
| T2 | TODO | Replace `SocketAddr` with `ServiceBinding` in those places | `ServiceBinding` already has `protocol()` + `bind_address()` |
87+
| T3 | TODO | Update startup logging to use `ServiceBinding` | Replace manual URL string construction |
88+
| T4 | TODO | Update health check info to include `ServiceBinding` | For issue #1409 |
89+
| T5 | TODO | Update metrics to use `ServiceBinding` scheme as a label | For issue #1403/#1414 |
90+
| T6 | TODO | Run `linter all` and tests | |
9191

9292
## Progress Tracking
9393

docs/issues/open/1490-1978-decompose-database-config-and-overhaul-secrets.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ The `rest-api-client` crate and `tracker-core` authentication are **not affected
156156
- Wrap database password in `Secret<String>` (inside `ConnectionInfo`)
157157
- Wrap API tokens in `Secret<String>` (in `HttpApi` config struct)
158158
- Remove manual `mask_secrets()` methods (replaced by type-level protection)
159-
- Update all ~25 consumers to use the new enum variants and `.expose()` for secret access
159+
- Update all ~25 consumers to use the new enum variants and `.expose_secret()` for secret access
160160
- Update default config TOML files (6 files) to the new format
161161
- Update inline TOML in tests and doc comments
162162

@@ -178,7 +178,7 @@ The `rest-api-client` crate and `tracker-core` authentication are **not affected
178178
| T5 | TODO | Wrap API tokens in `Secret<String>` | In `HttpApi` config struct |
179179
| T6 | TODO | Remove manual `mask_secrets()` methods | No longer needed with type-level protection |
180180
| T7 | TODO | Update `tracker-core/src/databases/setup.rs` dispatch | Match on `Database` enum variant instead of `Driver` |
181-
| T8 | TODO | Update all ~25 consumers (tests, examples, benchmarks, E2E) | Construct enum variants; use `.expose()` for secrets |
181+
| T8 | TODO | Update all ~25 consumers (tests, examples, benchmarks, E2E) | Construct enum variants; use `.expose_secret()` for secrets |
182182
| T9 | TODO | Update default config TOML files (6 files) | New per-driver format |
183183
| T10 | TODO | Update inline TOML in tests and doc comments | `mod.rs` tests, `lib.rs`, integration tests |
184184
| T11 | TODO | Run `linter all` and full test suite | |
@@ -222,11 +222,11 @@ The `rest-api-client` crate and `tracker-core` authentication are **not affected
222222

223223
### Manual Verification Scenarios
224224

225-
| ID | Scenario | Command/Steps | Expected Result | Status | Evidence |
226-
| --- | ------------------------------------ | ------------------------------------------------ | ------------------------ | ------ | -------- |
227-
| M1 | Verify secrets masked in logs | Run tracker, check startup log for config output | Secrets show as `***` | TODO | |
228-
| M2 | Verify Debug output masks secrets | `println!("{:?}", config)` in test or debug | Secrets show as `***` | TODO | |
229-
| M3 | Verify secrets accessible via expose | Write test that reads a secret via `.expose()` | Returns the actual value | TODO | |
225+
| ID | Scenario | Command/Steps | Expected Result | Status | Evidence |
226+
| --- | ------------------------------------------- | ----------------------------------------------------- | ------------------------ | ------ | -------- |
227+
| M1 | Verify secrets masked in logs | Run tracker, check startup log for config output | Secrets show as `***` | TODO | |
228+
| M2 | Verify Debug output masks secrets | `println!("{:?}", config)` in test or debug | Secrets show as `***` | TODO | |
229+
| M3 | Verify secrets accessible via expose_secret | Write test that reads a secret via `.expose_secret()` | Returns the actual value | TODO | |
230230

231231
### Acceptance Verification
232232

@@ -242,7 +242,7 @@ The `rest-api-client` crate and `tracker-core` authentication are **not affected
242242
## Risks and Trade-offs
243243

244244
- **Breaking change for database config**: The `Database` struct becomes an enum; the old `path` field is removed with no backward-compatibility fallback. Mitigation: this is part of the v3.0.0 config schema bump where breaking changes are expected and documented.
245-
- **Consumer updates (~25 files)**: Every place that constructs or reads a `Database` value needs updating. Mitigation: the compiler will catch all mismatches; changes are mechanical (construct enum variant, use `.expose()` for secrets).
245+
- **Consumer updates (~25 files)**: Every place that constructs or reads a `Database` value needs updating. Mitigation: the compiler will catch all mismatches; changes are mechanical (construct enum variant, use `.expose_secret()` for secrets).
246246
- **Performance**: `secrecy` adds zeroize-on-drop overhead. Mitigation: negligible for config values read once at startup.
247247

248248
## References

docs/issues/open/1979-1978-copy-configuration-schema-v2-to-v3-baseline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ This approach:
8787
### Progress Log
8888

8989
- 2026-07-13 21:00 UTC - josecelano - Initial spec drafted
90-
- 2026-07-15 00:00 UTC - josecelano - GitHub issue #1979 created; spec moved to `docs/issues/open/1979-configuration-overhaul-copy-v2-to-v3-baseline.md`
90+
- 2026-07-15 00:00 UTC - josecelano - GitHub issue #1979 created; spec moved to `docs/issues/open/1979-1978-copy-configuration-schema-v2-to-v3-baseline.md`
9191

9292
## Acceptance Criteria
9393

docs/issues/open/1980-1978-configuration-overhaul-final-cleanup.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Files that import `torrust_tracker_configuration::logging` (the module, not the
174174
### Progress Log
175175

176176
- 2026-07-14 00:00 UTC - josecelano - Initial spec drafted
177-
- 2026-07-15 00:00 UTC - josecelano - GitHub issue #1980 created; spec moved to `docs/issues/open/1980-configuration-overhaul-final-cleanup.md`
177+
- 2026-07-15 00:00 UTC - josecelano - GitHub issue #1980 created; spec moved to `docs/issues/open/1980-1978-configuration-overhaul-final-cleanup.md`
178178

179179
## Acceptance Criteria
180180

@@ -197,11 +197,11 @@ Files that import `torrust_tracker_configuration::logging` (the module, not the
197197

198198
### Manual Verification Scenarios
199199

200-
| ID | Scenario | Command/Steps | Expected Result | Status | Evidence |
201-
| --- | --------------------------------- | ----------------------------------------- | -------------------------- | ------- | -------- | ----------- | ---------- | -------- | ---------------- | --------------------------------- | ---- | --- |
202-
| M1 | Verify no global re-export usage | `rg "torrust_tracker_configuration::(Core | Configuration | Logging | HttpApi | HttpTracker | UdpTracker | Database | Threshold)[^:]"` | No matches (all use v3_0_0 paths) | TODO | |
203-
| M2 | Verify v2 module still accessible | `cargo doc --document-private-items` | v2_0_0 types documented | TODO | |
204-
| M3 | Verify v3 module is the default | Check `lib.rs` for `LATEST_VERSION` | `LATEST_VERSION = "3.0.0"` | TODO | |
200+
| ID | Scenario | Command/Steps | Expected Result | Status | Evidence |
201+
| --- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------- | ------ | -------- |
202+
| M1 | Verify no global re-export usage | `rg 'torrust_tracker_configuration::(Core\|Configuration\|Logging\|HttpApi\|HttpTracker\|UdpTracker\|Database\|Threshold)[^:]'` | No matches (all use v3_0_0 paths) | TODO | |
203+
| M2 | Verify v2 module still accessible | `cargo doc --document-private-items` | v2_0_0 types documented | TODO | |
204+
| M3 | Verify v3 module is the default | Check `lib.rs` for `LATEST_VERSION` | `LATEST_VERSION = "3.0.0"` | TODO | |
205205

206206
### Acceptance Verification
207207

docs/issues/open/1981-1978-fix-tsl-config-tls-config-typo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ The struct name `TslConfig` and all field names `tsl_config` should be `TlsConfi
131131
### Progress Log
132132

133133
- 2026-07-14 00:00 UTC - josecelano - Initial spec drafted
134-
- 2026-07-15 00:00 UTC - josecelano - GitHub issue #1981 created; spec moved to `docs/issues/open/1981-configuration-overhaul-fix-tsl-typo.md`
134+
- 2026-07-15 00:00 UTC - josecelano - GitHub issue #1981 created; spec moved to `docs/issues/open/1981-1978-fix-tsl-config-tls-config-typo.md`
135135

136136
## Acceptance Criteria
137137

0 commit comments

Comments
 (0)