Skip to content

fix: avoid false Gateway failures during cold starts - #153063

Merged
steipete merged 7 commits into
mainfrom
upd/doctor-probe-budget
Sep 20, 2026
Merged

steipete merged 7 commits into
mainfrom
upd/doctor-probe-budget

Conversation

@steipete

@steipete steipete commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes false Gateway timeout and unreachable reports when Doctor, deep status, or channel status runs during a slow cold start.

Fixes #152970. Thanks to @Suidge for the report and startup measurements.

User Impact

Local startup diagnostics use the shared 60-second readiness allowance, report the observed startup phase, and leave a Gateway that is still starting alone. Existing explicit timeouts remain bounded. Provider usage receives the remaining shared budget; aggregate and synthetic usage collection consume one deadline. Exhaustion reports Timeout without new auth or usage requests, and expiry cancels active usage requests. A genuinely unreachable Gateway still reports failure. Remote targets and credential diagnostics retain their existing selection and authentication paths.

Why This Change Was Made

The initial probes used one-shot request limits, while the longer polling behavior only covered restart paths. A refused connection returns immediately, so changing a numeric timeout alone cannot fix the pre-listener case. The commands now use the existing waitForGatewayHealthyRestart readiness owner, consume the remaining budget for their requests, and preserve startup as a separate outcome through text and JSON status. Doctor's duplicate post-restart polling loop is removed.

Startup HTTP data does not override process/listener ownership, generation changes, or observed version/build/plugin/channel failures. No new configuration, CLI flags, dependencies, database schema, or service mutations are introduced.

Evidence

Landing review dispositions (2026-09-20)

The latest ClawSweeper review covers 9f7d3b88b140165f74cdd978ebbff493b59319d4 and reports no actionable correctness or security finding. Its remaining merge-readiness requests are resolved as follows:

  • Startup-result compatibility: accepted. A Gateway observed still starting may return exit 0 with { "status": "starting", "startupPhase": "…" } from health or channel status. This is an intentional best-effort diagnostic outcome, documented in both CLI guides. Consumers requiring a complete snapshot must distinguish this payload and rerun after startup; exit 0 alone does not promise a complete snapshot. Genuine unreachable/process/version/build failures retain their failure reporting. The installed Linux and published-updater matrix below supports the intended operational contract, not arbitrary external consumer compatibility.
  • Config/default compatibility: reviewed. No configuration keys, CLI flags, dependencies, or stored configuration shapes change. The omitted diagnostic timeout becomes the shared 60-second allowance; an existing explicit --timeout remains bounded. Remote and explicit-URL targets retain target/auth selection while consuming the same monotonic deadline. Operators that need the earlier bound can retain an explicit timeout.
  • Data-model compatibility proof: no migration required. The Doctor changes reuse readiness and remove duplicate polling; this patch changes no SQLite schema, durable data shape, retention, or migration transform. The existing published 2026.9.5 updater-to-candidate Doctor cell demonstrates the upgrade entry path. A new migration/backfill test would not exercise a changed contract.
  • Earlier provider-budget rank-up moves: fixed. Exhaustion prevents new auth/usage dispatch, expiry cancels active usage work, and the real-loader/client regressions and 592-case Linux run below cover those repairs. No new rank-up code change is needed for this reviewed head.

Release-note context: avoid false Gateway failure reports during slow cold starts by sharing the readiness deadline across Doctor, health, and status diagnostics, preserving startup progress and cancelling usage work when its remaining allowance expires. Thanks to @Suidge for the report and startup measurements.

Exhausted usage budget: fixed at 03f761445e78885b5f0f510c62415948ab4f932a

The confirmed P2 started provider work before racing the remaining allowance, then returned Timeout without cancelling that producer.

Rank-up dispositions:

  • Prevent provider dispatch after exhaustion while retaining visible Timeout results: fixed at 03f761445e78885b5f0f510c62415948ab4f932a. src/infra/provider-usage.load.ts:114 returns provider Timeout snapshots before fetch setup or auth dispatch when the allowance is exhausted. Active work receives an abort signal from the usage timeout owner; ordinary fetches, ClawRouter, configured OpenRouter transports, and the Codex client all consume it. Auth helpers and late auth results check cancellation before further work. Completed sibling snapshots remain available.
  • Exercise the real usage loader and verify an exhausted allowance starts no provider request or Codex client: fixed at 03f761445e78885b5f0f510c62415948ab4f932a. Eight real-loader regressions failed against the original usage owner; three Codex cancellation cases failed against the original request owner. The tests use simulated clocks and controlled promises, with real loader/timeout code. They cover initial and synthetic follow-up exhaustion, no auth/fetch dispatch, fetch abortion, caller-signal preservation, late auth, and cancellation before/during client acquisition or a request.

