fix(config): render validation array indices with brackets#104935
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 7:34 PM ET / 23:34 UTC. Summary PR surface: Source +8, Tests +1. Total +9 across 2 files. Reproducibility: yes. from source: direct identity-avatar validation issues retain only a dotted string on current main, so a failing Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep typed segments as internal display metadata, preserve dotted machine-readable paths, and merge this focused producer repair once exact-head invalid-avatar behavior and the current check result are verified. Do we have a high-confidence way to reproduce the issue? Yes from source: direct identity-avatar validation issues retain only a dotted string on current main, so a failing Is this the best way to solve the issue? Yes for the remaining edge: attach typed segments at the producer while retaining the existing dotted path, rather than changing the shared validation, JSON, gateway, or daemon contract. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 748fc044192a. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +8, Tests +1. Total +9 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (18 earlier review cycles; latest 8 shown)
|
9a200e3 to
24a4cfb
Compare
5fc577f to
77bc0b1
Compare
|
Added the requested real behavior proof to the PR body. Captured on current PR head node scripts/run-node.mjs config validate
node scripts/run-node.mjs config validate --jsonBoth normal and JSON outputs now show bracketed array paths such as @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Updated the PR body again using UTF-8 without a leading BOM/zero-width marker so the proof parser can read the The body still includes the requested current-head real behavior proof for both: node scripts/run-node.mjs config validate
node scripts/run-node.mjs config validate --json@clawsweeper re-review |
|
Cleaned the PR branch on top of latest upstream/main and removed the merge commit. The PR now has the same six config-validation files, with the three intended commits replayed onto $cleanHead. The PR body has also been updated to keep the current-head real behavior proof marker in sync. @clawsweeper re-review |
|
A/B verified locally against base SHA. Ran vitest with the PR's test file against the PR's fix (B) and against the base's fix (A). Result: CLEAN A/B The new test |
df57b0f to
888c142
Compare
0d924b8 to
6379f51
Compare
|
🦞👀 Command router queued. I will update this comment with the next step. |
a6cb36e to
8f26d7e
Compare
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: VectorPeak <[email protected]>
8f26d7e to
89cd13e
Compare
|
Maintainer rewrite complete. The stale competing formatter/CLI path is gone. Manual identity-avatar issues now preserve typed array segments through the existing Proof:
|
|
Merged via squash.
|
…104935) * fix(config): format validation indexes at display boundary Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> * fix(config): preserve identity avatar issue paths Co-authored-by: VectorPeak <[email protected]> --------- Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: Peter Steinberger <[email protected]>
Related: #104854
What Problem This Solves
Fixes an issue where users reading
openclaw config validateoutput would see array indexes as dotted object properties, for exampleagents.list.0.tools.profileinstead ofagents.list[0].tools.profile.This is limited to human-facing validation output. It does not add line numbers or rejected-value rendering.
Why This Change Was Made
ConfigValidationIssue.pathis a machine-readable dot path used by JSON, gateway, daemon, and other shared consumers. This revision keeps that contract unchanged and applies bracket notation only while formatting terminal issue lines.The formatter traverses the include/env-resolved
snapshot.sourceConfig, so it brackets a numeric segment only when its actual parent is an array. Numeric object keys such asdiagnostics.otel.headers.0remain dotted. No validation producer, protocol field, or persisted config shape changes.User Impact
Human CLI output distinguishes arrays from object properties:
Machine output remains compatible:
{ "path": "agents.list.0.tools.exec.commandHighlighting" }Evidence
Current-head live proof used a root config that
$included the invalidagents.listentry and also contained the numeric object keydiagnostics.otel.headers.0.{ "valid": false, "issues": [ { "path": "diagnostics.otel.headers.0", "message": "Invalid input: expected string, received boolean" }, { "path": "agents.list.0.tools.exec.commandHighlighting", "message": "Invalid input: expected boolean, received string (allowed: true, false)", "allowedValues": ["true", "false"] } ] }Focused coverage on head
8f26d7e72c7:node scripts/run-vitest.mjs run src/config/issue-format.test.ts src/cli/config-cli.test.ts- 2 files passed, 136 tests passedoxfmton the touched files - passedsrc/cli/config-cli.test.tserrorsgit diff --check upstream/main..HEAD- passedTests cover invalid issues, valid warnings,
$include-resolved arrays, binding-union paths, manual issues, numeric object keys, absent display context, and unchanged--jsonpaths.Possible call chain / impact
Unaffected surfaces include
ConfigValidationIssue.path, JSON and gateway responses, daemon/status summaries, config get/set path syntax, validation producers, and numeric record keys.