openclaw: bump checkForUpdate timeout 5s/3s → 10s (#105 + #109)#171
Conversation
Two AbortSignal.timeout values in openclaw/src/index.ts trigger the
"Auto-update check failed: The operation was aborted due to timeout"
log line on cold gateway init:
openclaw/src/index.ts:192 — `checkForUpdate` (5s, fire-and-forget at
startup; #105)
openclaw/src/index.ts:694 — `/hivemind_version` slash command (3s;
#109)
Steady-state npm registry response is ~170ms — three orders of
magnitude under either budget. The aborts happen during cold start
when the registry fetch races plugin discovery, Bonjour watchdogs,
and TLS warm-up. Bumped both to 10s.
Verified live: 2026-05-12T20:49:48 in /tmp/openclaw/openclaw-2026-05-12.log
on the user's gateway shows the timeout abort symptom on a fresh
restart. Steady-state runs do not abort. 10s gives ~60x headroom over
observed steady-state latency.
The startup-call site is fire-and-forget (the .catch(() => {}) call
chain at the bottom of register()), so a longer budget does NOT add
session-start latency. The /hivemind_version site is a user-invoked
command — 10s is still well below the user's patience threshold and
matches the observed worst-case cold latency we want to cover.
Fixes #105
Fixes #109
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughNetwork timeout values for npm registry version probes in OpenClaw are increased from 5 seconds and 3 seconds to a uniform 10 seconds in the background auto-update check and the ChangesRegistry Fetch Timeout Relaxation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
Coverage ReportNo Generated for commit 1e343a4. |
|
Thanks @coderabbitai — no actionable findings on this one, and CI is fully green. Tiny PR (12-line diff to bump two AbortSignal timeouts from 5s/3s to 10s). Ready for human review. |
|
Tip For best results, initiate chat on the files or code changes.
|
Fixes #105 and #109.
Why
Two
AbortSignal.timeoutbudgets inopenclaw/src/index.tsare aggressive enough to abort the npm-registry fetch on cold gateway init:checkForUpdateat startup (5s)/hivemind_versionslash command (3s)Steady-state response time from
registry.npmjs.org/@deeplake/hivemind/latestis ~170ms. The aborts happen during cold start when this fetch runs concurrently with plugin discovery, Bonjour watchdogs, and TLS warm-up. Both issues track this same root cause.Observed live on the user's gateway 2026-05-12T20:49:48 right after a
systemctl --user restart openclaw-gateway:The expected
⬆️ Hivemind update available: <current> → <latest>. Run: hivemind updatenotice never renders for that gateway run, so users miss the upgrade prompt until the next restart hits a warm cache.What changed
Bumped both timeouts to 10s (~60x headroom over observed steady-state latency).
checkForUpdate(logger).catch(() => {})at the bottom ofregister()), so a longer budget does not add session-start latency. Per the team's "no session-start latency" rule, the network call is intentionally unawaited; the only effect of a longer timeout is "the abort message no longer races a slow-but-eventually-succeeding fetch."/hivemind_versionsite is a user-invoked command — 10s is well below user-patience threshold and matches the worst cold-start latency we want to cover.Tests
npm run typecheck— cleannpm test— 2380/2380 passingopenclaw/dist/.Test plan
journalctl --user -u openclaw-gateway -e | grep 'Auto-update check'should show no "operation was aborted due to timeout" lines./hivemind_versionfrom inside the agent. Should return theUpdate available / up to datemessage, not "Could not check for updates."Summary by CodeRabbit