docs(code-reviews): review Secrets, LocalDb, GalaxyRepository, Overview; re-review changed libs (scadaproj#15)

First reviews of Secrets, LocalDb, GalaxyRepository and Overview, and
2026-11-09 re-reviews of Auth, Health, Theme, Telemetry, Audit and
Configuration, all at 91fb2b4. 49 new open findings, each with a P1/P2/P3
priority and a failure scenario: 1 P1, 13 P2, 35 P3. README regenerated;
REVIEW-PROCESS, template and regen script now cover all ten libraries and
the Priority field.

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Joseph Doherty
2026-11-09 14:33:14 -05:00
parent 91fb2b48dd
commit 477245f5db
14 changed files with 2602 additions and 52 deletions
+40 -4
View File
@@ -7,14 +7,31 @@
| Component spec | `components/configuration/spec/SPEC.md` |
| Shared contract | `components/configuration/shared-contract/ZB.MOM.WW.Configuration.md` |
| Status | Reviewed |
| Last reviewed | 2026-06-01 |
| Reviewer | Claude (automated baseline) |
| Commit reviewed | `5f75cd4` |
| Last reviewed | 2026-11-09 (re-review; baseline 2026-06-01 at `5f75cd4`) |
| Reviewer | Claude (2026-11-09 re-review, scadaproj#15; baseline: Claude automated) |
| Commit reviewed | `91fb2b4` |
| Open findings | 0 |
## Summary
The library is small (five source files, ~230 LOC) and in good health. Its core promise —
**2026-11-09 re-review (`91fb2b4`, scadaproj#15).** Re-reviewed at `91fb2b4` (2026-11-09) against the 2026-06-01 baseline `5f75cd4`. The only source changes
are the four baseline fixes from `544a6dd` and the repository-URL correction from `01c6dc1`; the version
is still `0.1.0`. The fixes are:
- `AddValidatedOptions` registers its validator with `TryAddEnumerable`, so a double call runs it once.
- `PortValue` and `HostPort` parse ports with `NumberStyles.None`, invariant culture, so a sign and
surrounding whitespace are rejected.
- `PortValue` quotes the raw value in both the parse-failure and range-failure messages.
- The README and XML docs are packed.
All four fixes are correct. `TryAddEnumerable` deduplicates on the (service, implementation) pair, so
one validator type serving two different options types is still registered for each. The DI helper has
container-building tests (`AddValidatedOptionsTests`, including the double-registration case), and
`ChecksWordingTests` pins the exact message strings. All 42 tests pass. No new findings.
`HostPort` still rejects bracketed IPv6 (`[::1]:443`). That behaviour is unchanged from the baseline and
documented as `host:port`, so it is not raised.
**2026-06-01 baseline (`5f75cd4`).** The library is small (five source files, ~230 LOC) and in good health. Its core promise —
**accumulate every failure, never short-circuit** — holds across all three entry points
(`ValidationBuilder`, `OptionsValidatorBase`, `ConfigPreflight`): the override never returns
early, each primitive appends to a `List<string>` and returns `this`, and the `Success`/`Fail`
@@ -37,6 +54,23 @@ is solid for the happy and primary-failure paths; a few edge cases noted below a
## Checklist coverage
2026-11-09 re-review at `91fb2b4`:
| # | Category | Examined | Notes |
|---|----------|----------|-------|
| 1 | Correctness & logic bugs | ☑ | Strict invariant port parsing (`NumberStyles.None`) rejects a sign, leading or trailing whitespace and negatives, in both `PortValue` and `HostPort` (pinned by `ChecksWordingTests`); the range check is unchanged. Accumulation is unchanged. No issues found. |
| 2 | Public API surface & compatibility | ☑ | No public surface change. Stricter parsing is a deliberate tightening: values like "+5000" or " 5000" now fail at startup. No issues found. |
| 3 | Concurrency & thread safety | ☑ | Validators are stateless, and `TryAddEnumerable` happens at registration time only. No issues found. |
| 4 | Error handling & resilience | ☑ | `ValidateOnStart` with `OptionsValidationException` is unchanged, and guard clauses are present. No issues found. |
| 5 | Security & secret handling | ☑ | Messages echo non-sensitive config values only. No issues found. |
| 6 | Performance & resource management | ☑ | Startup-only. No issues found. |
| 7 | Spec & shared-contract adherence | ☑ | `PortValue` and `HostPort` wording is now consistent and pinned by `ChecksWordingTests`. No issues found. |
| 8 | Packaging, dependencies & project layout | ☑ | `PackageReadmeFile` plus the packed README; XML docs enabled; repository URLs corrected. No issues found. |
| 9 | Testing coverage | ☑ | 42 tests, including double-registration via a built `ServiceProvider`, null guards and exact wording. No issues found. |
| 10 | Documentation & XML docs | ☑ | `PortValue` XML doc matches the strict-parse behaviour. No issues found. |
<details><summary>2026-06-01 baseline checklist (<code>5f75cd4</code>)</summary>
| # | Category | Examined | Notes |
|---|----------|----------|-------|
| 1 | Correctness & logic bugs | ☑ | Accumulation never short-circuits; port/host:port/duration/min-count boundaries correct. Port parsing over-permissive (003). |
@@ -50,6 +84,8 @@ is solid for the happy and primary-failure paths; a few edge cases noted below a
| 9 | Testing coverage | ☑ | 27 tests cover the four public surfaces + accumulation + byte-format. Untested: `AddValidatedOptions` null guards, double-registration, exact wording strings. |
| 10 | Documentation & XML docs | ☑ | Public XML docs present and accurate on every type/member. Not emitted into the nupkg (004). |
</details>
## Findings
### Configuration-001 — `AddValidatedOptions` uses `AddSingleton`, so a double call registers (and runs) the validator twice