Skip to content

feat(config): add local config validation script [Sprint 2.5 D5] #37

@Piboonsak

Description

@Piboonsak

Sprint 2.5 — D5: Local Validation Script

Branch: feat/sprint-2.5-d5-local-validation
Base: main
Depends on: D4 ✅ (scripts/validate-config.sh merged via PR #30)

Task

Create a standalone local validation script that can be run without GitHub Actions context.

Files to create in Piboonsak/openclaw_github:

  1. scripts/validate-config-local.sh (NEW)
    • Accept config file path as argument (default: openclaw.prod.json5)
    • Run same checks as scripts/validate-config.sh (D4):
      • models is not null and has at least one entry
      • gateway section exists with required fields
      • agents.defaults.model exists and is a valid string
      • JSON/JSON5 syntax is valid
    • Output: clear ✅ PASS or ❌ FAIL with specific error details
    • Exit 0 on valid, non-zero on invalid
    • Works without GitHub Actions context

Usage example:

bash scripts/validate-config-local.sh openclaw.prod.json5
# Output: ✅ Config valid  OR  ❌ Config invalid: models is null

Acceptance Criteria

  • Script exits 0 on valid config, non-zero on invalid
  • Catches: null models, missing gateway, missing agents.defaults.model, invalid JSON5
  • Works standalone without GitHub Actions
  • Clear human-readable output
  • Passes on current openclaw.prod.json5

Commit Message

feat(config): add local config validation script (#202)

Reference

Labels

  • sprint-2.5
  • copilot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions