Repository navigation
fix: backport Doctor and Claude reply repairs to 2026.9.9 - #166524
Conversation
…164868) Scope process settlement to the Doctor's native helper and receipt identities. Report foreign custody without retiring its claims or weakening installation replacement checks. Preserve mismatched receipt, alias, identity, and extinction refusals, and cover the overlap with a real exited child and live peer command. Refs https://github.com/openclaw/openclaw/actions/runs/37191626450. (cherry picked from commit d47ee98)
…nt reader (#163369) Doctor update-admission checks hashed the complete shared SQLite artifact family on every assertion (readCurrentOpenClawStateDatabaseContentVersion inside the admission reader), and lease writes invalidated the row cache, so repeated maintenance checks re-hashed archives inside small write transactions and prolonged the Gateway-offline window. The admission reader now holds an independent read-only connection within the schema-maintenance scope and admitted native-source lifetime, reads committed policy in one bounded snapshot per assertion, keeps lease/update admission, quarantine, schema and source-identity checks fresh, and closes before releasing source retention. Closes #163365 Co-authored-by: victor-gurbani <[email protected]> (cherry picked from commit 0eca3d0)
…nd honor interruption (#165837) Refs #165789 Refs #164948 Reported by @A1fred-AI and @goncalonc. (cherry picked from commit 3a085ea)
…nd agent runs Bash (#165596) * fix(claude-cli): a background agent's own Bash no longer leaves the turn open When a native background agent runs Bash itself, Claude Code reports that command on the main stream: task_started with owned_by_subagent: true, then a task_notification with no owner field, before the agent's own notification. The runtime queued that notification, so the agent's task-notification result consumed the Bash slot instead of the agent's. The agent stayed pending, the turn never completed, and the run ended at the CLI timeout and fell back to another model, which re-ran the prompt. Tasks started with owned_by_subagent are now recorded and their notifications dropped instead of queued: the subagent answers them, never the parent turn. Measured on Claude Code 2.1.289 (Opus 5.5 and Opus 5). * fix(anthropic): prove subagent Bash replies complete without a timeout Keep subagent-owned notifications out of the parent completion queue. Simplify single-use task predicates and remove the unused close-reason forwarding path. Replace the background-agent fixture's file polling with a protocol response barrier, and assert terminal output before waiting for iterator settlement so regressions fail on the misplaced interim marker instead of a timeout. Original fix by @adele-with-a-b; contributor ancestry is preserved. --------- Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 889611b)
|
🦞👀 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 maintainer review before merge. Reviewed October 7, 2026, 6:31 AM ET / 10:31 UTC (Revision 4). ClawSweeper reviewWhat this changesBackports Doctor cleanup, admission reading, archive migration and interruption repairs, Claude CLI reply completion, and WhatsApp test synchronization to the 2026.9.9 release candidate. Merge readiness✅ Ready for maintainer review The completed exact-head published-updater evidence resolves the prior compatibility blocker. No actionable code or security defect was found. This remains a useful backport to the frozen release branch even though the upstream repairs are already merged on main. Priority: P1 Review scores
Verification
How this fits togetherDoctor repairs installed configuration and stored conversation data while the updater manages Gateway shutdown and recovery. The Anthropic plugin separately turns Claude CLI subprocess notifications into completed agent replies. flowchart TD
A[Installed updater] --> B[Doctor maintenance]
C[Existing SQLite state] --> B
B --> D[Current ownership checks]
D --> E[Archive repair and process cleanup]
E --> F[Gateway recovery]
G[Claude CLI notifications] --> H[Completed agent reply]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +362, Tests +764, Docs +16. Total +1142 across 28 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep these repairs within the existing Doctor, storage and Anthropic owners, preserving the frozen release's recovery contracts and separate release qualification. Do we have a high-confidence way to reproduce the issue? Yes: the pinned release-base mechanisms and upstream negative controls establish concrete custody, archive-pagination and Claude notification failures. This read-only review did not execute product code. Is this the best way to solve the issue? Yes: the backport reuses merged repairs at their existing owners, preserves release-specific orchestration and recovery, and now has completed published-driver compatibility evidence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8f436000418b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
) (cherry picked from commit 1f576e4)
|
@clawsweeper re-review The only prior blocker is now resolved by completed exact-head published-updater compatibility evidence, recorded in the PR body. Package Acceptance run 37597401464 passed on C=Q 9653cd9; targeted first-hop job 112723426156 passed in 55m47s. Inspected artifact 11475436859 proves the installed published 2026.9.8 updater completed candidate Doctor, installed Doctor, managed Gateway replacement/verification, exact candidate build checks, and no transaction residue. Configuration and admission artifacts were preserved. Evidence limitations (systemd fixture, no raw SQLite row export) are explicitly recorded. Exact-head CI run 37597317084 passed all 194 jobs. No source or head changes since your review. |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Fixes Doctor/update failures and stalled Claude CLI replies on the frozen 2026.9.9 release candidate.
User Impact
Doctor keeps other active Doctors' native commands intact, reads current admission policy without repeatedly opening the full database fleet, and resumes archive migration progress while honoring interruption. Claude CLI background agents running Bash no longer leave the parent reply hanging.
No release version, dependency, schema, configuration, or publication change. Existing update backup, rollback, and managed-Gateway restoration ownership remain intact.
Why This Change Was Made
Maintainer-approved backports of #164868, #163369, #165837, and #165596, preserving upstream author credit and source commit provenance.
The Doctor custody failure was observed in stable full release validation. Archive conflict resolution preserves the release branch's flat migration plan, plugin-install-index prelude, and legacy recovery paths; the Claude fixture retains the release's ordinary foreground-error scenario. The only additional backport repairs the inherited WhatsApp test race found while validating this PR; its owning source fix landed on main first.
Evidence
ccb390b0776973fa8b5b7589d12975f9f89c4ac9onrelease/2026.9.9.--maxWorkers=1, 229.20s total wall including compilation. Infrastructure: 100 tests / 8 files, 172.60s; Doctor commands: 18 tests / 3 files, 26.90s; Claude subprocess boundary: 48 tests / 1 file, 18.43s. Existing regressions retained; no extra tests added for the backport. CI cost will be recorded when its exact-head run finishes.9653cd960d4c8af6616489eb20d2dec239511c13; 92.10s wrapper wall, repaired case 111ms. Wrong shard-selection attempts found no tests and are not passing evidence. The delta is patch-identical to the independently reviewed, CI-green and ClawSweeper-clean source fix. Original 166-test production proof remains valid.git diff --check, changed-file formatting, core production types, plugin production types, and plugin test types passed. Core test types and changed-file type-aware core/plugin lint also passed.1f576e4a4a210394aac7f82774d0afc6cabe7a2eand was cherry-picked here with an identical patch (test-only; production unchanged).9653cd960d4c8af6616489eb20d2dec239511c13,source=ref, andupdate-first-hop-compat-2026.9.8. The targeted job took 55m47s. Inspected uploaded lane evidence shows the installed published 2026.9.8 updater completing the first hop: candidate Doctor 16.101s, installed Doctor 22.011s, Gateway verification 4.890s, exit 0. Candidate-build equality, managed-service PID replacement, active service, and zero transaction residue assertions passed. Subsequent hops and the missing-plugin-load-path flow passed; update and standalone Doctor preserved configuration bytes, and admission retained pending lifecycle/profile artifacts. The existing systemd fixture manages real Gateway processes; this is not native-host systemd proof. Durable completion is supported by successful terminal output and the shipped updater completion contract; raw SQLite rows and first-hop JSON/service snapshots were not uploaded, so no independent row-export claim is made. This diagnostic evidence closes the combined candidate compatibility gap, but does not replace full stable qualification.