Summary
Add one stable top-level numeric field to openclaw code run --json named changedFileCount.
Problem to solve
Downstream tooling can already read changedFiles, but simple consumers should not need the full array just to branch on how many files changed.
Proposed solution
Update src/commands/openclawcode.ts so the JSON output includes changedFileCount: number | null.
- Use run.buildResult?.changedFiles.length ?? null
- Keep existing changedFiles unchanged
Add or adjust unit tests in src/commands/openclawcode.test.ts to cover both populated and missing-build-result cases.
Impact
Affected users/systems/channels
Tools and scripts that read openclaw code run --json.
Severity
Low.
Frequency
Whenever downstream tooling wants a compact file-count signal.
Consequence
Without the derived count, simple consumers keep deriving it themselves.
Summary
Add one stable top-level numeric field to openclaw code run --json named changedFileCount.
Problem to solve
Downstream tooling can already read changedFiles, but simple consumers should not need the full array just to branch on how many files changed.
Proposed solution
Update src/commands/openclawcode.ts so the JSON output includes changedFileCount: number | null.
Add or adjust unit tests in src/commands/openclawcode.test.ts to cover both populated and missing-build-result cases.
Impact
Affected users/systems/channels
Tools and scripts that read openclaw code run --json.
Severity
Low.
Frequency
Whenever downstream tooling wants a compact file-count signal.
Consequence
Without the derived count, simple consumers keep deriving it themselves.