Repository navigation
Conversation
Stable installs without auto-update take the available version from the telemetry ping cache, which Gateway maintenance refreshes on its own daily deadline. The Gateway update check only re-read that cache every 24 hours and then returned early on its own 24-hour throttle, so a release could reach update.status, the sidebar card and the inbox up to two days after it was published. Re-read the local cache hourly for stable package installs and let a cached release newer than the one already published bypass the daily throttle. Auto-update, beta, extended-stable and dev paths keep their npm lookups and throttles.
|
🦞👀 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. What this changesThis PR checks cached stable-release availability hourly and publishes newer cached releases without waiting for the daily discovery throttle. Example: OpenClaw 2026.10.6 runs on stable with automatic updates disabled, a discovery check from one hour ago, and telemetry already caching 2026.10.7.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a source-confirmed delay that remains on current main, using the existing update owner without introducing competing state or policy; no actionable patch defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway maintenance refreshes the shared telemetry cache; the update-check lifecycle consumes that cache and saved channel policy, then publishes availability to status RPCs and connected clients. flowchart LR
A[Gateway maintenance] --> B[Telemetry cache]
C[Update scheduler] --> D[Update discovery owner]
B --> D
E[Saved update policy] --> D
D --> F[Availability and schedule]
F --> G[Status RPC and Control UI]
Technical reviewBest possible solution: Merge the focused discovery-owner fix once the required checks pass, preserving the existing telemetry cadence, consent gates, and automatic-update policy. Do we have a high-confidence way to reproduce the issue? The daily scheduler and early throttle return establish the failure on current main, and the contributor supplies matching before/after Gateway output; this read-only review ran no target code. Is this the best way to solve the issue? The patch addresses both necessary causes within the existing owner: hourly cache observation and publication of newer cached releases despite the daily throttle. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1ba6f92d4074. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +12, Tests +130, Docs +2. Total +144 across 3 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 23, 2026, 5:58 PM ET / 21:58 UTC. |
|
Merged via squash.
|
…ck (openclaw#181949) * fix(update): show new releases without waiting for a second daily check Stable installs without auto-update take the available version from the telemetry ping cache, which Gateway maintenance refreshes on its own daily deadline. The Gateway update check only re-read that cache every 24 hours and then returned early on its own 24-hour throttle, so a release could reach update.status, the sidebar card and the inbox up to two days after it was published. Re-read the local cache hourly for stable package installs and let a cached release newer than the one already published bypass the daily throttle. Auto-update, beta, extended-stable and dev paths keep their npm lookups and throttles. * Merge branch 'main' into fix/update-notice-telemetry-throttle Co-authored-by: Holger Gruenhagen <[email protected]>
What Problem This Solves
Fixes: a new stable release reaches
update.status, the sidebar update card and the Control UI inbox up to two days after it was published, whileopenclaw update statusreports it right away, when the Gateway runs thestablechannel without automatic updates.User Impact
User impact: the Gateway update notice shows a new stable release within an hour of the daily telemetry check that found it, instead of waiting for the update check's own next daily run.
Affected: every package install on the default
stablechannel withupdate.auto.enabledoff (the default) and update checks on (the default). The same applies with auto-update on when an external supervisor owns updates, because that path also takes the version from telemetry. Auto-update,beta,extended-stableanddevkeep their npm lookups, throttles and rollout delays unchanged.Why This Change Was Made
Two daily timers run independently and the notice needs both:
telemetry.openclaw.ai/api/latest-versionand caches the answer for 24 h (telemetry.updateCheck,src/infra/telemetry.ts, re-run every 5–10 min insrc/gateway/server-maintenance.ts, effective once per day). CLI runs refresh the same cache.runGatewayUpdateCheck,src/infra/update-startup.ts) reads that cache only when its own task runs: at startup and then every 24 h (resolveCheckIntervalMs), and it returns early when its last check (update.checkState.lastCheckedAt) is less than 24 h old. For stable without auto-update the version comes only from the cache (version: telemetryUpdate?.version).So a release found by the maintenance ping waits until the update check's next daily run, and a Gateway restart in between skips the check on the throttle. The seam is between the telemetry cache owner and the update-check owner; this change lets the update check follow the cache:
lastAvailableVersionmatches and the throttle applies again.src/infra/update-startup.ts)src/infra/update-startup-cached.test.ts)docs/gateway/telemetry.md)No new scheduler, no new state, no change to the telemetry request or its consent rules.
Evidence
Production timeline (2026.10.5 installed, stable, auto-update off):
latestupdate.checkState{"lastCheckedAt":"2026-10-22T16:36:36.554Z","lastNotifiedVersion":"2026.10.5"}, nolastAvailableVersion{"lastPingAt":1792723419731,"latestVersion":"2026.10.6"}update.status→updateAvailable: null; inbox shows nothing;openclaw update statusshows 2026.10.6update.checkState{"lastCheckedAt":"2026-10-23T21:17:44.423Z","lastNotifiedVersion":"2026.10.6","lastAvailableVersion":"2026.10.6"},update.status→updateAvailable: {"currentVersion":"2026.10.5","latestVersion":"2026.10.6","channel":"latest"}The worst case is close to 48 h: a ping just before the release keeps the old version for 24 h, and the update check can run just before that cache expires.
Live before/after on an isolated Gateway (loopback, own state, package copy without
.gitso the install is detected aspackage,OPENCLAW_TELEMETRY_ENDPOINTpointed at a local stub that answers with the installed version). Same script for both builds:2026.10.7;update.status.update.status.updateAvailableafter restartupdate.checkStateafter restart7845dd3eb29null(17:00:17Z)lastCheckedAt1 h oldfce5dc4dbe3{"currentVersion":"2026.10.6","latestVersion":"2026.10.7","channel":"latest"}(17:16:03Z)lastAvailableVersion: "2026.10.7",lastNotifiedVersion: "2026.10.7"No telemetry request reached the stub during step 3 in either run; both builds used the cached value.
Fix run, step 3 (excerpt)
Tests (Linux, Node 24.22.1,
--maxWorkers=1):src/infra/update-startup-cached.test.ts: 9 passed, 64 s. New cases run the realrunGatewayUpdateCheck/createGatewayUpdateCheckowners against the state DB with the scheduler test clock (no sleeps or timers): cached release published within the throttle (new, and newer than an already published one); throttle kept when the cached release is already published or not newer; auto-update throttle unchanged (no npm lookup); hourly scheduled re-read publishes a refreshed cache one hour later.src/infra/update-startup*.test.ts,src/infra/telemetry*.test.ts,src/gateway/server-startup-update-check.test.ts,src/gateway/server-methods/update-*.test.ts,src/cli/update-cli.candidate-activation.test.ts, …), 322 passed, 724 s.oxfmt --check,oxlint --type-awareon changed files,check-test-mock-exports: clean.Gap: the hourly re-read was not observed live (it needs an hour of wall-clock time per run); it is covered by the scheduler-clock test above.
Context: #64807 reported the same class (dashboard uses a throttled Gateway cache, CLI checks live) before the telemetry cache existed; it was closed by the reporter without a code change. #128424 introduced the daily telemetry ping that added the second 24 h layer.