Skip to content

feat(config): add config dump/logging with WithSummary option - #5

Merged
h-dav merged 1 commit into
mainfrom
add-config-dump-diagnostics
May 3, 2026
Merged

feat(config): add config dump/logging with WithSummary option#5
h-dav merged 1 commit into
mainfrom
add-config-dump-diagnostics

Conversation

@h-dav

@h-dav h-dav commented May 3, 2026

Copy link
Copy Markdown
Owner

Adds opt-in provenance tracking for configuration resolution, exposing what was loaded and from which source. Users can now inspect LoadSummary to debug config issues and understand source precedence.

New public types:

  • LoadEntry: describes a resolved config field and its source
  • LoadSummary: collection of LoadEntry records

New option:

  • WithSummary(&summary): populates summary with provenance info

New source interface method:

  • Name() string: returns "env", "flag", or file path

Implementation tracks per-key provenance during merge and appends LoadEntry records when fields are populated from sources or defaults. Includes 11 comprehensive test cases covering all source types, precedence, nested structs, and variable substitution.

Adds opt-in provenance tracking for configuration resolution, exposing
what was loaded and from which source. Users can now inspect LoadSummary
to debug config issues and understand source precedence.

New public types:
- LoadEntry: describes a resolved config field and its source
- LoadSummary: collection of LoadEntry records

New option:
- WithSummary(&summary): populates summary with provenance info

New source interface method:
- Name() string: returns "env", "flag", or file path

Implementation tracks per-key provenance during merge and appends
LoadEntry records when fields are populated from sources or defaults.
Includes 11 comprehensive test cases covering all source types, precedence,
nested structs, and variable substitution.
@h-dav
h-dav force-pushed the add-config-dump-diagnostics branch from abc87c5 to 9442e00 Compare May 3, 2026 15:29
@h-dav
h-dav merged commit 9c3e5a1 into main May 3, 2026
4 checks passed
@h-dav
h-dav deleted the add-config-dump-diagnostics branch May 3, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant