Skip to content

feat(config): resolveConfig + typed layer ingest adapters#23391

Open
spypsy wants to merge 14 commits into
spy/use-composeConfigMappingsfrom
spy/resolve-config
Open

feat(config): resolveConfig + typed layer ingest adapters#23391
spypsy wants to merge 14 commits into
spy/use-composeConfigMappingsfrom
spy/resolve-config

Conversation

@spypsy
Copy link
Copy Markdown
Member

@spypsy spypsy commented May 19, 2026

Summary

Implements the unified resolution pipeline on top of composeConfigMappings:

  • resolveConfig(mappings, layers) — merges per-key layer values by priority (CLI → ENV → NETWORK → DEFAULT) and returns a ResolvedConfig<T> carrying provenance for every key.
  • envToTyped(mappings, env?) — reads env vars (including fallback and deprecatedFallback) and returns only the keys actually set. getConfigFromMappings now delegates to it.
  • cliToTyped(mappings, opts, namespace?) — extracts typed values from a Commander opts object. Namespace param disambiguates real per-component cases (bot/pxe nodeUrl); composeConfigMappings handles in-component dedup.
  • networkConfigToTyped(mappings, networkConfig) — peer adapter for the NETWORK layer. No env-string round-trip: passes native-typed fields through unchanged and dispatches mapping.parseEnv for string-typed fields that consumers expect structured (e.g. txPublicSetupAllowListExtend → AllowedElement[] via parseAllowList, which lives in @aztec/p2p — foundation never imports it directly).
  • findUniversalConfigKeys(...componentMappings) — detects which keys are auto-promotable to top-level CLI flags via mapping-object reference equality. Used by A-1067 to replace the manual universalOptions list.

Fixes A-989 and A-990.

@spypsy spypsy force-pushed the spy/resolve-config branch from f34df15 to 1a57134 Compare May 19, 2026 10:26
@spypsy spypsy marked this pull request as ready for review May 19, 2026 10:27
@AztecBot
Copy link
Copy Markdown
Collaborator

AztecBot commented May 19, 2026

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/f8cc0bb12b5920da�f8cc0bb12b5920da8;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_p2p/sentinel_status_slash.parallel.test.ts "slashes the proposer with INACTIVITY when checkpoint validation records invalid" (203s) (code: 0) group:e2e-p2p-epoch-flakes

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.

2 participants