Skip to content

fix(cli): preserve config dry-run error and batch contracts - #116833

Merged
steipete merged 1 commit into
mainfrom
codex/auto-qa-cli-config-json-errors
Jul 31, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/auto-qa-cli-config-json-errors

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • Fix dry-run machine-output failures at the existing config mutation error owner. Ordinary parse and mode errors from config set, config unset, and config patch now emit one complete documented JSON result while retaining actionable stderr and exit status 1. Existing structured validation errors remain unchanged.
  • Reject empty inline and file-backed mutation batches at their canonical parser before configuration loading or writing. This prevents zero-operation rewrites, JSON5-comment loss, metadata churn, and misleading gateway restart hints; valid batches and the exact 8 MiB file boundary remain supported.

Root causes fixed

2 distinct canonical-owner defects: missing JSON error visibility and zero-operation config writes.

Verification

  • Exact candidate: a8f7d37c2203e657f929a9382ef1bb6abd420d94 on codex/auto-qa-cli-config-json-errors.
  • Focused parser regressions: 4 Vitest tests passed, covering valid inline operations, rejected empty inline batches, rejected empty files, and accepted nonempty files at exactly 8 MiB.
  • Real public handlers: malformed/empty runConfigSet, invalid-path runConfigUnset, and missing-file runConfigPatch each produced exactly one structured stdout JSON result, actionable stderr, and exit status 1.
  • Real operator-file proof: an empty batch preserved a commented JSON5 configuration byte-for-byte, preserved its modification time, and emitted no restart/success message.
  • Existing ConfigSetDryRunValidationError compatibility proof: original JSON payload retained verbatim, exit status 1 retained, and no new stderr output introduced.
  • Genuine TruffleHog-backed gpt-5.6-sol autoreview: clean.
  • Separate strict read-only config-owner reviewer: PASS after inspecting changed owners, set/unset/patch callers, neighboring validation behavior, documented JSON contract, bounded file reads, and the exact-size acceptance boundary.
  • No config schema changes, new flags, migrations, setup changes, fetch, push, or changes to canonical main.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Jul 31, 2026
@steipete
steipete merged commit c50a611 into main Jul 31, 2026
121 of 125 checks passed
@steipete
steipete deleted the codex/auto-qa-cli-config-json-errors branch July 31, 2026 12:44
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant