Repository navigation
fix(cli): report config read failures without repair advice - #158671
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. Reviewed September 26, 2026, 1:34 AM ET / 05:34 UTC. ClawSweeper reviewWhat this changesThe branch makes CLI configuration errors distinguish unreadable files and includes from invalid input, while preserving repair guidance for invalid JSON and schema errors. Merge readiness⛔ Needs changes before merge - 2 items remain This PR remains useful. The merged update fix distinguishes read failures in update reporting, but current main still labels those failures as invalid configuration in CLI readiness and validation. The proposed CLI change is focused; the new test suite’s required cost disclosure remains outstanding. Priority: P2 Review scores
Verification
How this fits togetherCLI commands and the updater consume a configuration snapshot produced by the config reader. They use its failure classification to decide what to display and whether a command may continue. flowchart LR
A[CLI or update command] --> B[Configuration snapshot reader]
B --> C{Failure type}
C -->|Read failure| D[Read error and retry guidance]
C -->|Invalid input| E[Validation and Doctor guidance]
D --> F[Command admission or exit]
E --> F
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +38, Tests +108. Total +146 across 7 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the snapshot reader as the classification owner and use its result across CLI outputs, preserving command admission and Doctor guidance for genuinely invalid input. Do we have a high-confidence way to reproduce the issue? Yes. On current main, a missing include receives the reader’s read-failure code while CLI readiness still prints an invalid-config heading; this review established the path from source without executing it. Is this the best way to solve the issue? Yes. Sharing the existing snapshot classification across the affected CLI consumers is a narrow repair that leaves invalid-input handling and updater admission intact. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 63f1dec2b57e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Addressed the test-cost disclosure in the PR Evidence section. On published head All required CI, production types, and test types passed. No product or test source changed in response to this disclosure request. |
|
Merged via squash.
|
* commit '66b812f26e725cd709e08860d2cb46ba496cd308': (70 commits) fix(gateway): preserve typed boxed-number coercion chore(ui): refresh control ui locales (#158689) fix(gateway): reset staged headers on authority errors (#158669) fix(workers): keep inbound staging stable during quota scans fix: preserve Telegram delivery after bot identity changes (#158612) fix(ui): keep automation starter prompts out of startup (#158482) fix(cli): distinguish configuration read failures from invalid input (#158671) test: remove retired progress coercion suppression allowance refactor(gateway): schedule worker placement maintenance (#158662) fix(daemon): keep native service checks within their timeout (#154565) fix(test): restore gateway steering fixture contracts (#158478) fix(acpx): use SDK filesystem publication boundary fix(agentsapi): load OpenClaw persona and workspace context (#158328) fix(gateway): drop progress snapshot coercion suppression fix(qa): accept native Codex truncation in cache evidence (#158454) fix(gateway): keep chat subscriptions stable during unrelated approvals (#158633) perf(gateway): release event payloads from live text guards (#158643) perf(sessions): reduce stalls when saving large chat messages (#158402) fix(qa): reject history-bearing utility requests without session affinity (#158496) test: allow intentional progress snapshot coercion ...
* fix(test): verify followup completion ordering Exercise the real presentation settlement helper with asynchronous cleanup, preserve continuation and admission semantics, and unconditionally release and join the held work. Remote proof covers the strengthened ordering contract and both missing-await faults. * fix(test): verify followup completion ordering * chore: retain followup test branch ancestry The current-main reconstruction preserves the original reviewed scope and supersedes its stale base. Keep the remotely qualified candidate tree unchanged while retaining the original PR ancestry for a non-force branch update. * commit 'ff35145de21cf6296bec05e86bee37b5ed53bcb8': fix(test): verify followup completion ordering * test(auto-reply): signal queued presentation entry * chore: refresh followup test on boundary fix * commit '66b812f26e725cd709e08860d2cb46ba496cd308': (70 commits) fix(gateway): preserve typed boxed-number coercion chore(ui): refresh control ui locales (#158689) fix(gateway): reset staged headers on authority errors (#158669) fix(workers): keep inbound staging stable during quota scans fix: preserve Telegram delivery after bot identity changes (#158612) fix(ui): keep automation starter prompts out of startup (#158482) fix(cli): distinguish configuration read failures from invalid input (#158671) test: remove retired progress coercion suppression allowance refactor(gateway): schedule worker placement maintenance (#158662) fix(daemon): keep native service checks within their timeout (#154565) fix(test): restore gateway steering fixture contracts (#158478) fix(acpx): use SDK filesystem publication boundary fix(agentsapi): load OpenClaw persona and workspace context (#158328) fix(gateway): drop progress snapshot coercion suppression fix(qa): accept native Codex truncation in cache evidence (#158454) fix(gateway): keep chat subscriptions stable during unrelated approvals (#158633) perf(gateway): release event payloads from live text guards (#158643) perf(sessions): reduce stalls when saving large chat messages (#158402) fix(qa): reject history-bearing utility requests without session affinity (#158496) test: allow intentional progress snapshot coercion ... Co-authored-by: Vincent Koc <[email protected]>
* fix(test): verify followup completion ordering Exercise the real presentation settlement helper with asynchronous cleanup, preserve continuation and admission semantics, and unconditionally release and join the held work. Remote proof covers the strengthened ordering contract and both missing-await faults. * fix(test): verify followup completion ordering * chore: retain followup test branch ancestry The current-main reconstruction preserves the original reviewed scope and supersedes its stale base. Keep the remotely qualified candidate tree unchanged while retaining the original PR ancestry for a non-force branch update. * commit 'ff35145de21cf6296bec05e86bee37b5ed53bcb8': fix(test): verify followup completion ordering * test(auto-reply): signal queued presentation entry * chore: refresh followup test on boundary fix * commit '622be54be3ffe0fce27d6a4b147c76d4b19c528c': (70 commits) fix(gateway): preserve typed boxed-number coercion chore(ui): refresh control ui locales (openclaw#158689) fix(gateway): reset staged headers on authority errors (openclaw#158669) fix(workers): keep inbound staging stable during quota scans fix: preserve Telegram delivery after bot identity changes (openclaw#158612) fix(ui): keep automation starter prompts out of startup (openclaw#158482) fix(cli): distinguish configuration read failures from invalid input (openclaw#158671) test: remove retired progress coercion suppression allowance refactor(gateway): schedule worker placement maintenance (openclaw#158662) fix(daemon): keep native service checks within their timeout (openclaw#154565) fix(test): restore gateway steering fixture contracts (openclaw#158478) fix(acpx): use SDK filesystem publication boundary fix(agentsapi): load OpenClaw persona and workspace context (openclaw#158328) fix(gateway): drop progress snapshot coercion suppression fix(qa): accept native Codex truncation in cache evidence (openclaw#158454) fix(gateway): keep chat subscriptions stable during unrelated approvals (openclaw#158633) perf(gateway): release event payloads from live text guards (openclaw#158643) perf(sessions): reduce stalls when saving large chat messages (openclaw#158402) fix(qa): reject history-bearing utility requests without session affinity (openclaw#158496) test: allow intentional progress snapshot coercion ... Co-authored-by: Vincent Koc <[email protected]>
Related: #158455
What Problem This Solves
Fixes misleading invalid-config errors and
doctor --fixadvice when the CLI cannot read configuration or its backing metadata.User Impact
Operators see the read failure and its original cause without being prompted to modify a configuration that has not been shown to be invalid. Invalid JSON and schema errors retain their existing diagnosis and repair guidance.
Why This Change Was Made
The snapshot loader already distinguishes read failures, but CLI readiness and validation discarded that distinction. Share the existing classification across those consumers and the updater while preserving command admission and exit behavior.
This does not relax SQLite snapshot consistency checks or solve starvation during continuous checkpoints. Those failures must remain visible and retryable without suggesting a configuration repair.
Evidence
CONFIG_READ_FAILEDwith unchanged config bytes. Readiness now preserves that classification and omits mutating repair advice.pnpm test src/cli/config-read-failure.test.ts --maxWorkers=1passed 7/7 in 70.388 s cold command wall time, with reported case durations totaling 1.234 s. The cold run spent 83% of Vitest time transforming modules; it exercises real config readers and readiness/validation entrypoints so a mocked snapshot cannot bypass the regression. In CI job 108345868548, all seven cases passed with reported durations totaling 0.276 s. The shared multi-file job took 272 s overall, not attributable to this one file.884f8b6.Red, deployed
50df80460acb5bb44f77431e92e8347e72df3a5e:https://91b59577e757131d68d55a471fe32aca.r2.cloudflarestorage.com/openclaw-crabbox-artifacts/crabbox-artifacts/v2/org/b3BlbmNsYXc/owner/Z2l0aHViOjI2MzA2MDIwMg/publish/publish/20260926-051757-124870000/base-cli.mp4?X-Amz-Expires=604800&X-Amz-Date=20260926T051757Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=a677a1e59413a4e54bcc2da5fec6164a%2F20260926%2Fauto%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=af401b21bc4dfd784b6417a98820c475eb922e7057e51965c5eead970edbb556
Green, reviewed candidate
1689e055b17144ed0b450dfd3222662dedfe6d6c. Published head884f8b6f166b16d1e6879c66277d29d26e27da9arebases the identical seven file blobs onto current main; intervening changes do not affect this contract:https://91b59577e757131d68d55a471fe32aca.r2.cloudflarestorage.com/openclaw-crabbox-artifacts/crabbox-artifacts/v2/org/b3BlbmNsYXc/owner/Z2l0aHViOjI2MzA2MDIwMg/publish/publish/20260926-051757-124870000/head-cli.mp4?X-Amz-Expires=604800&X-Amz-Date=20260926T051757Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=a677a1e59413a4e54bcc2da5fec6164a%2F20260926%2Fauto%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=177c086d7410b978258b21ef4249167e06d9dae7f81cb47aac6760cf631d3559
Raw captures and artifact manifest