Final regression names include returns Timeout without auth or fetch dispatch for an exhausted budget (synthetic: %s), cancels the usage fetch (%s signal, caller abort: %s), does not dispatch usage after auth completes beyond the deadline, rejects a retained %s auth helper after the usage deadline, does not acquire a usage client after its owner has aborted, and aborts usage %s when the outer deadline expires.

Validation: 592 passing tests across 37 files on isolated Linux Blacksmith Testbox, Node 24.19.0, including the six Commander usage-routing cases and the status, Doctor, readiness, usage/auth, and transport siblings. The native wrapper ran corepack pnpm install --frozen-lockfile, verified 86 source/package SHA-256 checksums, then ran CI=1 node scripts/run-vitest.mjs with the 37 focused files. Testbox run 35485042520, lease tbx_01m2ybj7tz3vb277shhj5n8z8b: passed 9 Vitest shards, exitCode: 0, runStatus: succeeded; the owned lease was stopped after success. Locally, the real usage/auth suites passed 81 cases and all five transport suites passed 94 cases. Fresh P1 autoreview is scoped-clean; the SDK surface check passed without baseline changes. node scripts/check-changed.mjs passed every preceding gate, including all four typecheck lanes, core lint, Doctor contracts, and dead-export scans, then stopped at the documented nested-checkout extension-lint artifact (Declaration input escapes checkout through ancestor node_modules). The prescribed direct oxlint --tsconfig test/tsconfig/tsconfig.extensions.test.json substitute passed all ten changed extension files; every remaining planned guard also passed, including schema, database-first, media, runtime-sidecar, import-cycle, webhook, and both pairing checks. CI remains the authority for extension boundary preparation.

Canary (temporary debugger, then reverted):
extensions/clawrouter/usage.ts:175:1: error eslint(no-debugger): `debugger` statement is not allowed help: Remove the debugger statement
Restored candidate, same direct oxlint command: exit 0; no diagnostics (10 files).

The local full status run hit the existing 120-second limit in the unchanged snapshot-sharing fixture (129.7 seconds observed; 106.6 seconds in the earlier green run). The identical fixture passed on Linux in 7.817 seconds; the fixture, its 120-second limit, and all assertions remain unchanged. The first Testbox invocation failed before allocating a lease because explicit environment forwarding is unsupported by Blacksmith; removing that invocation-only setting allowed the successful run above.

This repair changes production +116/−70 (net +46), tests +289/−7 (net +282), and docs +14/−1 (net +13) across 18 files. The redundant unsupported-provider wrapper was removed. Necessary growth carries cancellation across the existing transport boundaries; no new configuration, CLI options, environment controls, dependencies, schema changes, or larger timeouts were introduced. Shared credential refresh remains auth-owned and tracked; cancellation stops further usage work after it settles instead of interrupting a shared credential writer. The prior published-updater evidence below is retained as historical proof. This repair stops after publication to the PR; it does not land or wait for CI.

Latest CI repair at b7e6ec709e1730eb60c1055aa59538e4ce52121b: both reported failures came from whole-module gateway/call test fixtures that omitted isImplicitLocalGatewayTarget, newly used by diagnostic readiness. Doctor's missing isGatewayCredentialsRequiredError was a secondary error in its catch path; the channel route fell back before its expected RPC. Both fixtures now spy only on callGateway, leaving readiness and hosted routing real. No mocked exports were added and no assertions were removed. The hosted test additionally asserts authenticated success and the initial numeric budget; the channel test retains its exact RPC/JSON assertions and both cold-import guards. With a simulated clock, the actual probe allowance is 60,000 ms, derived from the shared restart-health default instead of the stale 10,000/30,000 ms expectations.

Pristine origin/main at c5ad7506abae9a2e88f1492065204523f31d82a1 passed both unchanged files (6/6 cases) in a detached physical checkout with a separate frozen dependency install. The repaired pair also passed 6/6. Unmodified local branch attempts hit collection/late worker-compilation limits; the saved exact-head CI logs provide the missing-export and zero-RPC assertions. No test timeouts or production budgets were increased.

