feat(config): add schema-based configuration validator with field error reporting (#694) - #744
Open
ravendevhub wants to merge 1 commit into
Open
Conversation
…or reporting (Core-Foundry#694) - Define explicit types, enums, and bounds for application configuration - Validate required fields (CONTRACT_ADDRESSES), enums (STELLAR_NETWORK, LOG_LEVEL), and numeric bounds - Aggregate validation errors pinpointing exact offending fields - Add test suite in schema-validator.test.ts and docs in docs/CONFIGURATION_SCHEMA_VALIDATION.md
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.
Summary
Resolves #694 by implementing a deterministic, schema-based configuration validation engine (
listener/src/config/schema-validator.ts) that enforces explicit types, bounds, and enums on environment configurations while aggregating violations and identifying the exact affected field.Changes
listener/src/config/schema-validator.ts):CONTRACT_ADDRESSES), network enums (STELLAR_NETWORK), log levels (LOG_LEVEL), and numeric ranges (POLL_INTERVAL_MS,PORT).ConfigSchemaValidationErrorpinpoints exact offending field paths and reasons.listener/src/config/schema-validator.test.ts):docs/CONFIGURATION_SCHEMA_VALIDATION.md):Acceptance Criteria