Skip to content

fix: explain why Doctor cannot restore a scheduled job’s account - #201550

Merged
VACInc merged 2 commits into
mainfrom
openclaw/brisk-lobster-5
Nov 19, 2026
Merged

VACInc merged 2 commits into
mainfrom
openclaw/brisk-lobster-5

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #200653. Related: #200600.

What Problem This Solves

openclaw doctor --fix silently skipped a scheduled job with a stale account binding when no usable upgrade receipt remained. The operator saw neither the affected job nor how to get it running again.

User Impact

Doctor names the job, says it was left unchanged, and shows commands to list the agent’s accounts and explicitly select the intended one. A healthy job does not get a warning just because there is no receipt.

Why This Change Was Made

Doctor now asks the existing credential owner to verify the saved binding even when there are no receipt paths to try. A matching current account stays quiet; a verified old path can still be repaired. A missing or nonmatching receipt never grants authority to switch accounts. Schedules, enabled state, and run history are not changed by the new diagnostic.

Evidence

On an isolated Gateway, a job created on the latest stable release (2026.11.5) ran successfully, then failed after an affected upgrade because its saved account no longer matched. A second, healthy job ran against the same local test provider. With the genuine upgrade receipt moved aside, openclaw doctor --fix --non-interactive built from this PR’s exact tree exited 0. It warned only about the stale job. No production jobs or credentials were used.

Redacted Doctor output and before/after checks

Job ID redacted; terminal wrapping removed:

Automation StaleFixture (<job-id>): inference account was not migrated: The saved account no longer matches and no usable upgrade receipt proves it is the same account. The job was left unchanged. Inspect available accounts with openclaw models auth list --agent main, then explicitly adopt the intended stored account with openclaw automations edit <job-id> --model 'standin/fixture@<profileId>'.

There was no warning for HealthyFixture. After restarting the disposable Gateway on the candidate, cron.get confirmed unchanged IDs, names, creation times, schedules, enabled flags, payloads, delivery, session targets, account bindings and runtime state for both jobs. cron.runs returned exactly the same entries before and after Doctor: two for the stale job (one successful release run, then the upgrade refusal), one successful run for the healthy job. Doctor neither rebound nor replayed either job.

The regression failed on unchanged main: Doctor returned no warnings for either stale job. Both Doctor account migration suites passed (23 tests), including the case where a receipt exists but cannot prove this job’s account. Scoped lint and formatting passed.

Worked on by

Work sessions

Linked for team reference; these sessions aren’t public.

roboclaw-bot and others added 2 commits November 19, 2026 00:59
Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: a5035ea4-a700-84b7-91fc-77a0f37a5aab
@clawsweeper

clawsweeper Bot commented Nov 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 commands Command implementations size: S labels Nov 19, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 19, 2026
@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Doctor identifies scheduled jobs whose saved account cannot be verified and provides explicit account-selection commands.

Example: StaleFixture has a stale account binding after an upgrade, and its upgrade receipt is unavailable.

  • Before: openclaw doctor --fix silently skips the job.
  • After: Doctor names StaleFixture, explains that it remains unchanged, and provides account-listing and selection commands while HealthyFixture stays quiet.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, correct diagnostic fix with shipped CLI proof, stable-upgrade preservation evidence, meaningful regression coverage and successful exact-head CI.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The public body supplies candidate Doctor CLI output from an isolated Gateway after a 2026.11.5 upgrade: only the stale job warns with its receipt removed, the healthy job stays quiet, and Gateway reads confirm unchanged settings, account bindings and run history.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Doctor silently leaves a stale scheduled-job account unrepaired when no usable upgrade receipt remains, giving the operator no recovery guidance.
Reason: The maintainer-authored direction makes an existing intentional refusal visible and actionable without changing account-selection authority or persisted settings.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored PR open for normal landing: it fixes a current Doctor diagnostic gap, exact-head CI passes, and no introduced defects were found.

Priority: P2
Reviewed head: 5039a37344a71bcc80e7cee708e73d0c064ad90f

Before merge

None.

Findings

None.

Agent review details

How this fits together

Offline Doctor reads scheduled jobs, resolves their execution agent and model, and asks the credential owner to verify saved account identities before returning warnings or submitting existing receipt-backed repairs.

flowchart TD
  A[Doctor CLI] --> B[Scheduled job inventory]
  B --> C[Agent and model resolution]
  C --> D[Credential authorization owner]
  E[Upgrade receipts] --> D
  D --> F[Unchanged job or verified repair]
  D --> G[Actionable warning]
Loading

Technical review

Best possible solution:

Land the focused diagnostic change while preserving credential-owner verification and the existing receipt-backed repair path.

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

