Skip to content

fix(update): avoid imposing a Doctor deadline during normal updates - #152973

Merged
fuller-stack-dev merged 7 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-finalization-explicit-deadlines-20260919
Sep 19, 2026
Merged

fuller-stack-dev merged 7 commits into
openclaw:mainfrom
fuller-stack-dev:fix/update-finalization-explicit-deadlines-20260919

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Sep 19, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Normal updates impose a per-Doctor deadline even when --timeout was omitted, stopping healthy finalization work when an internal step allowance expires.

User Impact

Post-core repair Doctor preserves an omitted operator deadline. Explicit CLI and standalone API deadlines, bounded capability checks, and child cleanup still apply. Older drivers and targets retain their existing deadline behavior. Build/install, plugin-operation and enclosing activation limits remain separate follow-up work.

Why This Change Was Made

The existing private handoff now carries operator intent separately from the numeric allowance required by older targets. The new reader restores absence only from supported metadata matching the received command. Missing, malformed or mismatched provenance preserves the deadline.

Evidence

  • Red recording at cf399a2a; green recording at 8866f439. These exercise actual handoff/reader/Doctor APIs with real synthetic children.
  • 72 focused regression tests pass. After CI exposed an outdated whole-marker assertion in the lease child fixture, its expectation was updated to require the complete new marker. All 53 lease tests then passed under the normal CLI process runner, alongside the same 72 focused cases. This correction changes only the fixture; the independently validated production files are unchanged. Independent source-blind validation passes 24 observations, including the timing variation, explicit expiry, legacy allowance, malformed provenance and child settlement.
  • Artifact manifest and contract/environment details. Both recordings decode cleanly; every published file was downloaded and checksum-verified.

The focused proof above covers subprocess boundaries. The additional installed-updater test below exercises a published binary against the exact candidate package. Local dependencies were borrowed read-only; required hosted CI supplies the full dependency/type gate. The follow-up head incorporates current canonical f8f4f4a8. Intervening changes concern Telegram progress, sidebar UI, Docker release-coverage enumeration, and cron/WebChat delivery. They do not alter this owner, its fixtures, dependencies or focused runner. Production files remain identical to the validated head; the added lease fixture correction has separate 53-case coverage and clean review.

  • Installed [email protected] successfully updated retained synthetic operator, session, plugin and config state to exact candidate 1869190c3520a61293f94012547fdd03592d2707. All 47 scenario phases passed, including final gateway readiness and status. The resulting build identity matches the candidate. This scenario uses a manual gateway restart and no live provider credentials. Compatibility receipt, phase observations, artifact manifest. The scenario exited 0; its initial outer evidence archive failed on container-owned file permissions. A separate read-only collection recovered the complete evidence without rerunning or changing the test. Published artifacts were downloaded and checksum-verified.

@clawsweeper

clawsweeper Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes size: S maintainer Maintainer-authored PR labels Sep 19, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 19, 2026
@clawsweeper

clawsweeper Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 19, 2026, 11:57 AM ET / 15:57 UTC (Revision 3).

ClawSweeper review

What this changes

The updater preserves an omitted Doctor deadline across fresh-process handoffs while retaining explicit operator deadlines and older-version behavior.

Merge readiness

⛔ Blocked before merge - 2 items remain

This remains a useful fix with no blocking correctness findings. The newly supplied published-updater qualification addresses the previous review’s compatibility blocker.

