Fix: cron run timeout and doctor discord, issue 28942 #29011
Fix: cron run timeout and doctor discord, issue 28942 #29011sahilsatralkar wants to merge 6 commits intoopenclaw:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8b8b27f35
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Greptile SummaryFixed CLI timeout for Key changes:
Technical notes:
Confidence Score: 4/5
Last reviewed commit: c8b8b27 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 576ed07987
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
- Remove magic value check that treated --timeout 30000 as default - Now passes timeout through directly to preserve user intent - Add tests for --timeout 30000 and --timeout 600000 scenarios - Change default timeout test from 600000 to 30000ms (original behavior)
576ed07 to
75a3f81
Compare
|
Hi @steipete , CI "check" failed because of format issue in CONTRIBUTING.md file |
|
Thanks for putting this together and including tests. I’m closing this for now because the PR scope mixes an unrelated doctor migration change and does not deliver a clean, isolated cron timeout behavior change in implementation. We need this split into tightly scoped, verifiable fixes. Appreciate the work and write-up. |
Summary
Describe the problem and fix in 2–5 bullets:
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
Security Impact (required)
Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Compatibility / Migration
Failure Recovery (if this breaks)
Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.Built using OpenCode with MiniMax M2.5
Build Script-
Implementation Plan: Issue #28942 - Fix cron run timeout and doctor --fix Discord multi-account bug
Overview
This plan addresses two bugs from issue #28942:
openclaw cron runalways times out after 30000ms even when gateway is healthydoctor --fixrepeatedly corrupts multi-account Discord configuration by adding an empty "default" accountPrerequisites
Step-by-Step Implementation
Step 1: Establish Baseline - Run All Existing Tests
pnpm test(orpnpm test:coveragefor detailed coverage)Step 2: Run CI Pipeline Tests Locally
Step 3: Run Specific Cron CLI Tests
pnpm vitest run src/cli/cron-cli.test.tsStep 4: Run Doctor Legacy Config Tests
Bug 1 Fix: cron run timeout
Step 5: Add --timeout option to cron run command
--timeoutoption to thecron runcommand with a longer defaultsrc/cli/cron-cli/register.cron-simple.ts.option("--timeout <ms>", "Timeout in ms (default 600000)", "600000")to the cron run command--dueoptionpnpm buildpnpm tsgoStep 6: Verify timeout fix with test
src/cli/cron-cli.test.tscallGatewayFromClipnpm vitest run src/cli/cron-cli.test.tsStep 7: Commit Bug 1 Fix
CLI: add --timeout option to cron run commandsrc/cli/cron-cli/register.cron-simple.tsgit logshows the commit with correct messageBug 2 Fix: doctor --fix Discord multi-account
Step 8: Add empty account guard in doctor-legacy-config
src/commands/doctor-legacy-config.tsdefaultAccount), add:pnpm buildpnpm tsgoStep 9: Add test for empty account guard
src/commands/doctor-legacy-config.migrations.test.tspnpm vitest run src/commands/doctor-legacy-config.migrations.test.tsStep 10: Run doctor-legacy-config tests
Step 11: Commit Bug 2 Fix
Doctor: skip adding empty default account for multi-account Discordsrc/commands/doctor-legacy-config.tsgit logshows the commit with correct messageIntegration Tests
Step 12: Run Full Test Suite
pnpm testStep 13: Run Full CI Checks
Step 14: Verify TypeScript Strict Mode
pnpm tsgoFinal Steps
Step 15: Push Changes to Remote
git push -u origin <branch-name>Summary of Changes
src/cli/cron-cli/register.cron-simple.ts--timeoutoption with default 600000mssrc/commands/doctor-legacy-config.tsTest Commands Reference
Notes
DEFAULT_JOB_TIMEOUT_MSinsrc/cron/service/timeout-policy.ts