Fix module config overlay clobbering operator overrides#623
Open
pruuk wants to merge 1 commit into
Open
Conversation
Two related bugs in the module config write/merge path: 1. AddOverlayOverrides applied only a module's NEW overlay keys via OverlayOverrides. Because Config.Modules is a plain map, unmarshaling that partial Modules block replaced the inner Modules[<name>] map wholesale, silently discarding every operator-set value for that module (config-overrides.yaml itself was untouched, so it re-broke on every boot). Triggered whenever a module upgrade ships a config key the operator's partial Modules block lacks. Now the full (flattened) override set is overlaid, matching SetVal's proven merge behavior, so operator values survive while new keys still get their overlay defaults. 2. PluginConfig.Set discarded the error from configs.SetVal, so failed module config writes (invalid property name, file write errors) gave no signal anywhere. The error is now logged with the plugin and key name. (Returning the error would be stronger but changes the method signature, breaking out-of-tree modules; left as a follow-up option.) Adds a regression test covering the partial-Modules-block boot sequence. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upstream PR kit 2 — module config overlay clobber + silent Set failures
Branch
fix/module-config-overlay-clobberis already pushed toGoMudEngine/GoMud. Open the PR here:
master...fix/module-config-overlay-clobber
PR title
PR body (matches the repo's PR template: Description + Changes)