Priority: P2
Reviewed head: 1869190c3520a61293f94012547fdd03592d2707

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, compatibility-preserving repair with source-bound subprocess and upgrade evidence and no actionable correctness findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The supplied evidence reports real subprocess runs through the handoff reader and Doctor owner covering omitted deadlines, explicit expiry, legacy allowances, and settlement, plus a published 2026.9.3 updater reaching the exact candidate with retained state and final readiness. The prior upgrade-proof request is addressed; linked artifact inspection was limited by this review host.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The supplied evidence reports real subprocess runs through the handoff reader and Doctor owner covering omitted deadlines, explicit expiry, legacy allowances, and settlement, plus a published 2026.9.3 updater reaching the exact candidate with retained state and final readiness. The prior upgrade-proof request is addressed; linked artifact inspection was limited by this review host.
Evidence reviewed 8 items Current main still needs the fix: Fetched main still assigns params.timeoutMs directly to Doctor execution. The three changed production modules have no differences between the pinned base and fetched main.
Doctor deadline selection: Normal-update callers supply opts, so Doctor now uses only the parsed operator timeout. Standalone finalization omits opts and retains its existing lifecycle budget. The process runner treats an options object with undefined timeoutMs as having no deadline.
Conservative cross-version handoff: The reader removes the deadline only for version-1 metadata with parent completion ownership, a matching serialized positive timeout, and an explicitly absent operator timeout. Legacy, unknown, and mismatched metadata preserve the received deadline; the separate numeric step allowance remains intact.
Findings None None.
Security None None.

How this fits together

OpenClaw’s updater launches fresh processes to repair configuration and finish plugin updates after replacing core code. The handoff must distinguish an internal step allowance from the operator’s explicit Doctor deadline.

flowchart TD
  A[Update command] --> B[Operator timeout choice]
  B --> C[Private process handoff]
  C --> D{Supported matching metadata?}
  D -->|Yes| E[Restore operator choice]
  D -->|No| F[Preserve received deadline]
  E --> G[Repair Doctor]
  F --> G
  G --> H[Plugin validation and completion]
Loading

Before merge

  • Resolve merge risk (P1) - Independent inspection of the linked upgrade receipts and recordings was limited by blocked artifact-host access and missing ffprobe; the review relies on the captured, source-bound execution report.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +42, Tests +101, Docs +4. Total +147 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 3 48 6 +42
Tests 3 103 2 +101
Docs 1 8 4 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 159 12 +147

Review metrics

Metric Value Why it matters
Handoff compatibility 1 optional versioned timeout record; 0 new CLI flags The existing private handoff separates operator intent from the numeric allowance still required by older targets.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/cli/update-cli/update-command-fresh-doctor.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep Doctor deadlines tied to explicit operator intent while preserving legacy handoffs, bounded surrounding phases, and existing process-cleanup ownership.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep Doctor deadlines tied to explicit operator intent while preserving legacy handoffs, bounded surrounding phases, and existing process-cleanup ownership.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: normal updates forward their internal allowance as Doctor’s timeout even when the operator omitted --timeout. No runtime reproduction was executed in this read-only review.

Is this the best way to solve the issue?

Yes. Extending the existing private handoff preserves old-target behavior while fixing deadline selection at the Doctor execution owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1d7fd50b912f.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The supplied evidence reports real subprocess runs through the handoff reader and Doctor owner covering omitted deadlines, explicit expiry, legacy allowances, and settlement, plus a published 2026.9.3 updater reaching the exact candidate with retained state and final readiness. The prior upgrade-proof request is addressed; linked artifact inspection was limited by this review host.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: This focused update fix prevents healthy Doctor work from expiring under an unintended internal deadline.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The supplied evidence reports real subprocess runs through the handoff reader and Doctor owner covering omitted deadlines, explicit expiry, legacy allowances, and settlement, plus a published 2026.9.3 updater reaching the exact candidate with retained state and final readiness. The prior upgrade-proof request is addressed; linked artifact inspection was limited by this review host.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied evidence reports real subprocess runs through the handoff reader and Doctor owner covering omitted deadlines, explicit expiry, legacy allowances, and settlement, plus a published 2026.9.3 updater reaching the exact candidate with retained state and final readiness. The prior upgrade-proof request is addressed; linked artifact inspection was limited by this review host.

Evidence

