Files
NianToB/tests
Cursor Agent 75351a9a2d fix(gateway): add pre-sanitize + move Python check outside retry loop
Hybrid config repair approach:

1. Pre-sanitize: Add sanitizeOpenClawConfig() using a conservative
   blocklist approach to remove known-invalid keys (e.g. skills.enabled
   at root level) BEFORE starting the Gateway. Uses blocklist instead
   of allowlist for forward-compatibility — new valid keys added by
   future OpenClaw versions are never stripped.

2. Reactive fallback: The existing doctor auto-repair mechanism catches
   any OTHER config validation errors, runs openclaw doctor --fix, and
   retries once.

3. Move Python readiness check outside the while loop since it's
   fire-and-forget and only needs to run once per start() call.

Also adds comprehensive unit tests for the sanitization logic.

Co-authored-by: Haze <hazeone@users.noreply.github.com>
2026-03-01 06:17:31 +00:00
..