Extract base config schema to eliminate duplication across nodes #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Every node duplicates the same general/logging/asset config structure in both JSON defaults and _loadConfig() methods. 6 nodes have JSON configs, 2 (reactor/settler) build configs manually.
Solution
Create a base config schema that all nodes inherit from. Each node only defines its domain-specific fields.
Files affected
Acceptance criteria
Completed
Changes
baseConfig.json- Shared schema defining general/logging/functionality/asset sectionsConfigManager.buildConfig(nodeName, uiConfig, nodeId, domainConfig)- New method that builds runtime config from UI inputs + domain-specific overridesBefore (each node ~25 lines of duplicated config construction)
After (1-3 lines per node)
Test results