What I checked:

  • Current main still needs the fix: Fetched main still assigns params.timeoutMs directly to Doctor execution. The three changed production modules have no differences between the pinned base and fetched main. (src/cli/update-cli/update-command-fresh-doctor.ts:172, 1d7fd50b912f)
  • Doctor deadline selection: Normal-update callers supply opts, so Doctor now uses only the parsed operator timeout. Standalone finalization omits opts and retains its existing lifecycle budget. The process runner treats an options object with undefined timeoutMs as having no deadline. (src/cli/update-cli/update-command-fresh-doctor.ts:174, 1869190c3520)
  • Conservative cross-version handoff: The reader removes the deadline only for version-1 metadata with parent completion ownership, a matching serialized positive timeout, and an explicitly absent operator timeout. Legacy, unknown, and mismatched metadata preserve the received deadline; the separate numeric step allowance remains intact. (src/cli/update-cli/update-command-post-core.ts:89, 1869190c3520)
  • Regression coverage and proof continuity: Read the timeout, provenance, and real-child handoff tests. They cover omitted and explicit deadlines, legacy metadata, malformed provenance, completion ownership, and child settlement. Comparing the three production modules against the recorded proof revision produced no differences. Tests were not executed during this read-only review. (src/cli/update-cli/update-command-post-core.test.ts:396, 1869190c3520)
  • Previous upgrade-proof request addressed: The supplied PR body, also read through REST without a changed head or evidence narrative, reports an installed [email protected] updating retained synthetic operator, session, plugin, and configuration state to this exact candidate. It records 47 passing phases, matching build identity, final Gateway readiness, and status, with manual restart and no live provider credentials. This addresses the prior published-driver × candidate request; subprocess proof separately reports explicit expiry and legacy allowance coverage. (1869190c3520)
  • Artifact inspection limitation: The prepared media manifest records downloaded recordings but no contact sheets: ffprobe failed with spawnSync ffprobe ENOENT. Fetching the linked JSON evidence was blocked because its Cloudflare artifact host is outside this sandbox’s allowlist. Artifact contents and playback were therefore not independently inspected; the source-bound observations in the supplied PR body remain the evidence basis.

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-19T15:07:11.446Z sha feb87c2 :: blocked before merge. :: none
  • reviewed 2026-09-19T15:27:53.938Z sha 1869190 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Sep 19, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Review checklist disposition for exact head 1869190c3520a61293f94012547fdd03592d2707:

  • Artifact inspection is complete in the maintainer session. The published compatibility receipt, all 47 phase observations and manifest were downloaded and their SHA-256 hashes matched the inspected local files. The proof worker also decoded and visually checked the red/green recordings. Independent source-blind validation covers omitted and explicit deadlines, legacy handoffs and child settlement. The review bot's artifact-host and ffprobe restrictions explain its inspection limit.
  • Published-driver compatibility passed. Installed [email protected] upgraded retained synthetic operator, session, plugin and config state to this exact candidate, with matching build identity and final readiness/status. Execution. The Evidence section contains the verified receipts and manifest. This uses manual gateway restart and no live provider credentials.
  • The versioned timeout metadata is private process handoff data. This PR adds no persistent schema migration. Legacy and unknown handoffs retain their received deadlines.

Native prepare and merge verification passed. I inspected the flagged mainline movement: desktop power tests, Windows test selection, command-palette translations and wrapper materialization metadata do not change the timeout owner or these proof assumptions. The separate incomplete config-import refactor is being repaired in #153007. The reviewed production modules remain unchanged.

@fuller-stack-dev
fuller-stack-dev merged commit 52bf22b into openclaw:main Sep 19, 2026
233 of 236 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

@fuller-stack-dev
fuller-stack-dev deleted the fix/update-finalization-explicit-deadlines-20260919 branch September 19, 2026 16:02
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 20, 2026
…penclaw#152973)

* fix(update): preserve explicit finalization deadline policy

* fix(update): retain legacy allowance with private deadline provenance

* docs(update): wrap finalization timeout policy

* test(update): assert deadline provenance in lease fixture
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant