Repository navigation
fix(update): explain invalid config during database preflight - #147771
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: blocked before merge. Reviewed September 14, 2026, 12:53 AM ET / 04:53 UTC (Revision 4). ClawSweeper reviewWhat this changesThe PR adds value-redacted invalid-field diagnostics and Doctor guidance to update preflight refusals, documents recovery, adds regression coverage, and repairs Docker test-image directory permissions. Merge readiness⛔ Blocked before merge - 1 item remains The PR remains useful: current main and v2026.9.4 still emit the generic refusal. The redaction fix addresses the reported disclosure, and no blocking introduced defect remains. The documented qualification dispositions adequately address the earlier review concerns. Priority: P2 Review scores
Verification
How this fits togetherUpdate preflight reads the selected configuration before inspecting database compatibility and changing the installation. Invalid configuration stops that inspection; this change makes the refusal actionable without changing admission or migration behavior. flowchart TD
A[Update request] --> B[Read selected configuration]
B --> C{Configuration usable?}
C -->|Yes| D[Inspect database compatibility]
C -->|No| E[Format field paths without values]
E --> F[Refuse with Doctor guidance]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +14, Tests +110, Docs +5, Other +3. Total +132 across 5 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep the diagnostic repair in the existing preflight owner, preserve admission safeguards, and leave broader migration recovery with its separate investigation. Do we have a high-confidence way to reproduce the issue? Yes, for the narrow diagnostic defect: current main discards structured validation issues when invalid config reaches database preflight. Tests were inspected but not executed; the original broader migration incident remains unconfirmed. Is this the best way to solve the issue? Yes. Reusing the existing terminal-safe formatter with constant error text is a focused repair that retains useful field locations without printing rejected values or changing migration ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 06918febcb65. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review The landing check found that validator messages can contain rejected config values. Commit eab956e preserves field paths and Doctor guidance while omitting raw messages. The real config-read regression fails before the fix and passes afterward; all 17 preflight tests, pnpm check:changed, and fresh P1 review pass. The PR body also records the passing published-updater qualification and dispositions for the previous qualification requests. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
…aw#147771) * fix(update): explain invalid config during database preflight * fix(test): make the Docker plugin registry entrypoint executable * fix(test): preserve Docker runner directory traversal * fix(test): retain file modes while enabling harness directory traversal * fix(update): omit config values from preflight refusals
What Problem This Solves
Database schema preflight refuses an update for invalid configuration without identifying the offending fields or explaining how to repair them.
Refs #147717. Reported by @gryffindorhammer (#147717).
User Impact
The refusal now names the config file and invalid fields, points to
openclaw doctor --fixfor retired or unrecognized keys, and asks users to correct remaining errors before retrying. Database compatibility and config-identity checks retain their existing refusal and read-only behavior.Why This Change Was Made
Preflight already had structured validation issues but discarded them in its error message. It now uses the existing terminal-safe formatter.
The broader Doctor ordering and agent-selection failure could not be reproduced on current main. The new real CLI test combines two agents, a configured system agent, retired and unknown fields, legacy workspace setup, and a legacy session. One Doctor run persists config repair and migrates both stores to SQLite without explicit agent selection. This protects existing behavior; no migration order or agent-selection fallback changes. Original corrected keys, the first Doctor refusal, and stage-specific executable versions are still needed to attribute #147717.
Qualification exposed a Docker runner defect:
COPY --chmod=0644made newly created helper parent directories non-traversable. The image now normalizes directory modes after copying while retaining explicit file modes. A freshappuserprobe verifies directory/artifact/entrypoint modes of0755/0644/0755and successfully executes the entrypoint.Related PRs #147714 and #147453 own plugin-ID and environment-reference repair; those owners are unchanged here.
Evidence
node scripts/run-vitest.mjs src/commands/doctor-config-preflight.refusal.process.test.ts -t 'repairs retired and unknown keys'passes on unchanged Doctor production code.node scripts/run-vitest.mjs test/scripts/docker-build-helper.test.ts -t 'normalizes shared Docker E2E harness file permissions'passes. The existing guard was preserved.pnpm build,pnpm check:changed, the scoped Docker tooling checks, and P1 autoreview passed; review is scoped-clean.9bfac050f69acb9f26a109818f82b5432a484723: https://github.com/openclaw/openclaw/actions/runs/34803230864.[email protected]→ candidate 2026.9.4 qualification passed in 386 seconds, including automatic migration, schema and plugin recovery, cron owners, post-update agent turn, already-current second update, and clean Doctor checks.The qualification tarball is bound to pre-redaction-fix head
9bfac050f69acb9f26a109818f82b5432a484723; the subsequent fix only omits validator message values, with focused regression and changed-file proof rerun. SHA-256:5ff959169d43edc5e35ec1086e5983db89374a983af7001294e4b6a2680d42ca.Qualification limitations remain explicit. The earlier
basecell, whose npm prefix is on the Mac host bind mount, passed candidate migration/validation/canary but hit the frozen 2026.9.3 updater's 30-second package-integrity cap during swap. Its secondary “retained package tree changed” message also occurs when the baseline fingerprint is absent; it is not evidence of corruption. No timeout or recovery semantics were changed. The passing operator-state cell uses the container filesystem and different fixtures, so it does not isolate the latency cause. An earlier package had stale UI assets after a runtime test build; rebuilding the complete final head resolved that warning.An earlier-head CI run also failed the unrelated CUA 256 MiB frame cleanup test; the recorded pre-redaction-fix run is green. Evidence: https://github.com/openclaw/openclaw/actions/runs/34802256357/job/103847247066. An intermediate Docker change failed the file-mode source guard; the final implementation retains the guard and passes it.
The installed old updater retains its own preflight message until replacement. The new diagnostic is proved at the candidate preflight boundary. These fixtures do not reconstruct the original incident, so this PR does not auto-close it.
Release-note context: Update failures caused by invalid configuration now identify the fields and provide actionable Doctor repair guidance.
ClawSweeper review
The reviewed head has no code findings. The four qualification/maintainer/data-model requests and optional rank-up move are addressed by the successful published 2026.9.3 updater → candidate
legacy-operator-statecell recorded above, including package replacement and recovery checks. The earlier Mac bind-mountbasefailure remains a documented limitation; the passing cell does not isolate its latency cause. No schema, migration ordering, retention, or recovery behavior changes are introduced, so a separate data-model migration is not applicable.Fixup
eab956e0fde9ad256e1a3756427af44091f48dc9passedpnpm check:changed; exact-head CI passed: https://github.com/openclaw/openclaw/actions/runs/34806735721 (the native watcher reports GREEN; five superseded checks were accounted for). The landing review additionally found that terminal escaping alone does not remove config values embedded in validator messages. Preflight now projects only issue paths with a fixed invalid-field reason before formatting. A real config-read regression failed on the prior head because the refusal included a synthetic rejected model-policy value; it now passes, along with all 17 preflight tests and a fresh scoped-clean P1 review. Field paths and Doctor guidance remain visible; raw validator messages are omitted.ClawSweeper revision 4 reviewed
eab956e0fde9ad256e1a3756427af44091f48dc9and found no code or security defects. Its sole remaining data-model compatibility checklist item is dispositioned as already covered by the published-updater proof above; a new data-model migration is not applicable because this PR changes diagnostic presentation and test-harness directory permissions only. No additional code change or review request is needed.