Final follow-up validation: 385 passing cases across 24 files, including all six usage-routing cases. After replacing an unsafe test call-array index with the equivalent type-safe first-call matcher, the affected pair passed again (6/6). node scripts/check-changed.mjs passed for the full PR scope. Fresh independent P1 review of the test-only diff is scoped-clean. This follow-up changes production +0/−0; tests +29/−15 (net +14) across src/commands/doctor-hosted-gateway.test.ts and src/cli/channels-status-cold-imports.test.ts. CI attachment: run 35476688095, confirmed for this exact head by the native watcher. This was an attachment-only precheck; its one-second completion phase timed out and CI completion was not awaited. Failed CI jobs were not rerun; the new head received its own CI. This PR remains open and unmerged.

Review finding disposition at 59bd2b0444018564c10379acbaf9d8527b635565: accepted and fixed. Remote and explicit-URL targets skipped local readiness, leaving no shared deadline and granting later probes fresh allowances. Both status entry points now create one monotonic deadline before awaited work; internal scan/runtime/usage contracts require it. Scan results no longer carry or reconstruct the deadline. Local readiness receives the same deadline, including authentication preparation and settling. The common health/channels/Doctor adapter also starts its deadline before target/auth resolution and derives its remainder from the clock, rather than readiness-only elapsed time.

The remote status --usage --deep regression failed before the repair: usage received 60,000 ms after the initial probe consumed 22,000 ms. Text, Commander JSON, and fast JSON now assert 60,000 → 38,000 → 30,000 → 25,000 ms for the initial probe, usage, health, and heartbeat. Four additional failing-before cases proved that target/auth preparation must count even when readiness is deferred or reports a shorter elapsed time. Fractional timing still produces schema-valid integer RPC timeouts. Existing update, Tailscale, and native-service bounds remain separate and unchanged.

Rebased onto a8c423006e100cfc65967c6f2da97f6e6d549630 to clear the CI precheck conflict. The real-socket fallback test retains main’s deterministic startup/request coordination and verifies the remaining 100 ms allowance. Installed dependencies were refreshed from the unchanged frozen lockfile after main’s fs-safe update.

Final validation on that rebased candidate: 379 passing cases across 22 files, including the six usage-routing budget cases, remote command regressions, scan/projection/runtime siblings, readiness/auth/settling owners, and health/channels/Doctor paths. node scripts/check-changed.mjs passed on the full PR scope; fresh P1 autoreview is scoped-clean. Two unchanged channel-fixture helpers were extracted from the oversized status suite to satisfy its existing line-count ratchet; no assertions, baselines, or suppressions were removed or weakened.

The prior deadline repair changed production +207/−170 (net +37), tests/support +500/−188 (net +312), and docs +1/−1. CI attachment: run 35469468829, confirmed for this exact head by the native watcher precheck. Completion is left to the landing workflow; this PR has not been merged.

The following Testbox evidence covers the original implementation at 0d147b44e3b3dbaa9cfc6eb6123c1ed11983d08f, before this rebase and usage repair; it was not rerun for the follow-up.

Linux Blacksmith Testbox: run 35453572906, lease tbx_01m2x6brkd3svwp10epv8q7csp, Node 24.19.0. All runtime state and ports were isolated. Startup delay used an existing plugin service with activation.onStartup, without a production delay option.

Cell Result
Published 2026.9.5; 35-second blocking startup Doctor printed gateway timeout after 10000ms; deep status exited 1 with the same timeout; channels reported unreachable. The same Gateway subsequently became ready.
Installed candidate; same blocking startup All three commands succeeded after about 35–36 seconds; channel status returned Gateway reachable.
Installed candidate; 25-second asynchronous startup All three printed startup-sidecars and succeeded after about 25–26 seconds.
Candidate CLI; published 2026.9.5 Gateway All three reported the startup phase and succeeded.
Actually down Gateway All three reported unreachable after the shared 60-second probe allowance; deep status exited 1. Doctor and channel status preserved their reporting exit behavior.
Published updater → candidate Doctor Unmodified 2026.9.5 updater installed the local tarball with --no-restart, returned status: ok, and ran candidate Doctor with successful exit/IPC observations. Installed build metadata exactly matched the candidate tarball.

The final candidate matrix and published-updater payloads exited successfully with their assertions, and the owned lease was stopped after proof. The linked Actions run tracks the Testbox lease lifecycle.

Candidate tarball SHA-256: b31a6b2979b1a7a606dec27220629eded7157fcff0a49c0aa9b0cfd945f70702.

Simulated-clock regressions were demonstrated failing before their fixes: delayed readiness, pending versus unreachable output, auth deferral, and preservation of process/version/build failures. The actual channel request validator also rejected fractional remaining time before the integer-millisecond fix.