Current-main source directly shows the silent no-receipt skip, and the supplied CLI trace demonstrates the affected upgrade scenario; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The patch is the smallest complete fix for the stated diagnostic gap: verify through the existing owner, report its refusal, and extend the existing regression without adding another repair mechanism.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Receipt-gated scheduled-account recovery changes intended behavior with a stated reason (24cb734: Recover old path-bound jobs only when the current credential lifetime and retained upgrade receipt prove continuity; leave unverifiable accounts untouched.)
  • Doctor account-migration warnings and explicit selection keeps the original intent (d277de7: Provide best-effort, actionable migration diagnostics without silently assigning unavailable, personal or otherwise ineligible accounts.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • RoboClaw: Raw commit d277de7 adds src/commands/doctor/cron/inference-binding-migration.ts:50 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d277de776de2; files: src/commands/doctor/cron/inference-binding-migration.ts)
  • Peter Steinberger: Raw commit 54dd1c6 adds src/commands/doctor/cron/inference-binding-migration.ts:64 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 54dd1c6d9a56; files: src/commands/doctor/cron/inference-binding-migration.ts)
  • Ayaan Zaidi: Raw commit 3114e87 adds src/commands/doctor/cron/inference-binding-migration.ts:306 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3114e87f42b3; files: src/commands/doctor/cron/inference-binding-migration.ts)

PR surface

Source +7, Tests +17, Docs +1. Total +25 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 20 13 +7
Tests 1 19 2 +17
Docs 1 3 2 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 42 17 +25

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This repairs a limited Doctor recovery-diagnostic gap; the underlying upgrade prevention and receipt-backed recovery already exist.
  • 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.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-19T01:17:09.555Z sha 5039a37 :: needs maintainer review before merge. :: none

Reviewed November 18, 2026, 8:27 PM ET / November 19, 2026, 01:27 UTC (Revision 2).

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Nov 19, 2026
@VACInc
VACInc merged commit 47e8649 into main Nov 19, 2026
162 checks passed
@VACInc
VACInc deleted the openclaw/brisk-lobster-5 branch November 19, 2026 01:30
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…nclaw#201550)

* fix: explain why Doctor cannot restore a scheduled job account

Co-authored-by: VACInc <[email protected]>

* fix: explain why Doctor cannot restore a scheduled job’s account

Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: a5035ea4-a700-84b7-91fc-77a0f37a5aab

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: VACInc <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 19, 2026
…1550)

* fix: explain why Doctor cannot restore a scheduled job account

Co-authored-by: VACInc <[email protected]>

* fix: explain why Doctor cannot restore a scheduled job’s account

Worked on by:
- @VACInc

Co-authored-by: VACInc <[email protected]>
OpenClaw-Publication: a5035ea4-a700-84b7-91fc-77a0f37a5aab

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: VACInc <[email protected]>

(cherry picked from commit 47e8649)

Co-authored-by: RomneyDa <[email protected]>
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
…aw#194058)

Failed-update triage now captures the operator's environment before managed candidate admission, so a coding agent installed only on the operator's PATH is still offered when the Gateway service's PATH differs. Restores the operator-environment contract from openclaw#134490 and keeps the launch confirmation from openclaw#143139.

Proof: shipped CLI on isolated Linux (Crabbox) with a running systemd Gateway: accept launches the operator-only agent, decline starts nothing, base 18bee8e reports no agent found; published 2026.11.1 upgrades to the fix with settings intact.

Co-authored-by: TorstenW <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: steipete <[email protected]>

(cherry picked from commit 7c702c3)

Release adaptation: Capture invoking operator env before candidate admission, forward to interactive triage only; preserve latest target selectors, confirmation and lease cleanup ordering. Exact three authorized production paths plus real lifecycle regression.

Follow-up dispositions: ad4863d fix: preserve the running installation when an agent updates its Gateway (openclaw#201570); dc73ec0 fix: let updates finish when another tool briefly reads OpenClaw's databases (openclaw#202541); d07b530 fix: clarify PostgreSQL schema upgrades for Git installs (openclaw#202098); e60ea9f test(update): add a Git release upgrade-survivor scenario (openclaw#201956); 2ef6f7b fix(update): build and serve Git releases outside node_modules (openclaw#201917); dbc1aa0 fix: keep the openclaw command and Gateway working after updating a pnpm install (openclaw#201735); f5e7641 fix: Git checkout updates across a schema change no longer end as post-update-failed after the new release starts (openclaw#201600); 2183caf fix: Git checkout updates no longer fail before the new release starts on a schema change or a busy database (openclaw#201463); 47e8649 fix: explain why Doctor cannot restore a scheduled job’s account (openclaw#201550); 8f2cfd4 fix: remove updater-only restrictions from agent maintenance guidance; cb5cfb2 fix: keep a doubtful killed-update recovery on the repair path (openclaw#201361); 24cb734 fix: keep carried-over scheduled jobs running after updates (openclaw#200653); d1276e1 feat(doctor): check OpenClaw ID member roles and honor an optional roles default (openclaw#197785); 0a39956 fix: finish updates when another tool reads OpenClaw's databases during the update (openclaw#201330); ea1c9d5 fix(update): settle remounted package publications before admission (openclaw#201336); 66b5212 fix(update): isolate malformed retained-install markers (openclaw#201199); 7e79c83 fix: let the next update finish a killed source checkout update (openclaw#201009); d905d8a fix: let the next update finish a killed update after the machine restarted (openclaw#200994); fdf0c95 fix: let the next update finish a killed update that had already installed the new version (openclaw#200866); 0c19bcd chore(release): close out 2026.11.5 on main (openclaw#200577); a1940e0 fix(matrix): keep explicit recovery available during deferred migration (openclaw#200805); 18b4776 improve: explain package baseline drift during updates (openclaw#200802); 1ad4cad fix(doctor): reclaim macOS updater runtimes blocked by non-updater processes (openclaw#200732); 427c857 fix: keep one missing archived transcript from blocking every update (openclaw#200733); 802e3f7 fix(update): keep valid cold archives from blocking updates (openclaw#200659); 23fca1a fix: let the next update continue after a killed update when nothing is left to repair (openclaw#200680); 3afe212 fix: let Doctor publish unchanged plugin migrations in any order (openclaw#200658); f65e4db fix(doctor): reclaim runtimes blocked by unrelated Linux processes (openclaw#200657); dab086c fix(update): let candidate Doctor read plugin dependencies from the staged package (openclaw#200595); 3447bee fix(update): keep updates going when the predecessor writes during its stop (openclaw#200569); 0ce9c77 fix: let the next update settle a package publication that a killed update left behind (openclaw#200550); ae31ea3 fix(update): repair handoffs in the journal-pinned lease store (openclaw#200532); 74020ea fix: continue updates when initial SQLite capture is stale (openclaw#200328); 6747b1e feat(update): run Git checkout installs from releases behind the release link (openclaw#199706); e3f8a67 fix(state): keep completed retained agent stores out of startup upgrade (openclaw#200284); 3c512c5 fix(gateway): move managed update lease operations off the main thread (openclaw#200169); ea69fcb chore(release): close out 2026.11.4 on main (openclaw#199956); 618bf31 fix(state): bound startup upgrade copies and pruning to owned state (openclaw#199929); e4a3093 perf(update): replace the candidate canary with a runtime contract check (openclaw#198268); 5dbf569 fix(update): plugin failures never fail an update or Gateway health; 764761e fix(update): refuse missing host prerequisites in one line and record a cause per attempt; 4c4fef4 fix(ui): update dialog claims installation before progress is confirmed (openclaw#199254); 136e1f6 fix(update): retrying an update from a dev checkout is refused after a killed update (openclaw#198673); 3bd03da fix(update): avoid duplicate database copies while the Gateway is stopped (openclaw#198148); 68a839b fix: isolate held agent databases until explicit restoration (openclaw#198180); e333f7e chore(ci): drop retired test-lines allocation records (3/3) (openclaw#197657); fd6fa47 fix: converge Gateway updates with environment-only service overrides (openclaw#196371); 7cf5e75 fix: clarify split-install updates and blocked Doctor repairs (openclaw#196342); 6ff8c86 fix(update): retain lazy sqlite catalog generation (openclaw#197095); 930e1f7 fix: keep stable updates and recovery free of premature migrations (openclaw#196474); a15f737 fix: preserve external plugin data during update rehearsal (openclaw#196301); 92798ae fix: updates survive interrupted heartbeat runs (openclaw#195656); c1e55e2 fix(update): restore LaunchAgent registration after repair contention (openclaw#195406); 715c610 fix(doctor): repair retained ISO session end timestamps (openclaw#194685); 689cfc8 fix(update): reclaim dead closing triage repair leases (openclaw#194503); 86bc89e fix(doctor): keep standing Codex parameter advice out of retirement blockers (openclaw#193650); 691bc8d fix(backup): read the backup engine without copying the live database (openclaw#194234); 000542f fix(backup): backups and updates fail on slow storage when a header probe batch misses its deadline (openclaw#194239); 31a65d5 fix(update): skip --no-lazy-fetch on Git versions without it (openclaw#194198); e45e99d fix(update): preserve dev update sources in tag-only Git clones (openclaw#193109)

Validation: Baseline2 intended operator-agent failures/32 controls passed; candidate34/34passed (194058-green.log). Accept launches synthetic operator-only CLI with expected env, decline starts nothing. Isolated updater flow, not live systemd/upgrade qualification.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 6689fd575ada8fe40a9593784deac18ec73041cd)
(cherry picked from commit 92e7a9fa223b0dc35801f25f70be90b472d9a6b7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation 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.

2 participants