Repository navigation
fix(update): skip opt-in probes and preserve Doctor warnings - #141995
Conversation
Keep explicit Codex version checks bounded when descendants retain output pipes, preserve timeout failures, and carry nonfatal repair warnings through the existing Doctor result channel. Routine repair now shares lint default-check selection. Related: #139485; follow-up to #140648 and #141740. The daemonized-child experiment completed on official 2026.9.2 and main; this does not claim the original incident is resolved.
|
🦞👀 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 8, 2026, 4:03 AM ET / 08:03 UTC. ClawSweeper reviewWhat this changesThe PR skips opt-in checks during routine Doctor repair, bounds explicit Codex version probes, and includes nonfatal repair warnings in update finalization results. Merge readiness⛔ Blocked before merge - 1 item remains This remains a useful, scoped fix absent from reviewed main. No actionable findings remain; the previous migration-proof concern is resolved by the existing temporary IPC contract and supplied upgrade evidence. Priority: P2 Review scores
Verification
How this fits togetherUpdate finalization runs Doctor and plugin convergence before an update supervisor resumes the Gateway. Doctor findings and child-process outcomes feed the final command status and JSON report. flowchart TD
A[Update supervisor] --> B[Update finalization]
B --> C[Doctor check selection]
C --> D[Default repair checks]
E[Explicit candidate lint] --> F[Bounded Codex probe]
D --> G[Doctor result channel]
G --> H[Final status and warnings]
B --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource +118, Tests +293, Docs +11. Total +422 across 16 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep routine repair aligned with opt-in check semantics, preserve explicit candidate validation, and report bounded warnings through the existing finalization channel. Do we have a high-confidence way to reproduce the issue? Yes—source inspection and supplied before/after observations establish unwanted opt-in probing and timeout-as-success behavior; this review did not execute the reproduction. Is this the best way to solve the issue? Yes—the patch reuses existing selection, process-runner, and result-channel owners while preserving explicit validation and fatal failures. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fdd6acecfe91. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
Record unresolved core contribution warnings and caught optional failures in Doctor's existing bounded update result. Share core/plugin repair reporting while preserving display, repair, required-failure and exit semantics. Related: #141995 Validation: 273 focused cases, 29 changed checks, independent P2 review.
…w#141995) Keep explicit Codex version checks bounded when descendants retain output pipes, preserve timeout failures, and carry nonfatal repair warnings through the existing Doctor result channel. Routine repair now shares lint default-check selection. Related: openclaw#139485; follow-up to openclaw#140648 and openclaw#141740. The daemonized-child experiment completed on official 2026.9.2 and main; this does not claim the original incident is resolved.
…2091) Record unresolved core contribution warnings and caught optional failures in Doctor's existing bounded update result. Share core/plugin repair reporting while preserving display, repair, required-failure and exit semantics. Related: openclaw#141995 Validation: 273 focused cases, 29 changed checks, independent P2 review.
Related: #139485. Follow-up to #140648 and #141740. This does not close #139485.
What Problem This Solves
Fixes an issue where update finalization runs an opt-in managed Codex version check during ordinary Doctor repair and omits nonfatal Doctor warnings from its JSON report. The probe can also report success after its five-second timeout destroys pipes retained by an already-exited child's descendant.
The daemonized-child experiment did not reproduce an indefinite hang on official 2026.9.2 or current main. This PR takes the investigation's requested narrower scope; it does not claim to identify @hannesrudolph's original failure.
Why This Change Was Made
Doctor repair now shares ordinary lint's default-enabled selection while retaining the existing enabled/configured-plugin policy. Explicit candidate checks remain strict. The managed version probe uses the existing process runner, preserving its five-second deadline, forced process-group termination, bounded capture, immediate stdin EOF, and bounded post-timeout drain. A failed probe invoked in post-core repair is a warning. Routine finalization skips this opt-in check.
Nonfatal repair warnings pass through the existing Doctor result IPC into
postUpdate.doctor.warnings, capped at 32 messages of 500 characters. Finalization returns warning/exit 0 when no step fails. Enabling that existing IPC also activates the existing deferred-plugin advisory exit 86; it is accepted only with a validated advisory result and an ordinary exit, never a timeout or output failure.Mechanism references:
execFile:kill()destroys stdout/stderr before signaling;exithandler()can still accept an already-recorded exit 0. The original probe regression settled around 5.1 seconds with no finding.run_post_core_updateandrun_update_mode_openclaw_command_output_with_envuse null stdin, piped output, and the post-core marker.User Impact
Routine finalization avoids unnecessary opt-in version probes, supervisors receive nonfatal Doctor warnings, and explicit candidate validation cannot mistake a timed-out output drain for successful readiness. Codex runtime readiness remains owned by the plugin after restart. No configuration, environment-name, dependency, schema, or protocol change is introduced.
Evidence
All state and probes were synthetic and isolated on macOS 27 arm64. No real OpenClaw state, keychain tooling, launchd mutation, merge, or lock recovery was used.
1029e3870f23, same probeoutcome: switched, exit 0 in 16.737s / 15.862s; source/candidate foreground Gateway health/readiness verified.The observers verified entry into the native probe, reparenting to PID 1, process trees, per-process
lsof, and native samples of the actual finalizer. Official 9.2 showed an idlekeventmain thread with pipes/kqueues and no SQLite descriptors but still completed. Main additionally retained its update-ledger descriptors. These observations distinguish a reachable pipe-retention mechanism from the unconfirmed incident.Validation: 334 focused tests across eight files, then 123 final tests across four files on Node 26.7. Main-red regressions cover silent orphan-timeout success, default-check selection, warning IPC, and terminal JSON.
node scripts/check-changed.mjs(the documented equivalent for ready worktree dependencies) andgit diff --checkpass. Independent P0–P2 review is scoped-clean. A full build and package integrity check pass; the nine changed production files match the tested candidate snapshot byte-for-byte. Later changes only relocated a test into existing support and used the existing tree-cleanup helper.Limits: the reporter's macOS 26 and actual state remain untested. OCM services stayed disabled because its launchd label is shared; this exercises runtime switching/finalization and foreground verification, not launchd or automatic rollback. The initial Node 26 OCM snapshot returned transient ENOENT before upgrade; an ordinary retry passed. Official 9.1 setup was network-blocked, so this OCM comparison starts at official 9.2. Slow/incomplete dependency installs and unentered probes are excluded from passing evidence. No Windows-native proof was added.
Exact-head CI: run 34200852921 is attached to
4638117477589f9d7875e77f6ce0482f9bb4e5ec. The bounded watcher ended at its deadline; the last successful read wasin_progress. Intermittent GitHub read timeouts occurred. CI is not claimed green. The initial draft-skipped run was excluded. This PR remains unmerged.