Repository navigation
fix(doctor): show progress while checks and repairs run - #178767
Conversation
Co-authored-by: MoerAI <[email protected]>
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b874b54eb3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| root, | ||
| outro: showDoctorOutro, | ||
| }); | ||
| const admission = await measure("doctor.maintenance-admission", () => |
There was a problem hiding this comment.
Stop progress updates before waiting at interactive prompts
In the default interactive openclaw doctor flow, this wrapper remains active while prepareDoctorInteractiveMaintenance waits for update and maintenance confirmations. If the operator takes more than 10 seconds, the interval writes raw lines to stderr over the active Clack prompt every 10 seconds, disrupting or corrupting the prompt display; the same problem occurs for workspace-alias and capability-consent prompts wrapped by the new progress scopes. Pause or end progress reporting before entering interactive prompt code.
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. What this changesThis PR adds section-start messages and 10-second elapsed-time updates to Doctor’s checks and repairs. Example: A human-output Doctor contribution remains pending for 10 seconds.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep this PR open: it addresses the maintainer-approved Doctor reporting gap that remains on main. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherDoctor orchestrates maintenance admission, backups, config preparation, health checks, repairs, and cleanup; the change reports these existing boundaries to stderr while suppressing progress in JSON mode. flowchart TD
A[Doctor CLI] --> B[Maintenance and preparation]
B --> C[Config flow]
C --> D[Health contributions]
D --> E[Check repair validation]
B --> F[Doctor progress owner]
C --> F
D --> F
E --> F
F --> G[Human stderr]
Technical reviewBest possible solution: Coordinate the existing Doctor progress owner with interactive prompts so enclosing heartbeats pause during operator input and resume afterward. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the silent structured-check path, and the introduced wrappers establish heartbeat writes during pending confirmations; no target code was executed in this read-only review. Is this the best way to solve the issue? Reporting at the existing execution owners is a focused solution, provided progress yields the terminal to the existing prompt owner. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bead2a8e5427. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +113, Tests +84, Docs +4. Total +201 across 14 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 20, 2026, 5:03 PM ET / 21:03 UTC. |
Repair the inherited check-lint-core-2 failure from #178767 without changing creator attribution. Bind the direct HealthCheck repair method to its check so it retains the pre-progress receiver. A new regression fails before this fix; 11 Doctor tests and type-aware lint pass. Independent P0-P2 review found no actionable issues. Co-authored-by: VACInc <[email protected]>
Bind the captured repair method to its owning health check before the progress callback invokes it. Preserve arguments, asynchronous results and existing error handling. Add a receiver-dependent regression that fails before the repair. Resolves the inherited unbound-method CI error from #178767 without changing compaction behavior. Co-authored-by: VACInc <[email protected]>
The progress wrapper added in #178767 extracted HealthCheck.repair without its receiver. Bind it to the check and exercise a raw receiver-dependent check through the existing repair-flow table. Restores config carry and change output without changing progress, dry-run, or repair validation.
* feat: attribute delegated work to the initiating human Co-authored-by: VACInc <[email protected]> * fix: retain initiating creator for agent-created tasks Apply opt-in causal creator attribution to operator-tool session creation without changing the selected execution identity or live authority checks. Prove creation, creator effects, and revocation through the authenticated Gateway. Co-authored-by: VACInc <[email protected]> * test: repair creator branch CI fixtures Observe native receipts before waiting for retirement readiness, and assert agent-resolution context through the existing error message. Co-authored-by: VACInc <[email protected]> * test: await transcript indexing in PostgreSQL fixture Queue the fixture transcript explicitly after broad synchronization so an in-flight memory-only watcher pass cannot leave the lexical transcript assertion racing the session debounce. Co-authored-by: VACInc <[email protected]> * fix: give initiating humans creator controls by default Remove the unshipped Labs toggle and experimental config. Preserve execution authority and the original isolation identity while applying causal creator attribution to new delegated work. Exercise default behavior and capture authentic requester facts in guest boundary fixtures. Co-authored-by: VACInc <[email protected]> * fix(doctor): preserve repair method receiver during progress Repair the inherited check-lint-core-2 failure from #178767 without changing creator attribution. Bind the direct HealthCheck repair method to its check so it retains the pre-progress receiver. A new regression fails before this fix; 11 Doctor tests and type-aware lint pass. Independent P0-P2 review found no actionable issues. Co-authored-by: VACInc <[email protected]> * test: distinguish causal creators in gateway fixtures Supply authenticated request origins in human-initiated creation fixtures and retain agent attribution for autonomous cron calls without changing runtime permissions. Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: VACInc <[email protected]>
) Fixes openclaw#154636. Doctor now prints a stderr phase line as each check/repair section starts (through the existing heading owner) and an elapsed-time heartbeat every 10 seconds for long sections. Progress is off for JSON output and never touches stdout; timers are cleared on completion or failure. Supersedes openclaw#175719, thanks @MoerAI. Co-authored-by: MoerAI <[email protected]>
The progress wrapper added in openclaw#178767 extracted HealthCheck.repair without its receiver. Bind it to the check and exercise a raw receiver-dependent check through the existing repair-flow table. Restores config carry and change output without changing progress, dry-run, or repair validation.
* feat: attribute delegated work to the initiating human Co-authored-by: VACInc <[email protected]> * fix: retain initiating creator for agent-created tasks Apply opt-in causal creator attribution to operator-tool session creation without changing the selected execution identity or live authority checks. Prove creation, creator effects, and revocation through the authenticated Gateway. Co-authored-by: VACInc <[email protected]> * test: repair creator branch CI fixtures Observe native receipts before waiting for retirement readiness, and assert agent-resolution context through the existing error message. Co-authored-by: VACInc <[email protected]> * test: await transcript indexing in PostgreSQL fixture Queue the fixture transcript explicitly after broad synchronization so an in-flight memory-only watcher pass cannot leave the lexical transcript assertion racing the session debounce. Co-authored-by: VACInc <[email protected]> * fix: give initiating humans creator controls by default Remove the unshipped Labs toggle and experimental config. Preserve execution authority and the original isolation identity while applying causal creator attribution to new delegated work. Exercise default behavior and capture authentic requester facts in guest boundary fixtures. Co-authored-by: VACInc <[email protected]> * fix(doctor): preserve repair method receiver during progress Repair the inherited check-lint-core-2 failure from openclaw#178767 without changing creator attribution. Bind the direct HealthCheck repair method to its check so it retains the pre-progress receiver. A new regression fails before this fix; 11 Doctor tests and type-aware lint pass. Independent P0-P2 review found no actionable issues. Co-authored-by: VACInc <[email protected]> * test: distinguish causal creators in gateway fixtures Supply authenticated request origins in human-initiated creation fixtures and retain agent attribution for autonomous cron calls without changing runtime permissions. Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: VACInc <[email protected]>
What Problem This Solves
openclaw doctor --fixcan spend minutes checking or repairing state without showing which section is running.Fixes #154636.
User Impact
Doctor prints each section as it starts and repeats its name with elapsed time every 10 seconds while work remains pending. Progress goes to stderr; JSON remains free of human progress output.
Why This Change Was Made
The existing Doctor heading owner now owns the phase timer. The contribution and repair runners report their existing boundaries, including check, repair, and validation. Startup, backup, migration, config, and final cleanup sections use the same output. The delayed config-preflight spinner and its obsolete prompt-cleanup callback are removed. Existing preparation stays in the startup owner, preserving operation order and keeping the flow within its line budget.
Supersedes #175719, thanks @MoerAI.
Evidence
The new regression failed on the unchanged base because stderr contained no phase line. Both human and JSON cases now pass, including the 10-second heartbeat and timer cleanup.
Production and touched-test TypeScript checks, touched-file oxlint/oxfmt,
git diff --check, and madge passed (0 import cycles). The final independent Codex review reported no actionable P0–P2 findings.Isolated live repair passed with exit 0:
This used synthetic config/state and emitted 150 stderr progress lines, including
Doctor: contributions (10s elapsed), then reachedDoctor complete.The 109-file importing-consumer replay completed: 1,036 tests passed, 12 were already skipped, and one fixture failed. That fixture globally pretended to be Linux while using real macOS SQLite locks, making its own owner look foreign. It now uses the existing host-preserving service-platform test helper; its failed case and following case both passed on the focused rerun (2 passed, 37.7s test time). No ownership assertion was weakened. The packaged Doctor JSON E2E case passed.
Consumer command:
node scripts/run-vitest.mjs <the 109 files selected with rg -l for the changed owner basenames> --maxWorkers=1, with isolated HOME/state and a private macOS TMPDIR/XDG_CACHE_HOME. The focused fixture rerun passed with the same strict ownership assertions.Local setup evidence: the first runtime build took 7m22s; the replay build took 3m07s. These are preparation costs, not test times. SQLite staging rejected the group-writable external-volume ancestor during the first replay; the final replay uses an owned private temporary/cache directory while keeping the exported HOME and state isolated. An initial unchanged tooling run also encountered a native source-scanner SIGILL and an empty-selection assertion; a later pass is not claimed as a fix for those intermittent tooling failures.
Full
check:changed/SQLite inventory was omitted under the lane's local gate budget; PR CI remains the broad check.Production: +333/-220 (net +113); tests: +95/-11 (net +84); docs: +4. The added production lines provide the phase boundaries and timer; the superseded spinner and prompt-cleanup callback were removed.
Pre-existing slow integration proof
The tooling file took 129s; the infrastructure group took 1,034s and the Doctor command group 1,869s. These suites repeatedly run full Doctor, config-write, snapshot, and archive fixtures. No timeout or assertion was relaxed. Notable individual passing cases:
These existing fixture costs are recorded for the separate testing-performance follow-up.