Skip to content

Add config.provider module for centralized application configuration#209

Merged
intel352 merged 4 commits intomainfrom
copilot/add-application-configuration-module
Feb 28, 2026
Merged

Add config.provider module for centralized application configuration#209
intel352 merged 4 commits intomainfrom
copilot/add-application-configuration-module

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

  • Create module/config_provider.go — ConfigRegistry + ConfigProviderModule + schema/source/expansion utilities
  • Create module/config_provider_test.go — unit tests including single-quote regex and sorted missing-keys tests
  • Create plugins/configprovider/plugin.go — Plugin with ConfigTransformHook
  • Create plugins/configprovider/plugin_test.go — plugin integration tests
  • Update plugins/all/all.go, schema/schema.go, schema/module_schema.go, cmd/wfctl/type_registry.go, module/pipeline_template.go
  • Fix regex to support both single and double quotes for {{config 'key'}} / {{config "key"}}
  • Fix ValidateRequired to sort missing keys for deterministic error messages
  • Fix Init doc comment (was incorrectly labelled "Configure")
  • Fix misleading file-level package comment

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits February 28, 2026 03:02
…v sources, and {{config "key"}} template function

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Add application configuration module for better management Add config.provider module for centralized application configuration Feb 28, 2026
@intel352 intel352 marked this pull request as ready for review February 28, 2026 03:36
Copilot AI review requested due to automatic review settings February 28, 2026 03:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a config.provider module type that acts as a centralized configuration registry for workflow engine applications. It addresses the lack of schema declaration, startup validation, defaults, source layering, and sensitive-value distinction in the existing ${ENV_VAR} expansion mechanism. The config.provider module exposes a {{config "key"}} template function for referencing values across any YAML section (modules, workflows, triggers, pipelines, platform), and operates independently of (and alongside) the existing ${ENV_VAR} expansion.

Changes:

  • Adds module/config_provider.go: thread-safe ConfigRegistry, ParseSchema, LoadConfigSources, ValidateRequired, ExpandConfigRefsMap, and the ConfigProviderModule struct
  • Adds plugins/configprovider/plugin.go and its tests: a ConfigTransformHook at priority 1000 that resolves {{config "key"}} references before module construction
  • Registers config.provider across schema, type registry, and the default plugin set

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
module/config_provider.go Core implementation: registry, schema parsing, source loading, validation, expansion
module/config_provider_test.go Comprehensive unit tests for all core functions
plugins/configprovider/plugin.go Plugin wiring: module factory + ConfigTransformHook
plugins/configprovider/plugin_test.go Tests for plugin metadata, hook behaviour, expansion
module/pipeline_template.go Adds config function to template func map for runtime use
schema/schema.go Adds "config.provider" to coreModuleTypes
schema/module_schema.go Registers config.provider schema with field definitions
plugins/all/all.go Adds configprovider plugin to the default plugin set
cmd/wfctl/type_registry.go Registers config.provider in the wfctl type registry

@intel352
Copy link
Contributor

@copilot apply changes based on the comments in this thread

…ix doc comments

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
@intel352 intel352 merged commit 3eb2876 into main Feb 28, 2026
14 checks passed
@intel352 intel352 deleted the copilot/add-application-configuration-module branch February 28, 2026 05:08
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.

3 participants