Repository navigation
fix: report validated server options in server info - #2839
Conversation
Code review findingsThe diff is identical on #2839 and #2840. The new
🤖 Generated with Claude Code |
Re-review of 67d6885 (#2839) / e95550f (#2840)The two diffs are identical. The
🤖 Generated with Claude Code |
Re-review of 7f47636 (#2839) / 286229e (#2840)The source is identical on both heads (only
🤖 Generated with Claude Code |
Re-review of e5b8193 (#2839) / bcd0704 (#2840)The
The altitude point (comparing two reads instead of making a single read) is left as is, which is a reasonable trade-off. One remaining nit:
🤖 Generated with Claude Code |
|
Re-review of 3024be6 (#2839) / 4c2e053 (#2840)No new findings. The warning-order nit is fixed: The 🤖 Generated with Claude Code |



Server info retained raw invalid server options after startup applied runtime defaults. Validate ServerConfig fields on initial load and cache-clear/reload, then register corrections while preserving absent keys, valid raw representations, masking and non-decrypted credentials.
Capture every ServerOption's presence and input value. Compare all options against the later raw read, distinguish value changes from missing/added keys, and retain the later raw value or absence on disagreement. Apply a correction only to matching inputs. Decryption failures have their own diagnostic with the option name and exception type, without exception messages, causes, plaintext or ciphertext; they are not classified as source changes.
Use one construction/validation helper. The canonical branch owns invalid-option warnings, so validation takes no warnInvalid flag and performs no duplicate canonical-name check. Named test loads and blank defaults do not emit those warnings. Validation state is local to loading. A LinkedHashMap preserves ServerOption declaration order for diagnostics, independently of source key order.
Sixteen registry regressions cover reloads, both source-change directions, removed/added keys, missing sources, encrypted credentials/options, typed Integer/Long/Boolean inputs, corrupt ciphertext, mismatched keys, raw key/value preservation, read counts and warning policy. Source-change tests preserve the original cached map and edit the simulated source for subsequent reads.
The independent reads remain an open architectural follow-up. Config exposes separate decrypted-cache and non-decrypted loader APIs, including custom-loader and injected-value contracts. A consistent paired-snapshot API belongs in that layer; these PRs retain the existing contract and do not claim atomic snapshots.
Validation:
mvn -pl server-config -am testpassed on the current revision, including all 23 server-config tests and prerequisite suites. The warning-order regression fails with HashMap and passes with LinkedHashMap. The full server reactor previously passed at e5b8193; this ordering-only follow-up reran the changed module and prerequisites.Closes #2838.