feat(config): add schema validation pre-restart gate — D4 (#202)#30
Merged
feat(config): add schema validation pre-restart gate — D4 (#202)#30
Conversation
…restart gate (openclaw#202) - Validates JSON/JSON5 syntax is valid (guards against malformed config) - Validates gateway section exists (KI-048) - Validates agents.defaults.model.primary is non-empty string (KI-050) - Validates top-level models is not null and has valid providers (KI-052, KI-047) - Exit 0 = valid, non-zero = invalid with clear error message identifying which check failed - Used as pre-restart gate in deploy and hotfix workflows Refs Piboonsak/Openclaw#202
5 tasks
23 tasks
5 tasks
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
Adds
scripts/validate-config.sh— a config schema validation gate that runs BEFORE any container restart in deploy/hotfix workflows. Prevents container crash loops from invalid config.KI Gate: Matched KI-047, KI-048, KI-050, KI-052
.models = nullcrashes containerFAIL [models]: top-level models is explicitly nullgatewaysection causes crashFAIL [gateway]: gateway section is missingagents.defaults.modelcrashes on startFAIL [agents.defaults.model.primary]: missing or empty.modelscauses restart loopChanges
scripts/validate-config.sh(NEW)gatewaysection exists (KI-048)agents.defaults.model.primaryis a non-empty string (KI-050)modelsis not null and has valid provider entries (KI-052, KI-047)100755)Workflow Integration (in
Piboonsak/Openclaw)Validation step added BEFORE restart in:
deploy-openclaw-github-private-secrets.yml— beforedocker compose restartdeploy-hotfix-openclaw-github-private-secrets.yml— beforedocker compose up -d --force-recreateStep pattern:
Acceptance Criteria
models=null, missinggateway, missingagents.defaults.modelUsage
Refs Piboonsak/Openclaw#202
Sprint: 2.5 D4