Add local config override support and full environment hierarchy to EnvironmentConfiguration#261
Merged
michaelbeale-IL merged 2 commits intoFeb 23, 2026
Conversation
…or all environments Co-authored-by: michaelbeale-IL <63321611+michaelbeale-IL@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for environment-specific configuration files
Add local config override support and full environment hierarchy to EnvironmentConfiguration
Feb 23, 2026
michaelbeale-IL
approved these changes
Feb 23, 2026
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.
EnvironmentConfigurationhad environment detection and single-file resolution but was missing the third tier of the config hierarchy (config.local.json) and a way to retrieve the full ordered file list for layered loading.Changes
EnvironmentConfiguration/IConfigurationManagerGetLocalOverrideFilePath(baseFilePath)— derives the.local.jsonpath (e.g.config.local.json) unconditionally; callers decide whether to act on its existenceGetConfigurationFiles(baseFilePath)— returns an orderedIReadOnlyList<string>of existing files representing the full hierarchy (base → env-specific → local); usesPath.GetFullPath+ case-insensitive comparison to prevent duplicates when paths alias the same fileTest coverage
Added 14 tests to
ConfigurationEnhancementsTests:Development,Testing,Staging,Production) viaACAT_ENVIRONMENTACAT_ENVIRONMENT→DOTNET_ENVIRONMENT→ASPNETCORE_ENVIRONMENTGetLocalOverrideFilePath(valid path, null input)GetConfigurationFilesacross all hierarchy combinations (base-only, base+env, all three layers, base+local)Housekeeping
.gitignore— added*.local.jsonso developer override files are never accidentally committedREADME.md/CONFIGURATION_ENHANCEMENT_GUIDE.md— documented the four-level hierarchy and local override workflowUsage
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.