Original validation: 513 command/flow cases, 376 follow-up cases, 317 owner/budget cases, and the final 105 Doctor/health/channel cases passed (overlapping focused runs). The final status suite passed 30 cases. Changed-file guards/typechecks and full changed-source lint/format passed; P1 autoreview is scoped-clean. The full changed-file run was followed by a scoped rerun for the final rounding/private-export fixes and full-scope lint, preserving the same gates.

Current PR numstat: production +834/−371 (net +463), tests/support +1630/−327 (net +1303), docs +30/−5 (net +25). Production growth exceeds the initial net-zero estimate because startup state, ownership checks, and remaining budgets must reach the existing diagnostic/rendering boundaries; removing the duplicate Doctor loop offsets only part of that work.

Probe inventory before this change
Site Previous allowance
Doctor initial status 10,000 ms
Doctor health contribution 3,000 ms noninteractive; 10,000 ms interactive
Doctor post-restart health Separate 60-second polling loop with 10,000 ms requests
Doctor recent-restart handoff 10,000 ms
Health command / generic transport fallback 10,000 ms
Commander status, health, and channel status registration Injected 10000, unlike fast-route omitted defaults
Channel status implementation 10,000 ms ordinary; 30,000 ms probe when registration did not override it
Initial status probe 2,500 ms ordinary; 5,000 ms all
Online JSON status 1,000 ms probe plus parallel 10,000 ms status RPC
Local status RPC fallback 2,000 ms cap and an implicit 1,000 ms floor
Deep status health Inherited 10,000 ms transport limit
Later status channel/status data 8,000 ms channel parameters, 2,500/5,000 ms transport, and 5,000 ms status cap
Status-all later diagnostics 5,000 ms diagnostics and 8,000 ms health caps

Short post-readiness diagnostic limits now respect the remaining startup/probe deadline. Doctor retains its established adaptive post-status channel/exporter diagnostics. Generic non-diagnostic RPC defaults, native service-manager checks, standalone multi-target Gateway discovery, Doctor memory inspection, and direct provider capability probes retain their separate contracts.

@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 gateway Gateway runtime cli CLI command changes commands Command implementations size: XL maintainer Maintainer-authored PR labels Sep 19, 2026
@clawsweeper clawsweeper Bot added 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. 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 20, 2026, 2:40 AM ET / 06:40 UTC (Revision 10).

ClawSweeper review

What this changes

Gateway diagnostics share a readiness deadline, distinguish ongoing startup from failure, and cancel provider usage requests when their allowance expires.

Merge readiness

⛔ Blocked before merge - 3 items remain

This PR remains useful: current main still has the initial cold-start diagnostic failure. The prior cancellation finding is resolved, the maintainer has accepted the startup-result compatibility tradeoff, and this review found no remaining actionable defect.

Priority: P2
Reviewed head: 9f7d3b88b140165f74cdd978ebbff493b59319d4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, well-supported repair with resolved prior findings and an explicitly accepted compatibility tradeoff.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The hash-matched PR body records installed Linux Doctor/status/channel recovery through the real readiness path and a published-updater-to-candidate Doctor cell. That runtime matrix predates the cancellation follow-up, whose separately recorded regression coverage is supplemental; it does not invalidate the retained startup proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The hash-matched PR body records installed Linux Doctor/status/channel recovery through the real readiness path and a published-updater-to-candidate Doctor cell. That runtime matrix predates the cancellation follow-up, whose separately recorded regression coverage is supplemental; it does not invalidate the retained startup proof.
Evidence reviewed 9 items Pinned change and clean checkout: The complete local merge-base-to-head file list contains 85 paths, including the five omitted from the bounded introduction listing. Live GitHub still identifies the pinned head as open, unmerged, and cleanly mergeable. git diff --check passed and the working tree remained clean.
Current main still needs the repair: Fetched main retains a single initial status RPC with a 10,000 ms default in checkGatewayHealth; it does not call the proposed diagnostic readiness adapter.
Latest release retains the reported boundary: The published v2026.9.5 source likewise uses the 10,000 ms initial Doctor probe. The release blob was inspected through GitHub after local historical blob retrieval failed.
Findings None None.
Security None None.

How this fits together

Doctor, health, and status commands inspect the Gateway and report its condition to operators. The shared readiness owner combines service identity, listener ownership, and Gateway responses before allowing further diagnostic requests.

flowchart TD
  A[Diagnostic command] --> B[Shared deadline]
  B --> C[Local or remote target]
  C -->|Local| D[Service and startup checks]
  C -->|Remote| E[Gateway and provider probes]
  D -->|Ready| E
  D -->|Still starting| F[Startup progress result]
  D -->|Failed| G[Diagnostic failure]
  E --> H[Health and status report]
Loading

Before merge

  • Resolve merge risk (P1) - External scripts assuming exit 0 always supplies a complete health/channel snapshot may need to handle the starting payload; this tradeoff is explicitly accepted, but arbitrary consumer compatibility is untested.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net +463 lines; tests/support net +1,310 lines The body justifies production growth by carrying startup state and deadlines through existing command boundaries while removing Doctor's duplicate loop.
Diagnostic compatibility 60-second omitted timeout; 2 commands gain a starting JSON outcome Health and channel-status consumers must distinguish pending startup from a complete snapshot.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-gateway-daemon-flow.ts, migration/backfill/repair: src/commands/doctor-gateway-health.ts, unknown-data-model-change: src/commands/doctor-gateway-daemon-flow.ts, unknown-data-model-change: src/commands/doctor-gateway-health.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #152970
Summary: This PR addresses the reported initial diagnostic cold-start race; related work does not supersede its broader coverage.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Retain the accepted diagnostic contract (recommended)
    Proceed with the documented starting payload and optional provider cancellation signals under the compatibility disposition already recorded in the PR body.

Technical review

Best possible solution:

Retain the accepted best-effort startup contract through the shared readiness owner, with bounded probes, visible pending results, and cancellation at existing transport boundaries.

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

Yes: current-main Doctor still makes the initial one-shot status request, and the captured installed-package matrix demonstrates failure during delayed startup. This read-only review did not execute a fresh reproduction.

Is this the best way to solve the issue?

Yes: reusing the existing readiness owner removes competing polling while preserving target selection, ownership checks, and bounded requests; the output compatibility choice is explicitly accepted.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This fixes misleading cold-start diagnostics without changing normal message delivery or Gateway availability.
  • merge-risk: 🚨 compatibility: The documented pending-startup result changes health/channel JSON expectations, and provider usage hooks gain optional cancellation semantics.
  • 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 (live_output): The hash-matched PR body records installed Linux Doctor/status/channel recovery through the real readiness path and a published-updater-to-candidate Doctor cell. That runtime matrix predates the cancellation follow-up, whose separately recorded regression coverage is supplemental; it does not invalidate the retained startup proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The hash-matched PR body records installed Linux Doctor/status/channel recovery through the real readiness path and a published-updater-to-candidate Doctor cell. That runtime matrix predates the cancellation follow-up, whose separately recorded regression coverage is supplemental; it does not invalidate the retained startup proof.

Evidence

