fix(config): resolve components in config dump output - #337
Open
Nan Liu (liunan-ms) wants to merge 1 commit into
Open
fix(config): resolve components in config dump output#337Nan Liu (liunan-ms) wants to merge 1 commit into
Nan Liu (liunan-ms) wants to merge 1 commit into
Conversation
`azldev config dump` now resolves each component before serializing, so the output includes inherited defaults and overlays expanded from `overlay-files`. Runtime-only lock and rendered-spec-dir state are excluded. The dump retains the default configuration blocks alongside resolved component entries, so it is an inspection snapshot and is not intended to be reloaded as project configuration. Fixes #264
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The resolver-based dump behavior matches the documented intent, avoids mutating loaded config, and is covered by targeted unit tests for the new resolution semantics.
Pull request overview
This PR updates azldev config dump to emit a resolved (post-component-resolver) configuration snapshot rather than the pre-resolver, file-merge view. This makes the command accurately reflect inherited default-component-config values and per-file overlay expansion (overlay-files), aligning the dump output with what build/render workflows actually use.
Changes:
- Resolve all components via the component resolver before dumping, including spec-discovered components, and serialize the resolved view.
- Strip resolver/runtime-only fields (
Locked,RenderedSpecDir) from dumped component entries to avoid leaking runtime state. - Update command help and docs to clarify the output is an inspection snapshot (not intended to be reloaded), and fix examples to use
-f json.
File summaries
| File | Description |
|---|---|
| internal/app/azldev/cmds/config/dump.go | Switches dump output to a resolver-based “effective config” snapshot and strips runtime-only fields before serialization. |
| internal/app/azldev/cmds/config/dump_test.go | Adds unit tests for resolved defaults/overlays, runtime-field exclusion, immutability, and spec-discovered components. |
| docs/user/reference/config/config-file.md | Updates guidance and corrects the config dump JSON flag usage (-f json) while clarifying snapshot semantics. |
| docs/user/reference/cli/azldev_config_dump.md | Regenerates CLI docs to match updated help text describing resolved snapshot output. |
| docs/user/explanation/repos.md | Removes the round-trippability claim and fixes config dump example flag usage. |
| docs/user/explanation/config-system.md | Clarifies that config dump includes component inheritance + overlay-file expansion and is not reloadable configuration. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Nan Liu (liunan-ms)
marked this pull request as ready for review
September 3, 2026 18:57
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.
Summary
azldev config dumppreviously serialized the file-level merged config, so per-file overlays (overlay-files) and inheriteddefault-component-configwere invisible even though builds honor them (issue #264).This change resolves each component through the resolver before serialization:
overlay-files.Locked,RenderedSpecDir) is stripped so it doesn't leak into the JSON dump.The dump retains the
default-component-configblocks alongside the resolved component entries, so it is an inspection snapshot and is not intended to be reloaded as project configuration (this is called out in the updated help and docs).Docs
config-system.md,config-file.md, andrepos.mdto describe the resolved snapshot and drop the round-trippability claim.-O json→-f jsonin examples (config dumpuses its own-f/--formatflag;-Onever controlled its output).azldev_config_dump.mdviamage docs.Testing
mage all(unit + scenario + checks) passes.Fixes #264