What I checked:

  • Pinned change and clean checkout: The complete local merge-base-to-head file list contains 85 paths, including the five omitted from the bounded introduction listing. Live GitHub still identifies the pinned head as open, unmerged, and cleanly mergeable. git diff --check passed and the working tree remained clean. (9f7d3b88b140)
  • Current main still needs the repair: Fetched main retains a single initial status RPC with a 10,000 ms default in checkGatewayHealth; it does not call the proposed diagnostic readiness adapter. (src/commands/doctor-gateway-health.ts:295, d0192ed506c8)
  • Latest release retains the reported boundary: The published v2026.9.5 source likewise uses the 10,000 ms initial Doctor probe. The release blob was inspected through GitHub after local historical blob retrieval failed. (src/commands/doctor-gateway-health.ts:155, ec9c1a13db89)
  • Prior finding repaired: Exhausted usage budgets return visible Timeout snapshots before fetch setup or authentication dispatch. Active work receives cancellation, checks it after authentication, and combines it with caller fetch signals; the focused regressions cover exhaustion, late auth, retained helpers, and client cancellation. (src/infra/provider-usage.load.ts:114, 9f7d3b88b140)
  • Startup identity safeguards: The readiness owner rejects generation changes and observed version/build failures; explicit HTTP startup requires the running process to own all observed listeners before yielding still-starting. Diagnostic callers preserve remote targeting and defer unavailable shared credentials to the existing authentication path. (src/cli/daemon-cli/restart-health.ts:463, 9f7d3b88b140)
  • Complete captured proof and dispositions: Read the full 17,988-unit PR body and verified SHA-256 cceb30d98dc70042f6d20b739acb82a6ae3d29ce8abb13deecc17c7f13e12bd5 matches the supplied snapshot. It records installed Linux recovery at 25–36 seconds, an actually-down control, candidate CLI against the published Gateway, and the unmodified 2026.9.5 updater invoking candidate Doctor. That matrix covers the original implementation; later cancellation work has separately recorded failing-before regressions and a 592-case Linux run. The body explicitly accepts the starting payload and explains why no data migration applies. (9f7d3b88b140)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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 (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-19T20:06:44.857Z sha 736eefb70981fcfa760322adcca4258c81ef3fd8 :: blocked before merge. :: [P2] Stop provider work when the shared usage budget is exhausted
  • reviewed 2026-09-19T20:59:28.178Z sha 78dd34241c0ad34f88e0705af647761ef33cbb02 :: blocked before merge. :: [P2] Stop provider work when the shared usage budget is exhausted
  • reviewed 2026-09-19T21:16:12.624Z sha 59bd2b0 :: blocked before merge. :: [P2] Stop provider work when the shared usage budget is exhausted
  • reviewed 2026-09-19T23:47:33.590Z sha b7e6ec7 :: blocked before merge. :: [P2] Stop provider work when the shared usage budget is exhausted
  • reviewed 2026-09-20T00:37:44.033Z sha b7e6ec7 :: blocked before merge. :: [P2] Stop provider work when the shared usage budget is exhausted
  • reviewed 2026-09-20T03:11:42.819Z sha 03f7614 :: blocked before merge. :: none
  • reviewed 2026-09-20T04:14:49.174Z sha aba308f535f619f0d44575ef0471c6c302a7e0ce :: blocked before merge. :: none
  • reviewed 2026-09-20T05:35:52.976Z sha 9f7d3b8 :: blocked before merge. :: none

@steipete
steipete force-pushed the upd/doctor-probe-budget branch from 0d147b4 to 736eefb Compare September 19, 2026 19:58
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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
@steipete
steipete force-pushed the upd/doctor-probe-budget branch from 78dd342 to 59bd2b0 Compare September 19, 2026 21:07
@clawsweeper clawsweeper Bot added 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. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 20, 2026
Use shared progress-aware readiness for Doctor, health, status, and channel
status. Preserve authentication, target selection, update identity checks,
and remaining request budgets while reporting pending startup separately.

Remove Doctor's duplicate restart polling and keep RPC timeout values in
integer milliseconds. Regression tests and isolated package proof cover
slow startup, genuinely down Gateways, and published-updater compatibility.

Repair two stale config imports that blocked the baseline build/typechecks.
Reported by @Suidge in #152970.
Pass the remaining readiness budget into provider usage instead of relying
on its unrelated default. Keep aggregate and synthetic usage collection
under one deadline and preserve visible provider timeout outcomes.

Retain exact Commander routing assertions and cover default, explicit,
remaining, and exhausted budgets with a simulated clock.
@steipete
steipete force-pushed the upd/doctor-probe-budget branch from aba308f to 9f7d3b8 Compare September 20, 2026 05:28
@steipete
steipete merged commit 1b3f38e into main Sep 20, 2026
215 checks passed
@steipete
steipete deleted the upd/doctor-probe-budget branch September 20, 2026 06:53
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 21, 2026
Avoid false Gateway timeout and unreachable reports during slow cold starts. Doctor, health, and status diagnostics now reuse the existing readiness owner and one monotonic deadline, preserve observed startup progress, and leave a Gateway that is still starting alone. Remove Doctor's duplicate restart polling loop.

Provider usage consumes the remaining allowance, reports Timeout before dispatch when exhausted, and cancels active usage work on expiry. Preserve explicit timeouts, target/auth selection, and real process/version/build failures.

Health and channel-status JSON can return a documented non-failing starting payload; consumers that need a complete snapshot must distinguish it and rerun after startup. No new configuration, flags, dependencies, or stored-data migration.

Validation: 592 cases across 37 files on isolated Linux Testbox; installed-package cold-start/down-Gateway matrix and unmodified 2026.9.5 updater-to-candidate Doctor proof; focused command/transport regressions and changed-file gates. The existing independent review is scoped-clean, and ClawSweeper reports no actionable correctness finding.

Thanks to @Suidge for the report and startup measurements.

Fixes openclaw#152970.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: clawrouter Extension: clawrouter extensions: codex extensions: openrouter gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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: XL 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.

[Bug]: doctor probe timeout is hardcoded at 10s but Gateway cold start takes 17-22s on loaded installs — false 'gateway timeout' failures

1 participant