Skip to content

refactor(async): deslop bounded waits and retry ownership - #165340

Merged
steipete merged 3 commits into
mainfrom
deslop/l378-retry-timeout2-batch-20261004
Oct 5, 2026
Merged

steipete merged 3 commits into
mainfrom
deslop/l378-retry-timeout2-batch-20261004

Conversation

@steipete

@steipete steipete commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Modules repeatedly implement the same bounded wait, cancellation observation, and retry-delay plumbing. This second-round cleanup reuses the existing owners and removes 598 net production lines across 95 production files, following #164278. The final count excludes cleanup already landed by parallel work and retains the Anthropic read owner whose cancellation ordering is not interchangeable with a generic promise race.

User Impact

The refactor preserves retry counts, delay schedules, timeout budgets, cancellation/error surfaces, configuration, protocol shapes, and resource-settlement boundaries. It also fixes two cleanup defects described below. No migration or operator action is required.

Why This Change Was Made

The existing retry package now owns the optional cancellation listener together with the timeout timer. Matching callers use that owner instead of maintaining separate races and cleanup branches. Domain-specific loops remain where they own authority checks, physical cleanup, clock behavior, or different retry semantics.

  • Consolidate matching abort/timeout races across core, plugins, packages, and the UI onto existing helpers, keeping each caller's error mapping and timer reference behavior.
  • Remove the single-use Code Mode deadline module while preserving both the scope deadline and each wait's deadline.
  • Simplify Mattermost reconnect policy and Tlon's unused internal retry options without changing their production schedules.
  • Replace plain positive-delay wrappers with existing sleep helpers; retain distinct native and controlled-clock scheduling where substitution changes behavior.
  • Remove the one-use update completion-report result wrapper while preserving original errors and cleanup ownership.

Fixes found along the way

  • WhatsApp QR startup: a deadline could reject before socket bootstrap finished and before a rejection observer attached. The deferred result now carries the same visible failure without an unhandled rejection.
  • Worker reconnect: failure during the second runtime-refresh preparation could leave its reconnect timer armed. Preparation now sits inside the timer's cleanup lifetime, while acquired admission facts retain their own release boundary.

The shared helper also covers an already-aborted signal combined with a synchronously throwing operation factory, preserving synchronous cleanup and observing the deadline rejection.

Evidence

  • Both existing-bug regressions failed against their original source and passed against the candidate on Linux.
  • Independent review found no actionable P0–P2 findings. Conflict-only rebases preserve the reviewed implementation, retain main's obsolete-import removal, and drop the already-merged Feishu cleanup. The resolved Twilio synthesis block exactly matches the reviewed block. Final correction head: 6b5d24135f8bbf13eb105dbe46b5679e3c69af3f. Fresh independent review of the correction found no actionable P0–P2 findings.
  • Both final-head cycle checks pass: zero Madge cycles and zero runtime-value cycles. Main's approval-descriptor and skills-watcher cycle fixes are included in the base.
  • Earlier focused UI proof passed 12 files / 312 tests; browser and Codex selections passed 14 files / 172 tests. Additional core projects passed; interrupted or failed stages are not counted as passing proof.
  • Canonical SDK API comparison passed (digest 27c9bc10): no added/removed entrypoints. Its 131 reachable-export notices deduplicate to optional signal/onAbort on the existing timeout helper and deletion of private GatewayClient.createPendingStop; there are no newly required public arguments.
  • Focused local proof passed all 13 files / 243 tests in 657 seconds, including the full WhatsApp QR suite (27 tests), full worker reconnect suite (29 tests), and retry helper (23 tests). This covers all 11 changed test files plus the two Code Mode replacement suites.
  • Rebased-head proof passed 51 files / 1,207 tests in 937 seconds: all 1,140 plugin-contract tests, 35 iMessage tests, and 32 Twilio/realtime tests. Full changed-file checks are intentionally delegated to exact-head hosted CI under maintainer direction.
  • The later import-only rebase exposed two local launchd-suite failures: the successful-handoff case exceeded its existing 120-second test deadline, and the failed-handoff case observed one start instead of two. The two other cases passed. These failures remain recorded and are under investigation; no assertion, timeout, or retry was weakened. They are not claimed as an inherited-CI exception.
  • A single reconnect-regression rerun after that rebase also exceeded the existing 120-second test deadline. The same regression previously passed in the complete 29-test suite and in Linux original/candidate proof; its later timeout remains unresolved and is not counted as passing evidence. Exact-head hosted CI is the landing gate.

This is one explicitly approved below-1,000-line batch. The attached coverage comments contain 1,116 fully read production files over 200 lines, sorted by size with individual outcomes, and 282 separate protected/scan-only/partial exclusions. This is coverage of the retry/timeout/abort implementation scope, not a claim to have read every unrelated monorepo file or exhausted every possible cleanup.

Coverage log: part 1, part 2, part 3, part 4, part 5, part 6, part 7.

CI correction proof: targeted lint passes; update VM fixture 19/19 tests (7.74s); Windows liveness fixture 3/3 and Feishu async 5/5 (24.52s command); Anthropic accepted-work ownership case passes after restoring its original read implementation (123.11s command, 1 selected case). The first hosted run caught the type/lint/fixture issues and the unsafe Anthropic consolidation; all were corrected without weakening assertions or adding retries.

The next hosted run passed 103 jobs, including every test and type check; its only failure was Matrix repeating the deferred helper's default void type argument. That argument is now removed, with fresh independent review and zero cycles. The focused local extension-lint wrapper timed out preparing SDK declarations before lint ran; no local lint pass is claimed for this final one-line fix.

@clawsweeper

clawsweeper Bot commented Oct 5, 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 channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: voice-call Channel integration: voice-call channel: whatsapp-web Channel integration: whatsapp-web app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling channel: feishu Channel integration: feishu extensions: openai extensions: fal extensions: qa-lab extensions: codex plugin: file-transfer extensions: copilot extensions: active-memory extensions: browser extensions: comfy size: XL labels Oct 5, 2026
@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Retry/timeout coverage log — part 1/7

Full READ inventory

Lines at read Production file Outcome / retained contract
9999 apps/ios/Sources/Model/NodeAppModel.swift READ — Retain: existing shared app pause/poll owners already centralize matching behavior; canonical transport backoff differs, while remaining timers own UI, authority, expiry, or settlement contracts.
9252 apps/android/app/src/main/java/ai/openclaw/app/chat/ChatController.kt READ — Retained: native coroutine delay is already canonical; question retry budgets reset on state revision, swarm retries retain cancellable generation leases, and outbox/watchdog delays fence durable ownership and reconcile authoritative history rather than retrying interchangeable operations.
5246 apps/linux/src-tauri/src/gateway_windows.rs READ — production 1–3522; remaining is cfg(test) — RETAIN: WebView2 temporary-directory deletion retries use a 5-second monotonic deadline, 250ms interval, NotFound success, and a pending-count/Condvar shutdown join. wait separately uses a 10-second condition-variable deadline with spurious-wakeup handling. Generic async timeout replacement would change blocking cleanup/settlement ownership; no existing matching Rust blocking poll owner found.
4864 apps/ios/Sources/Voice/TalkModeManager.swift READ — in full, lines 1-4864. One small fixed-schedule retry simplification identified below; remaining timeout and polling paths retain owner-specific cancellation, cleanup joins, deadlines, or callback timing.
4542 apps/linux/src-tauri/src/gateway_ws.rs READ — production 1–2287, excluding the test-only request-frame helper. Canonical Rust client/tokio already own transport deadlines; remove only local forwarding backoff/auth-policy wrappers if this file is selected.
3641 apps/linux/src-tauri/src/main.rs READ — production All production: 1–213, 389–2138, 2917–3641; also read early inline tests incidentally — RETAIN: the 200ms child monitor submits at most one automatic SSH recovery; connected watcher uses 15-second ticks and 3-second recovery ticks, generation fencing, shared operation try-lock, preserved onboarding, CLI rediscovery, and route publication. One-shot and live recovery are different policies, not duplicate retry loops.
3529 apps/android/app/src/main/java/ai/openclaw/app/ui/OnboardingFlow.kt READ — approval observation timeout and periodic refresh are owned by keyed Compose effects, whose cancellation/reset depends on navigation, current approval state, and refresh-in-progress state; already direct coroutine delay.
3290 apps/android/app/src/main/java/ai/openclaw/app/voice/TalkModeManager.kt READ — PTT release drains recognizer ownership, child-only cancellation is distinguished from caller cancellation, recognition retries advance Android capability rungs, and assistant-history polling permits an in-flight request to outlive the polling deadline; generic timeout substitution changes those contracts.
2756 apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewaySession.kt READ — already owns shared GatewayPlaybackRetryState for buffered fetch and Media3 streaming; reconnect atomically selects wake versus timeout and fences auth pauses/socket generations; invoke deadline deliberately does not join a blocking handler.
2413 apps/linux/src-tauri/src/quickchat.rs READ — production 1–1266; remainder cfg(test) — RETAIN: history-only recovery retains idempotency/attempt/route/session authority, max two pages and byte bounds; 15-second tokio timeout and forwarded absolute deadline bound one recovery. A generic retry would risk resending a completed message or broadening the bounded history search.
2230 src/infra/update-managed-service-handoff.ts READ — RETAINED / REVERTED: generated native timer-promises substitution was reverted after controlled-clock tests failed. Standalone helper retains its own sleep plus native stop/restore, parent-exit, grant/lease and IPC deadlines; absent from committed diff.
2208 extensions/voice-call/src/webhook/realtime-handler.ts READ — APPLIED: canonical sleep for positive <=1000ms transcript settling; retain call generation fencing, native-consult cancellation and refreshed liveness/retention timers.
2192 apps/linux/src-tauri/src/remote_gateway.rs READ — production 1–1146; remainder cfg(test) — RETAIN: SSH readiness probes current cancellation, child exit and stderr before TCP readiness, then 8-second deadline and 75ms delay; SshTunnel Drop kills and waits on failure. No canonical helper matches synchronous probe ordering and owned-child destruction.
2150 apps/android/wear/src/main/java/ai/openclaw/wear/WearViewModel.kt READ — pulse polling checks phone/agent/session/route/request generation plus event cursor before publication, distinguishes phone changes from connectivity failure, and cleans up only its own job; delay is already canonical.
2039 apps/linux/src-tauri/src/native_browser_platform.rs READ — production 1–2039, excluding nested tests 1138–1188 for production — RETAIN: shared response already centralizes native callback 30-second timeout/errors. Windows download timer bounds only DownloadStarting; once operation exists the picker/transfer remains event-owned. Timeout settlement detaches COM handlers, cancels picker/deferral/download, removes staging, and sends exactly once. A whole-transfer timeout changes behavior.
1836 src/tui/tui.ts READ — Five subscription attempts delay 25/50/75/100ms; stale generations abandon silently; other timers own animation, refresh and exit.
1822 extensions/feishu/src/bot.ts READ — 1-1822. Permission-notice cooldown is a single timestamp comparison; broadcast recovery permits exactly two claim attempts and retries only rejected inflight claims. Generic retry would need extra state to preserve claim-failure nonretry and raw rejection identity.
1701 src/gateway/server-channels.ts READ — Already uses RetrySupervisor, sleepWithAbort, and bounded stops; remaining loops protect replacement ownership and successful abort resolution.
1657 apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayNodeSession.swift READ — Refresh uses canonical AsyncTimeout; snapshot waiters and receipt retry retain route epochs, reset drainage, and one proven-not-dispatched retry.
1653 apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel.swift READ — Session-list retries reject snapshots crossing metadata/settings writes; branch reconciliation attempts history at most twice, with session activity fencing; neither is an interchangeable timeout wrapper.
1638 apps/macos/Sources/OpenClaw/OnboardingAISetup.swift READ — production 1–1638 — RETAIN: busy admission backoff 250ms→5s is bounded by the superseded activation lease and only SETUP_ADMISSION_BUSY; restart reconciliation 250ms→2s clips each lease/probe/sleep to one 45-second monotonic deadline and revalidates route/auth/receipt ownership. One notDispatched wizard retry is conditioned on proof of non-admission. Existing native backoff helpers own different budgets/errors.
1623 apps/macos/Sources/OpenClaw/GatewayProcessManager.swift READ — production 1–1623 — RETAIN: canonical AsyncTimeout already owns individual health probes. Outer readiness loop owns migration extension authorization, startup-progress evidence, repair eligibility and lifecycle generations. Startup-observer polling permits waiter cancellation without cancelling the shared startup owner.
1596 packages/ai/src/providers/openai-chatgpt-responses.ts READ — semantic replay retries mutate requests; socket abort handlers own synchronous cleanup and error projection.
1587 extensions/feishu/src/reply-dispatcher.ts READ — 1-1587. Account-scoped 60s streaming-start suppression controls later calls, not an awaited retry; generation/finalization queues preserve accepted provider identities and overlapping close/discard ownership. No matching canonical cooldown replacement found.
1578 extensions/browser/src/browser/chrome.ts READ — Exact ChildProcess event cleanup and PID identity checks own shutdown; readiness polls already use Node timer promises with distinct abort-error mapping, so no safe broad collapse.
1569 apps/android/app/src/main/java/ai/openclaw/app/ui/SessionsScreen.kt READ — awaitSessionStatusExpiry is already the shared owner used by SidebarContent; rereading wall time after the sleep preserves expiry under clock changes; search debounce already uses keyed Compose cancellation.
1559 apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayChannel.swift READ — Handshake uses AsyncTimeout; pending-request timer must retire transport send authority before continuation resume; reconnect state owns generation and auth pauses.
1553 apps/ios/WatchApp/Sources/WatchInboxView.swift READ — voice-reply task re-reads the persisted voice-turn owner's remaining deadline and reschedules across visibility/background changes; a one-shot timeout would change lifecycle.
1527 apps/linux/ui/quickchat.js READ — Canvas capability refresh keeps one promise and rearms its 5-second retry only after generation/capability/visibility-bound settlement; direct timers also serve hide/accepted presentation. No interchangeable retry/timeout helper in the unbundled native shell.
1520 apps/ios/Sources/Onboarding/OnboardingWizardView.swift READ — pairing retry checks every 2 seconds but admits attempts only after 6 seconds, on active auth-step pairing state with no in-flight connection; preserve current-form auth, sticky failures, and the existing retry owner.
1465 apps/macos/Sources/OpenClaw/NodeMode/MacNodeModeCoordinator.swift READ — UNCHANGED IN FINAL COMMIT; unimplemented candidate. READ production 1–1465 — RETAIN main flows: route retries drain revocation first; worker-exit retries use their existing MacNodeHostWorkerRetryPolicy and independent input/generation budget. SAFE SMALL CANDIDATE: scheduleReconnectProbe's cancel+Task/sleep/guard can use existing SimpleTaskSupport.schedule(delay:30) with weak self; roughly 2–3 lines. Not applied.
1463 apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+TransportEvents.swift READ — History retries honor max(local 250–4000 ms exponential delay, server retryAfter); pending-run completion/history tasks share one cancellable, joined arm and weak-owner revalidation, unlike the nonjoining AsyncTimeout race.
1463 extensions/imessage/src/monitor/monitor-provider.ts READ — Three-attempt watch subscription loop uses canonical sleepWithAbort with a fixed 1000 ms delay. Failed clients must detach and stop before the delay; final failures preserve status and original error identity, abort quietly returns, and successful attempts transfer cleanup ownership. Replacing the loop with retryAsync would retain most bookkeeping and require preserving non-Error rejection identity. Readiness and approval polling scheduling already use their canonical owners. Keep the approval-binding recheck loop: it closes a check-then-wait race.
1463 extensions/zalouser/src/zalo-js.ts READ — FULL READ (candidate); QR polling uses canonical sleep/withTimeout; 150ms start and 400ms status observations, handshake deadline, event-loop watchdog and terminal listener retention have distinct contracts. A shared observation race for the 400ms wait would add lines and alter pending timer retention; no structural cut identified.
1449 src/gateway/session-reset-service.ts READ — MCP retirement survives replacement runs; immediate reset attempts replay only exact precommit revocation errors and preserve unrelated rejection identity.
1446 apps/ios/Sources/Voice/TalkRealtimeWebRTCSession.swift READ — transcript FIFO uses at most three attempts with 100/250 ms delays and sticky first failure; the three-way stream/agent/deadline race joins losers, history polling has a shared deadline and precise error mapping, and readiness is completed by stop/ICE/data-channel ownership. No behavior-equivalent canonical retry/timeout substitution.
1445 apps/macos/Sources/OpenClaw/TalkModeRuntime.swift READ — retain event timeout task-group join and history polling (300 ms, wall-clock bound, swallowed cancellation); synthesis already uses AsyncTimeout and silence monitor uses SimpleTaskSupport. Small unimplemented candidate: RMS ticker sleep/check can use waitForNextOperation while retaining weak-owner loop.
1436 src/gateway/node-registry.ts READ — Connectivity completion synchronously removes listeners and validates the captured connection.
1431 apps/shared/OpenClawKit/Sources/OpenClawKit/RealtimeTalkRelaySession.swift READ — Retained: startup deadline atomically updates generation-owned startup state and notifies observers; chat completion joins cancelled AsyncStream child tasks; restart delays already have one shared owner used by iOS and macOS.
1415 src/tui/embedded-backend.ts READ — Uses canonical shutdown/debounce; abort race separates cancellation from preceding-run failure; grace timers retain run presentation.
1411 extensions/codex/src/app-server/shared-client.ts READ — Actual owner of two-attempt start-selection retry, shared startup deadlines, abandonment, generation drain, and cleanup settlement. Retain: retry transfers an exact lease and retires only future acquisitions; shared and isolated clients have different cleanup custody. Generic retry options would retain all this state and add indirection. Startup waiting already delegates to client-startup-retry.ts.
1394 src/agents/agent-hooks/compaction-safeguard.ts READ — Retain bounded corrective-summary generation: each retry audits the finalized artifact and changes corrective instructions; this is a domain repair loop, not duplicate transient retry scheduling.
1363 extensions/signal/src/monitor/event-handler.ts READ — FULL READ (candidate); Fixed 1s/2s/4s pre-admission session-conflict retries retain ingress claims and abandon only after exhaustion; node timers promises preserve abort error/ref semantics. Generic retryAsync would normalize terminal non-Error throws and obscure pre-wait abort exits.
1339 src/channels/streaming.ts READ — Draft-start gate owns cancellation, failed-creation retry, injected timer and one in-flight startup; not generic timeout.
1337 extensions/tlon/src/monitor/index.ts READ — FULL READ (candidate); Authentication already uses retryAsync and sleepWithAbort; startup has 10 attempts, reconnect authentication 5. Explicit backoff expression could become minDelayMs=1000/maxDelayMs=30000 without schedule change, but saves no meaningful lines.
1336 apps/macos/Sources/OpenClaw/ApplicationRelocator.swift READ — production 1–1336 — RETAIN: incomplete/untrusted bundle polling switches 250ms→5s after 120 attempts; authenticated handoff retries have exactly three attempts, per-target hash resets, supervisor-specific terminal recovery, load-sensitive existing timeout and child kill/reap. Shell waits deliberately survive parent process exit. These are process and trust-bound lifetimes, not generic in-process timeout races.
1318 extensions/google/realtime-voice-provider.ts READ — Retain: callback reconnect timer carries Google resumption, bounded attempts, readiness reset, and terminal notification; recent owner change 43295e8.
1295 packages/gateway-client/src/client.ts READ — APPLIED: canonical abort-error creation and direct pending-stop promise setup; retained transport/watchdog/storage-drain ownership.
1286 src/auto-reply/reply/queue/drain.ts READ — FULL self Preserve: detached generation-owned drain, pending-versus-admitted replay boundary, dynamic aggregate cancellation ownership, queue debounce, and restart fencing. Admission removes sibling cancellation listeners only after atomic adoption; static AbortSignal.any cannot replace that lifecycle.
1281 apps/macos/Sources/OpenClaw/QuickChatModel.swift READ — retain presentation-scoped 1 s TCC polling and presentation/cancellation fencing. startDetachedLoop has immediate-first and detached execution; waitForNextOperation offers only a small substitution. Send retry IDs are user-intent idempotency.
1262 extensions/ollama/src/stream.runtime.ts READ — Retain timed cooperative yield (12 ms / 64 events), including real zero-delay macrotask and custom abort error; HTTP timeout uses canonical guard. Tiny possible SDK sleep(0) substitution noted below.
1257 apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+Outbox.swift READ — Three-attempt durable FIFO delivery distinguishes proved rejection, proved unsent, and uncertain delivery; scheduled 2/8-second retries must preserve row claims, route leases, and canonical-history confirmation.
1243 extensions/browser/src/browser/extension-relay/relay-bridge.ts READ — Per-command map timers, physical-session abort cleanup, ping liveness, and authenticated-ready event cancellation have distinct owners; generic races do not replace their lifecycle effects.
1215 src/auto-reply/reply/session.ts READ — FULL self Preserve: rollover reacquires and revalidates changed session/lifecycle identity outside the writer lane; one locked stale-snapshot retry feeds the unlocked conflict owner. Lifecycle draining and cleanup are joined before mutation.
1195 apps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalog.swift READ — retain one wall-clock budget across authorization and pagination, four search pages, 100 membership-page cap, repeated-cursor termination, minimum request budget, and awaited ephemeral-client shutdown.
1189 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-destructive.ts READ — restore polling retains latest import counts, shrinks each CLI budget, and sleeps 500 ms even after the final empty result; canonical condition polling differs.
1176 extensions/qa-lab/src/mantis/slack-desktop-smoke.runtime.ts READ — emitted watcher sleep copy retained because importing the native primitive saves no lines; shell bootstrap/download retry and checkpoint deadline contracts otherwise remain explicit.
1176 src/gateway/watch-node-http.ts READ — Long polls own exact responses, supersession, and abandoned-socket cleanup; challenge and session timers are TTL.
1141 extensions/feishu/src/monitor.comment.ts READ — 1-1141. Request observation uses async.ts; missing-reply lookup performs six fixed 1s abortable waits, retains last nonempty replies, and returns best-effort context on exhaustion/abort. Generic throw-based retry would add sentinel/error machinery.
1137 extensions/memory-wiki/src/chatgpt-import.ts READ — rollback admits 32 recreation attempts; every attempt checks the snapshot, preserves concurrent replacements in recovery slots, and persists recovery classifications before create-only restoration. The inner moveTargetToRecovery loop allocates a new recovery slot on collision. Generic retries need sentinel result conversion plus the same mutation state, so no simpler exact-semantic cutover was identified.
1136 src/config/mutate.ts READ — Three-attempt path-lock rebinding and configurable conflict retries retain caller indices, exact errors, prepared snapshot and write authority.
1131 src/gateway/call.ts READ — Startup-only deadline, generation fencing, abort hook, and joined client shutdown have distinct lifecycle ownership.
1122 src/agents/agent-bundle-mcp-runtime.ts READ — RETAIN Retirement aborts catalog work and joins transport cleanup; request deadlines/backoff/catalog waits already delegate to shared owners.
1085 extensions/codex/src/app-server/side-question.ts READ — EXCLUDED as abort-controller forwarding and calls into existing owners. The 600,000 ms completion timeout is passed to CodexEphemeralTurn.wait; client-selection recovery is owned by withLeasedCodexAppServerClientStartSelectionRetry. Local controller also owns sandbox disconnect, native hook authority, dynamic tool cleanup, and finished-run teardown. Replacing forwarding with a generic race would not remove those responsibilities.
1075 extensions/google/transport-stream.ts READ — Retain: first-response-only deadline is explicitly disarmed after the first SSE chunk while parent abort remains active; custom timeout reason and one fallback request are protocol policy.
1074 extensions/whatsapp/src/connection-controller.ts READ — Setup-abort observation already uses x01's canonical helper. Synchronous account-abort fan-out, owner acquisition, listener publication, physical socket close, and credential flush have separate contracts. Reconnect counts/delays already use canonical backoff. Small possible tagged-race simplification noted below; no large safe cutover.
1069 src/gateway/server-startup-post-attach.ts READ — APPLIED canonical strict-stop observation timeout, retaining cleanup error normalization and startup custody.
1053 src/logging/diagnostic.ts READ — Diagnostic scheduler owns liveness observation and recovery authority; its abort listener stops the whole diagnostic lifecycle, not one promise.
1042 extensions/qa-lab/src/live-transports/discord/discord-live.runtime.ts READ — voice/message/registration polls preserve different diagnostics, cursor capture, and fixed final sleeps; transport request timeout already belongs to requestDiscord.
1030 apps/macos/Sources/OpenClaw/NodeMode/MacNodeRuntime.swift READ — retain FIFO catalog-worker admission: cancelling the caller settles its continuation immediately but the execution slot remains occupied until detached filesystem work finishes. Desktop cancellation owns input release and permit retirement.
1030 extensions/workboard/src/store-core.ts READ — three-attempt revision-CAS loops reread authoritative card state and recompute compensation or patch; explicit expectedUpdatedAt forbids retry. Rollback must preserve later foreign edits and original conflict errors. A generic exception retry adds result/error adapters and policy options without removing the mutation owner; retain these bounded domain retries.
1009 src/infra/restart.ts READ — authority-fenced polling and restart preparation own coalescing, rollback and late hooks; a generic retry race would lose these contracts.
1004 apps/shared/OpenClawKit/Sources/OpenClawKit/GatewayTLSPinning.swift READ — Retained: header-only and bounded-body requests cancel their exact URLSession task, preserve TLS delegates and header-before-cancel ordering; no hand-rolled timing engine.
993 extensions/codex/src/app-server/computer-use.ts READ — actual 2,000 ms marketplace polling with a bounded final sleep, plus monotonic operation budget. Sleep already uses sleepWithAbort. The small delay adapter preserves signal.reason only when it is an Error and otherwise emits Computer Use setup was aborted.; deleting it changes the error surface. Polling also checks disabled native plugins before waiting and retains caller-selected discovery rules. No identical canonical polling owner found.
990 extensions/zalo/src/monitor.ts READ — FULL READ (candidate); Polling already uses canonical sleepWithAbort(5000) and waitForAbortSignal. setImmediate re-entry and webhook cleanup ordering are distinct from finite retry helpers.
981 extensions/memory-core/src/memory/manager-embedding-ops.ts READ — (parent) — Parent confirmed full READ before this delegated pass; preserve resolve-before-abort deadline/error precedence, entered transport settlement and contextual provider behavior.
965 extensions/acpx/src/codex-auth-bridge.ts READ — Retain: timers occur inside durable generated standalone wrapper source, own parent-death detection and TERM-to-KILL escalation, and cannot depend on a live plugin SDK installation.
963 extensions/codex/src/app-server/client.ts READ — Actual overload retry/backoff owner. Retain: exactly three retries after the first attempt, 50 ms exponential base with symmetric 0.75–1.25 draw, shared remaining deadline, typed cancellation, and mayHaveWritten reset only on definite rejection. sleepWithAbort is already canonical. computeBackoff has different positive-only jitter; using retryAsync still needs ordinal, deadline, pre-write state, and specialized sleep/error mapping, giving no sound structural reduction.
961 extensions/imessage/src/send.ts READ — Receipt-GUID lookup polls every 250 ms for at most a 5000 ms admission window, while allowing an already-started lookup to finish. One reader spans the poll sequence. This is receipt reconciliation after a potentially completed send, never permission to resend. Existing sleep is canonical; transport-readiness helper has different return/error/logging semantics. Preserve the one-time unthreaded retry only for the explicit bridge rejection, including clearing receipt reply metadata. No safe timer consolidation found.
960 apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatQuestionCard.swift READ — Bounded 1/2/4-second recovery resets its budget on state mutation and fences authority/generation; per-card expiry must retire secret drafts and invalidate reconciliation, not merely reject an operation.
942 apps/android/app/src/main/java/ai/openclaw/app/wear/WearRealtimeTalkController.kt READ — 20 ms playback polling follows a deadline advanced by each physically delivered PCM chunk and publishes only to the current relay/attempt; session language fallback already reuses TalkModeManager's owner.
935 extensions/qa-lab/src/lab-server.ts READ — AbortControllers own embedded Gateway and lazy catalog lifetimes; shutdown joins catalog and Gateway before closing the bus. No duplicate race wrapper.
931 extensions/openai/image-generation-provider.ts READ — Retain: retry loop consumes configured alternative models only for the exact unsupported-model HTTP 400 body, carries selected model across requested images, and adds no delay; generic retry would add descriptors/state.
910 apps/macos/Sources/OpenClaw/NodeMode/MacNodeHostWorker.swift READ — retain serial-queue startup timer, process-generation fencing, pre-admission cancellation arbitration, buffered invoke controls, and joined process/pipe cleanup. AsyncTimeout does not own these queue-bound transitions.
909 extensions/zalouser/src/monitor.ts READ — FULL READ (candidate); Deferred exit intentionally settles only after listener/ingress stop, preserving startup failure and stop-failure precedence; plain abort racing would release the monitor before cleanup.
896 apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatLinkPreview.swift READ — Delegate deadline aborts the URL task and settles the same locked continuation that validates body/peer metrics; generic race would change settlement and zero-timeout semantics.
894 extensions/telegram/src/draft-stream.ts READ — The detached delete timer preserves the 4 s visible dwell and 1.5 s replacement floor. Final resume is exactly two stateful pagination attempts, with generation retirement and accepted-page custody; it is not a generic rejection retry. Throttle/debounce ownership already lives in shared draft controls.
884 apps/android/app/src/main/java/ai/openclaw/app/voice/MicCaptureManager.kt READ — pending-turn timeout retires the exact run and advances the queued send state, while capture drain and transcript debounce have separate resource lifetimes; each already uses coroutine delay.
862 extensions/voice-call/src/media-stream.ts READ — Playback-mark timer settles the live marks map synchronously and controls ignored late ACKs; generic observer race would separate settlement from ownership cleanup.
853 extensions/mattermost/src/mattermost/slash-http.ts READ — lookup timeout aborts the task and joins its real completion; canonical HTTP timeout helper changes native AbortError, logging, and zero handling, while Promise racing would stop observing actual work early. Preserve lookup/fallback and auth-rate-limit ownership.
849 extensions/slack/src/monitor/provider.ts READ — canonical computeBackoff/sleepWithAbort already own both reconnect delays; distinct disconnected/start-failed logging and identity recovery retain separate outcomes.
841 apps/macos/Sources/OpenClaw/MacGatewayProfiles.swift READ — retain identity waiters tied to credential deletion settlement and credential-specific renewal cooldown (half-window/24 h cap); ownership is reacquired after each suspension.
840 apps/macos/Sources/OpenClaw/QuickChatController.swift READ — retain 1 s activation/focus poll with 20 ms gaps and final focus check. Generic deadline race changes boundary and cancellation ordering; other delays are UI transitions.
825 apps/ios/WatchApp/Sources/WatchDirectNode.swift READ — 3-second retries occur after endpoint traversal; generation/foreground/config checks fence each awaited handoff, and consumed bootstrap custody must persist before teardown. Generic retry would obscure or alter that ownership.
811 extensions/comfy/workflow-runtime.ts READ — APPLIED: canonical sleep through its existing text-utility-runtime import; keep cloud completion's fresh history budget and local/cloud distinct result/error surfaces.
811 extensions/telegram/src/fetch.ts READ — Ordered direct/IPv4/pinned-IP dispatcher fallback, five-failure cooldown, 10/20/40/60 s cooldown state, and five-success primary probes are the transport owner. Safety differs for fresh non-idempotent sends, caller dispatchers, proxy tunnels, and authority failures. A generic retry runner would obscure or change route progression; retain.
794 src/gateway/terminal/session-manager.ts READ — Abort synchronously releases capacity and eviction claims while retaining late-spawn cleanup; detached-session timers are retention.
792 ui/src/components/terminal/terminal-panel-session-controller.ts READ — Connection-generation abort owner; readiness/deadline execution already delegates.
785 extensions/qa-lab/src/gateway-process-boundary.ts READ — identity polling and termination retries preserve inclusive deadlines, isolated UID quiescence, and credential-retention custody; not a generic retry wrapper.
784 ui/src/components/session-data-controller.ts READ — Epoch abort dismisses destructive confirmation dialogs; no copied race.
778 apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatViewModel+Sending.swift READ — The 50-ms slash-catalog wait observes the existing loading owner and returns on cancellation; no native canonical polling helper exists, and replacing it with task joining would alter the observable wake-up/cancellation contract.
778 src/channels/message/ingress-drain.ts READ — Claim refresh and preadoption watchdog retain lease custody through durable settlement.
773 src/fleet/service.runtime.ts READ — Already node:timers/promises; creation retries different occupied ports with increasing exclusion set, not transient timed retries.
772 apps/ios/WatchApp/Sources/WatchConnectivityReceiver.swift READ — replay coalesces availability wakes rather than retrying on a timer; immediate-send failure re-reads canonical pending custody before queued fallback, and ordinary messages explicitly require readback after ambiguous delivery.
772 apps/macos/Sources/OpenClaw/OnboardingAISetupSupport.swift READ — UNCHANGED IN FINAL COMMIT; unimplemented candidate. READ production 1–772 — RETAIN deadline/verification flow. SAFE SMALL CANDIDATE: ReconciliationDeadline.remainingMilliseconds only forwards stored clock/deadline to static remainingMilliseconds; inline identical three-line conversion/clamp into the instance method and delete the static one-caller helper (~6–8 lines). Repo-wide rg found no other direct static callers; tests use the wrapper. Not applied.
770 apps/macos/Sources/OpenClaw/PortGuardian.swift READ — retain 1 s/50 ms orphan-exit polling: every iteration reclassifies exact process identity and every signal revalidates durable receipt/current ownership. ChildProcessExit only observes unreaped children and cannot replace this orphan authority flow.
768 extensions/signal/src/client-container.ts READ — FULL READ (candidate); REST absolute deadline spans headers and every body reader; WebSocket shutdown arms a 1500ms drain before close and joins accepted events. Receive probe commits result before terminate; keep resource owner semantics.
768 src/auto-reply/reply/reply-dispatcher.ts READ — FULL worker large_runtime_reads Preserve: serial send and asynchronous settlement chains converge separately; abort resolves idle wait to undefined while delivery errors propagate. Human block delay and proven-unsent fallback custody remain distinct.
768 src/infra/net/fetch-guard.ts READ — already uses canonical timeout signal; redirect hops must revalidate authority and retain per-hop dispatcher/body custody.
766 apps/ios/Sources/OpenClawApp.swift READ — OS expiration settles the background refresh synchronously under a lock before a delayed MainActor success can run; a clock timeout or asynchronous cancellation callback changes the winner.
766 ui/src/pages/chat/composer-dictation.ts READ — Final-transcript deadline synchronously retires listeners and stopped-session commit custody.
764 src/sessions/session-lifecycle-admission.ts READ — APPLIED: canonical idle abort observation only; acquired mutation and writer-barrier custody remain non-abandonable.
763 extensions/mattermost/src/mattermost/client.ts READ — DM retries already use retryAsync with exact full-jitter and caller-configured caps. Per-attempt native abort must remain distinct from body-lifetime fetch deadlines; native reason differs from logged HTTP TimeoutError.
763 src/gateway/exec-approval-lifecycle.ts READ — Recorded durable verdicts override observer closure; handoffs, expiry, and accepted mutations retain separate authority and settlement.
760 apps/macos/Sources/OpenClaw/ComputerScreenActionExecutor.swift READ — small unimplemented candidate: armButtonWatchdog can use SimpleTaskSupport.schedule for the existing 120 s cancellation-aware delay. Preserve held-input scope/modifiers, activity rearming, and failed-release rearming. Other sleeps pace input.
758 src/plugins/plugin-instance.ts READ — Retain lifecycle-sensitive outer disposal timer; waitForCalls deadline must abort exact settlement waiter, not merely stop observation.
758 ui/src/components/link-reader-hovercard.ts READ — Uses shared-request owner; page/cache controllers preserve distinct subscriptions.
757 apps/linux/src-tauri/src/gateway_sleep.rs READ — production 1–243. Three resume attempts require fresh route/generation checks and exact 2-second spacing; Tokio owns the delay.
756 src/agents/bash-tools.exec-run.ts READ — RETAIN Yield timer promotes background work; cancellation/finalizing state still joins owned process settlement.
756 src/tui/gateway-chat.ts READ — History retry preserves original errors, server clamped delays, post-failure deadline and shutdown; reconnect already canonical abort race.
755 src/agents/prepared-model-catalog-worker.ts READ — RETAIN Timeout aborts captures and worker execution; failure handling joins cleanup and generation recovery.
753 extensions/matrix/src/matrix/sdk/client-base.ts READ — encrypted startup deadline, generation request cancellation, and periodic persistence have different ownership; startup caller cancellation must not bypass real initialization/retirement joins.
753 packages/gateway-client/src/session-projection.ts READ — no retry/timer duplication; durable/provisional/terminal reconciliation identities remain distinct.
753 src/process/supervisor/adapters/child.ts READ — Timers settle separate native-close, output, and extinction boundaries.
753 ui/src/components/app-sidebar-session-narration.ts READ — Retry-after floor plus full random window differs from canonical backoff; release custody remains necessary.
752 extensions/discord/src/voice/voice-runtime.ts READ — supplemental major caller; join loop waits on current per-guild owner and revalidates capture/residency after awaits, not a timer retry loop.
752 src/agents/sessions/agent-session-base.ts READ — RETAIN Disposal delegates cancellation to retry, compaction, branch-summary, and agent owners before invalidating extensions/removing listeners.
752 src/media/store.ts READ — Already uses retryAsync with two immediate ENOENT-only directory recreation attempts; stream-consumption guard prevents replay after bytes are consumed.
752 ui/src/app/app-shell-chrome.ts READ — AbortController removes one connection's DOM listeners directly.
750 src/infra/sqlite-readonly-location.ts READ — sync and async copy already share one generator; source-change retries require completed cleanup and journal reclassification.
748 packages/worker-runtime/src/worker-task-pool-core.ts READ — deadlines are paused for host exchanges, rearmed on response, synchronously cancel owned tasks, and retain admission/native cleanup custody. Generic observation races cannot own these transitions.
748 src/channels/message/ingress-monitor.ts READ — Append schedule includes first delay, empty schedule, unknown outcome termination and exact errors; restart fence joins owner settlement.
748 src/config/sessions/session-transcript-reconcile.ts READ — Already uses computeBackoffSchedule and canonical abort race; polling retains cancellation shape, generation handoffs and worker-close fences.
747 src/agents/subagents/announce/subagent-announce.requester-settle-wake.ts READ — Retain: distinct deferral, known-failure attempt, and ambiguous same-key replay budgets persist future deadlines under exact cohort authority.
747 src/skills/runtime/refresh.ts READ — Watch lifetime, joined retirement, source re-admission and 250ms coalescing are concrete observation ownership; timer is not an async wait wrapper.
746 src/agents/harness/native-hook-relay-permissions.ts READ — SELECTION INSPECTED Retry comment describes approval deduplication; timeout/abort use existing owners; not a whole-file read.
746 src/state/openclaw-agent-db-lifecycle.ts READ — Refreshable idle timer retains handle/lease custody; shutdown switches to microtask retirement and loops join changing owners.
745 extensions/voice-call/src/providers/twilio.ts READ — APPLIED: canonical combined timeout/abort race for TTS synthesis; retain synthesis-first race ordering, exact error text/reason identity, raw timer delay/ref behavior and silence keepalive cleanup.
744 apps/macos/Sources/OpenClaw/TalkModeRuntime+Realtime.swift READ — retain recovery policy and staged wait for startup completion: lifecycle/restart/relay generations fence each 50 ms poll and final start. SimpleTaskSupport.schedule is MainActor-owned; this owner is an actor with optional initial delay.
744 src/agents/prepared-model-runtime.ts READ — RETAIN Aborts implement ordered publication invalidation and shutdown after admission/generation fencing; retries follow replacement ownership.
743 src/gateway/agent-turn/agent-job.ts READ — Waiter removal synchronously publishes held error outcomes; timeout projection distinguishes exact RPC source, retryable failure, and hard timeout.
743 src/infra/update-candidate-state.ts READ — AbortControllers in generation/schema inspection are registered with retainSnapshotWork; AbortSignal.any already composes the caller signal. Cancellation must reach workers before private staging cleanup. Unifying these calls into a new generic wrapper would obscure their different admitted inventory and released-worker contracts.
740 src/agents/subagents/registry/subagent-registry.ts READ — Retain: resume timer retains exact runtime/source ownership and separately reschedules Gateway-drain refusals without reopening completed cleanup.
740 ui/src/lib/config/config-gateway-operations.ts READ — Races read completion against generation invalidation, without a deadline.
740 ui/src/pages/chat/components/chat-message-media.ts READ — Canonical resource-refresh owner retains subscription, identity, replacement, and idle-release fences.
738 src/gateway/worker-environments/node-worker-tunnel.ts READ — Idempotent-only replay, remaining deadline, native contracts, and physical drain before retirement are required.
737 extensions/codex/src/app-server/turn-router.ts READ — Actual completion timeout and abort owner. Retain: the watcher synchronously updates confirmed/unconfirmed state and its settled signal before promise continuations, removes exact watchers, and distinguishes a received terminal receipt from transport closure. Route activation/binding waits already use the local boolean abort helper; routing gates are not repeated retry policy.
737 src/infra/net/ssrf.ts READ — Reused the canonical dispatcher-close deadline; retained abort-first DNS lookup semantics and all address-policy checks.
737 src/plugins/plugin-source-capture-directory.ts READ — Scheduler cleanup and independent warning throttle; four-line doubling does not benefit from larger generic policy.
735 extensions/agentsapi/agentsapi-session.ts READ — Native input receipt, stream reconnect and saved-state reconciliation own separate fences; 500ms reconnect uses Node delay. Creation refresh race remains ordering-sensitive and was recently changed by #161609.
735 src/agents/embedded-agent-runner/run-orchestrator.ts READ — Retain parent-abort listener until generation cleanup drains the admitted work, writer, and prepared-runtime resource; a generic promise race would detach before required cleanup.
735 src/process/exec-runner.ts READ — Canonical command-timeout owner; exit-aware cancellation, EOF grace, and fixed Windows observations are required.
735 ui/src/app/server-prefs.ts READ — x01 adopted sleep; retain two conflict attempts and five-redrain writer-epoch scheduler.
731 extensions/codex/src/app-server/inference-proxy.ts READ — Actual optional HTTP 401 replay and handshake deadline owner; idle timer is transport reclamation. Retain: one ordinary attempt or at most two OAuth attempts, replay only when the upload is replayable, release the first response before resetting the body, refresh auth once, and revalidate both owners before physical I/O. Handshake expiry closes owned transports and retains residency until socket teardown; a promise race alone cannot replace it.
731 extensions/discord/src/voice/realtime-speaker-session.ts READ — input-idle abort wait has caller-specific error conversion and synchronous listener-set retirement; canonical abort race would yield little/no net simplification.
731 ui/src/pages/chat/talk/gateway-relay.ts READ — Drain scheduling follows output cancellation; RPC deadlines already delegate.
731 ui/src/pages/model-setup/wizard-runner.ts READ — x01 adopted timeout helper; external-input polls retain session/step ownership and late-admission cleanup.
729 src/agents/subagents/registry/subagent-registry-restore.ts READ — Retain: one owned unref timer doubles restore delay to 30s; generation-fenced hydration, activation, and partial-row reconciliation share its lifecycle.
728 src/acp/translator.prompt-stream.ts READ — FULL worker large_runtime_reads Preserve: replacement closes and awaits changing prompt admissions, then rechecks identity; provenance retry is exactly one admin-scope rejection retry using the same idempotency key. Shutdown retains its separate 1000ms abort budget.
728 src/transcripts/auto-start.ts READ — 12 attempts/5s are occupancy-cleanup state machine with exact failed-start authority, empty-room grace and stop joins.
727 src/auto-reply/reply/reply-run-registry.state.ts READ — FULL worker large_runtime_reads Preserve: barrier timer supports activity-extended deadlines capped by an absolute maximum and unref cleanup; successor failures intentionally keep admission closed, unlike bounded followup release.
727 src/plugins/services.ts READ — RETAINED: proposed positive-deadline race consolidation was not applied. Original timer observation and direct source-first rejection for remaining<=0 remain; absent from committed diff.
727 src/talk/client-voice-confirmation.ts READ — Inclusive challenge expiry rechecks clock; supersession cancels exact challenge and wakes readiness observers.
727 ui/src/lib/sessions/session-roster-refresh.ts READ — Existing event-refresh and gateway retry-delay owners already schedule work.
726 src/channels/progress-draft-compositor.ts READ — Preamble expiry depends on visible draft, narration, delivery state and injected clocks; shared draft-start owner already used.
726 src/gateway/desktop/managed-linux.ts READ — x01 already consolidated D-Bus timeout; desktop and audio restart budgets remain independent.
726 src/infra/sqlite-worker-broker.ts READ — queued cancellation is synchronous; dispatched operations must wait for database settlement.
726 src/meeting-bot/session-runtime.ts READ — Readiness polling already uses canonical sleep; deadline and manual-action stopping differ from exception retries.
725 extensions/codex/src/app-server/compact.ts READ — EXCLUDED as canonical lifecycle delegation. It calls watchCodexNativeCompactionCompletion, uses existing bounded client requests, and composes model/source cancellation with AbortSignal.any. The apparent complexity keeps native admission, result settlement, writer fences, and physical client exit separate; a generic timeout must not release the fence on ambiguous write/failed retirement.
725 src/daemon/schtasks-process.ts READ — 100ms process-exit poll includes final zero-budget probe; 250ms port-release poll does not; both preserve native stop ownership.
725 src/gateway/worker-environments/worker-turn-launcher.ts READ — APPLIED timer cleanup across failed runtime-refresh preparation; budget still starts before preparation, and facts retain separate release ownership. Added focused launcher regression; lead owns baseline/candidate proof.
724 src/node-host/node-worker-workspace.ts READ — Native timeout signal composition is direct; workspace custody and mutation checks remain necessary.
724 src/state/openclaw-agent-execution.ts READ — Canonical abortable sleep; contention retries occur only before execution and retire failed native generation before readmission.
722 extensions/visitor-access/src/visitors.ts READ — Grant-expiry timer revokes current authority synchronously and reschedules against the earliest grant; not an operation timeout or a removable retry wrapper.
721 src/agents/harness/gateway-question.ts READ — (carried parent) Retain: synchronous secret-slot release and question-receipt custody; timer/listener ordering protects immediate cancellation and answer consumption.
721 src/agents/subagents/registry/subagent-registry-sweeper.ts READ — Retain: earliest-deadline coalescing, detached admission, rerun requests, and drain of accepted cleanup tails are distinct scheduling requirements.
721 src/agents/tools/sessions-tool.ts READ — APPLIED Replace bare unref self-archive retry delay with canonical sleepWithAbort without a run signal; retain unbounded attempts and exact 25ms-to-5000ms schedule.
721 src/state/openclaw-state-worker-owner.ts READ — Two-stage idle deadline cannot extend original inactivity budget; retirement distinguishes actor and client settlement.
721 ui/src/pages/chat/chat-state-refresh.ts READ — Retain semantic re-admission after catalog receipt retirement: waits for both producer barriers, rechecks binding/receipt ownership, and avoids retrying a cooldown response expired during display application. Generic error retries do not match this flow.
720 apps/ios/WatchApp/Sources/WatchRealtimeTransport.swift READ — engine-produced ICE deadlines reschedule one DispatchSource on the same serial queue as native mutation; pending STUN expiry and cancellation share the send-admission lock. This is protocol scheduling, not an operation timeout wrapper.
720 src/agents/agent-bundle-mcp-materialize.ts READ — RETAIN Abort initiates disposal, then acquisition joins physical cleanup and preserves cleanup-error precedence.
719 extensions/line/src/send.ts READ — push retry delegates to send-retry; one-time quote-token fallback is authorized only by atomic HTTP 400 refusal. Retry-key reuse, receipt failure and send-authority recheck preserve duplicate-delivery boundary.
718 src/fleet/service-support.runtime.ts READ — Fetch timeout aborts without racing and cancels response body; health polling checkpoints authority and lease renewal joins pending heartbeats.
717 extensions/codex/src/app-server/attempt-startup.ts READ — actual three-attempt startup retry loop, zero delay for selection/client replacement and 1,000/2,000 ms for connection closure. sleepWithAbort is already canonical. Per-attempt retirement, one permitted settled-failure replacement, exhausted-attempt logging, and exact original thrown values are required. retryAsync checks exhaustion before shouldRetry and normalizes failures, so it cannot replace this loop directly without moving side effects and adding policy machinery.
716 extensions/openai/realtime-quicksilver-session.ts READ — Retain: pending-offer expiration owns single-use reservations; remaining timeouts use native AbortSignal.timeout/any and authoritative retirement leases.
716 src/agents/subagents/registry/subagent-registry-persistence.ts READ — Retain: bounded retries are only for confirmed version conflicts; refresh authoritative rows while retaining FIFO, admission, and unknown-write custody.
715 src/agents/code-mode-state.ts READ — RETAIN Parked-run expiry is reschedulable; removable frontier observers intentionally avoid losing-Promise retention.
715 src/config/sessions/session-accessor.sqlite-reclamation-worker-lifetime.ts READ — Timer controls worker refs, restart drain and native/task lease custody; races distinguish pooled task close from native exit.
714 extensions/openai/realtime-quicksilver-bridge.ts READ — Retain: ready timeout settles provider readiness and closes the failed socket with synchronous event ordering; lifecycle already canonical.
713 src/infra/update-startup.ts READ — Uses lifecycle scheduling and AbortSignal.any already; periodic update policy, persisted throttle, stable rollout jitter, and campaign admission are separate product responsibilities, not cloned retry helpers.
713 ui/src/app/app-root.ts READ — Dashboard-route abort owner; publication fences remain necessary.
713 ui/src/pages/usage/usage-page.ts READ — Date/query debounce; retry implementation belongs to refresh-policy.ts, read separately.
712 extensions/qa-lab/src/live-transports/shared/credential-lease.runtime.ts READ — broker acquisition has server Retry-After, symmetric schedule jitter, deadline-specific errors and lease rollback; heartbeat retries retain health/stop settlement. Existing backoff helpers do not preserve this contract directly.
711 src/agents/subagents/registry/subagent-registry-requester-wake-commit.ts READ — Retain: retained wake episode preserves committed/unknown transport outcomes and surviving cohort fences; capped backoff and diagnostic budgets are independent.
709 src/gateway/node-registry-private.ts READ — Pairing uses canonical absolute-deadline and abort helpers; generation signals enforce live dispatch authority.
709 src/process/gateway-work-admission.ts READ — Abort waiting already uses the canonical race; remaining state enforces root admission and restart fences.
708 src/agents/harness/host-capability.ts READ — EXCLUDE Host authority/capability composition, synchronous lexical close, and signal forwarding through existing tool/Gateway owners. No timer, abort-listener registration, retry loop, or retry calculator; post-await authority checks are material.
708 src/daemon/schtasks-control.ts READ — 250ms poll follows scheduler history transitions and exact process evidence to refuse potentially queued duplicate launches.
708 ui/src/pages/new-session/draft-persistence.ts READ — Three CAS retries re-read authoritative revisions and submitted write IDs; not error retries.
707 src/config/sessions/session-accessor.sqlite-transcript-reports.ts READ — Three selection attempts only follow proven no-write revision mismatch; exceptions never replay.
707 ui/src/pages/chat/talk/webrtc.ts READ — Per-consult cancellation and teardown ownership; no duplicate race.
706 extensions/matrix/src/matrix/sdk/verification-manager.ts READ — , EXCLUDED: the 30s SAS timer schedules a protocol side effect and is cancelled by confirm/mismatch/cancel; it is not a promise timeout or retry wait.

@steipete

steipete commented Oct 5, 2026

Copy link
Copy Markdown
Contributor Author

Retry/timeout coverage log — part 2/7

Full READ inventory

Lines at read Production file Outcome / retained contract
706 src/node-host/node-worker-child-lifecycle.ts READ — Kill escalation does not end the cleanup wait; retention timers own physical children.
705 src/infra/update-candidate-canary.ts READ — Uses the lead-owned canonicalized waitBounded and stopCanary; process-exit AbortController cancels readiness fetches on actual child exit/error. Per-phase budgets, captured check results, cleanup reserve and late exit warning are intentional. No extra wrapper removal with identical behavior identified.
703 extensions/facetime/src/runtime.ts READ — FULL READ (candidate); Reconciliation timer retains pending dial identity/epoch; shutdown cancels scheduling, joins publication and confirms carrier cleanup. Hangup polls exactly OUTBOUND_RECONCILE_ATTEMPTS at the existing interval. No canonical helper matches these identity checks.
703 src/agents/cli-runner/execute-plugin.ts READ — RETAIN Iterator close migrated in x01; custom next-value abort rejection has synchronous arbitration and stream-error normalization.
703 ui/src/components/mcp-app-view.ts READ — Optional registration race substitution; resource-owned readiness timers retain teardown semantics.
703 ui/src/pages/plugin/plugin-page.ts READ — Cookie renewal waits for abort settlement; probe/expiry timers synchronously retire frames and grants.
702 src/agents/sessions/agent-session-compaction.ts READ — RETAIN Abort cancels owned summary controllers; work stays joined, preserves the single invalid-summary retry, and checks exact authority before transcript commit.
702 src/gateway/session-companion-ask.ts READ — Distinct timeout/reset/revocation/disposal/request cancellation records; straightforward helper replacement changes pre-abort error precedence.
700 src/media/fetch.ts READ — Already uses shared retry/sleep/header deadline/body timeout owners; dispatcher fallback preserves different transport policies and aggregated primary-error diagnostics.
699 extensions/codex/src/app-server/run-attempt-active-turn.ts READ — EXCLUDED as lifecycle/controller forwarding. Races join route binding or notification drain against the existing completion promise, not new timers. Abort cleanup must confirm native interruption before terminal cleanup and permission-mode restart. run-attempt-turn-state.ts already delegates execution/settlement deadlines to createAgentHarnessAttemptDeadlineController.
699 src/gateway/worker-environments/placement-dispatch-startup.ts READ — Abort starts exact-epoch teardown synchronously; finalization joins it before transferring activation ownership.
699 ui/src/components/link-reader-panel.ts READ — Request owner identifies selected tab, target, agent, and connection; Gateway handles cancellation.
699 ui/src/pages/chat/components/chat-message-images.ts READ — IMG handoff timer ends synchronously on load/error/disconnect and protects decoded pixels.
698 extensions/browser/src/browser/pw-session-actions.ts READ — APPLIED: canonical abort races for native target read and enumeration, retaining reject-before-detach ordering, controller/error mapping, and late native detach.
698 src/infra/outbound/message-action-execution.ts READ — existing AbortSignal composition and one exact idempotent reattachment preserve unknown-send outcomes; no duplicate timer owner.
698 src/infra/sqlite-snapshot-staging-owner.ts READ — abort transports intent while retained operations service and join native directory custody.
697 ui/src/lib/session-progress-cards.ts READ — Timeout changes presentation while requests and late authoritative publication remain alive.
696 ui/src/pages/approval/approval-page.ts READ — Response-driven polling accelerates around server expiry and rechecks live approval authority.
695 src/agents/tools/ask-user-tool.ts READ — RETAIN x01 migrated expiry/readiness waits; remaining listeners own waiter membership and prompt/answer lifecycle.
694 src/agents/subagents/registry/subagent-control-kill-runtime.ts READ — Retain: second claim attempt only follows the same execution through an acknowledged queued-to-running rekey; accepted cancellation retains settlement obligations.
694 ui/src/lib/config/config-write-coordinator.ts READ — Races release connection-retired write drains; autosave timer is debounce.
694 ui/src/pages/chat/chat-state-events.ts READ — Missing-terminal polling follows successful history reads and ownership facts; canonical sleep already used.
692 extensions/codex/src/app-server/run-attempt-finalize.ts READ — EXCLUDED as deadline-consumer/result settlement. It consumes settlement, degradedSettlement, and drainGraceElapsed from one existing owner. Its races intentionally have different participants for ordinary versus degraded transcript writes. Fresh transcript authority and terminal outcome checks after awaits cannot be collapsed into a timeout wrapper.
692 extensions/openai/realtime-voice-bridge.ts READ — Retain: canonical RealtimeVoiceSessionLifecycle owns connect/retry authority and sleepWithAbort owns wait; the remaining exponential expression is one line and lifecycle side effects are provider-specific.
692 ui/src/pages/chat/components/chat-message-attachments.ts READ — Renewal state retains valid tickets through bounded retries and expiry.
690 extensions/codex/src/app-server/dynamic-tool-execution.ts READ — one small possible canonical timeout consolidation described below. The separate retained cancellation listener is mandatory: successful tool results can still own queued host admission work. Existing numeric timeout readers accept deliberately different contracts (fractional positive milliseconds, strict integer model seconds, normalized human-question durations); merging them changes budgets.
688 apps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalogClient.swift READ — Queue-bound request timers include queue wait, serialize response/cancellation, and fence child retirement; one retry is restricted to undelivered stdin write.
688 src/gateway/talk/relay/session-create.ts READ — Timer is session TTL; provider retry/cancellation belongs to harness and relay owners.
688 src/gateway/worker-environments/node-launch-adapter.ts READ — Parent deadline precedence, clock expiry, negotiated status waits, and cancellation receipts forbid generic replay.
688 ui/src/pages/chat/talk/session.ts READ — Persistence retries already delegate; teardown preserves accepted-write draining.
687 ui/src/api/gateway.ts READ — Shared protocol client owns reconnects; probe abort and socket-silence interval are distinct.
686 packages/ai/src/transports/openai-responses-websocket.ts READ — x01 already canonicalized iterator abort racing; remaining timers own socket lifetime and credential-specific cooldown state.
686 src/acp/control-plane/manager.core.ts READ — FULL worker large_runtime_reads Preserve: abort releases actor waiters only while queued; already-running actor work must settle. ACP_TURN_FAILED and non-Error rejection normalization differ from an ordinary abort race.
684 extensions/agentsapi/agentsapi-client.ts READ — Submissions already use canonical retryAsync with stable idempotency payload/key; cancel polling must observe native idle/failed after the acknowledgement and retains 500ms Node delay.
684 packages/gateway-client/src/protocol-client.ts READ — reconnect already uses RetrySupervisor and sleepWithAbort; specialized positive jitter preserves server retry floors and cap distribution.
684 src/agents/subagents/registry/subagent-registry-read-cache.ts READ — Retain: retry a foreign clean cancellation once; separately reread durable state if publication advanced during restore. Cleanup/admission failures do not become retries.
684 src/config/sessions/session-transcript-worker-resources.ts READ — Captured native timers survive replaced globals; idle rotation releases only acknowledged native sequences.
684 ui/src/components/board/board-widget-frame.ts READ — Ticket refresh retries both success and failure until ticket changes; generic error retry differs.
682 apps/macos/Sources/OpenClaw/WebChatManager.swift READ — retain exactly one immediate hidden-session-observer retry, current socket lease and aggregate-visibility guards, per-connection task serialization, request-ID settlement, and retained reconnect monitor on failure.
682 src/agents/provider-local-service.ts READ — carried / RETAIN Process startup, probe deadline, spawn listeners, parent detach, and physical process settlement are one owner; no generic race replacement.
682 src/node-host/runtime.ts READ — Initialization retries stop on closure or replacement while accepted cleanup stays joined.
681 apps/macos/Sources/OpenClaw/StatusMenuSummaries.swift READ — retain usage-status polling: at most three 5 s rechecks while provider reports refreshing, with observable retry count, current refresh identity, selected endpoint revision, physical lease, TTL, and menu lifetime. No general Swift retry owner matches this state machine.
681 src/agents/embedded-agent-runner/run-loop.ts READ — FULL 1-681 Preserve: actual retry orchestration and controller consumer. Every iteration retains the exact admitted authority and checks lane cancellation; dispatched/countable/progress retries, auth rotation, context recovery, permission restart, terminal recovery, and model failover have distinct owners and budgets. Delivery/replay/usage/compaction facts persist across attempts. Post-compaction guard aborts both the lane and current physical attempt with the same typed reason; final settlement restores suppression, closes permission changes, and joins owned context-engine/accounting work. Generic retry would flatten these contracts.
680 extensions/telegram/src/bot-handlers.callback-router.ts READ — EXCLUDED from primary wait-owner selection. retryModelAction does not retry or wait: it maps selected failures to TelegramRetryableCallbackError so the outer durable owner replays them. Removing the wrapper changes selective error surfaces.
680 src/gateway/talk/client-agent-consult.ts READ — Abort synchronously revokes admission and releases registration waiters without detaching write-capable settlement.
680 src/gateway/worker-environments/workspace-quiescence-scripts.ts READ — Standalone scripts cannot import runtime helpers; probe budgets and watchdog recovery preserve process identities.
679 src/infra/approval-native-route-coordinator.ts READ — timers expire separate selection and notice state, with different limits; existing callbacks own synchronous map cleanup.
678 extensions/feishu/src/monitor.transport.ts READ — 1-678 independently. SDK socket recreation has distinct terminal/start-failure status/log surfaces and attempt reset on successful start; waits/deadlines already use async.ts. Webhook drain must preserve registered signature recognition and successor identity revision fencing.
677 src/agents/auth-profiles/profiles.ts READ — RETAIN Bounded retries rebuild credential-removal targets only after explicit generation mismatch; lock contention, hooks, and compensation have distinct outcomes. No local timers/abort races.
677 ui/src/pages/cloud-workers/cloud-worker-snapshots.ts READ — Poll begins ten seconds after a settled read and only while builds/captures remain active.
676 src/gateway/server-methods/sessions-files.ts READ — APPLIED canonical node:timers/promises immediate yield; page folding and authority checks retained.
676 ui/src/lib/chat/composer-draft-store.runtime.ts READ — Deferred database cleanup and IndexedDB transaction aborts, outside AbortSignal consolidation.
675 src/agents/admitted-run-context.ts READ — RETAIN Abort listeners latch authority revocation and release retained leases.
674 ui/src/app/question-prompt.ts READ — Reconnect-generation retries and authoritative prompt expiry retain separate responsibilities.
671 extensions/openai/realtime-quicksilver-gateway-bridge.ts READ — Retain: canonical native timeout signal and shared sideband waiter; session TTL timer owns teardown/finalization rather than racing a single operation.
671 extensions/telegram/src/bot-native-command-menu.ts READ — EXCLUDED from primary temporal wait-owner selection. BOT_COMMANDS_TOO_MUCH recovery shrinks a rejected payload by floor(count * 0.8), retaining all-or-none skill groups; it does not implement sleep/backoff/abort handling. Generic transient retry would be the wrong owner.
671 src/agents/sessions/agent-session-prompting.ts READ — RETAIN Logical prompt spans retry/compaction gaps and terminal settlement versus handoff. prepareRetry owns timing; abort cancels retry, forwards exact reason, and joins waitForIdle.
670 src/agents/subagents/registry/subagent-registry-memory.ts READ — Retain: abort listener releases completion authority, follows ownership transfer, and is synchronously removed on release; not an observer promise race.
669 extensions/discord/src/channel.ts READ — major caller already uses canonical startup staggering and withAbortTimeout diagnostics; retain startup abort-as-normal-return behavior.
669 extensions/nostr/src/nostr-bus.ts READ — FULL READ (candidate); Relay abort owns subscription teardown and durable cursor settlement; relay failover/circuit-breaker state is real publishing policy. Wait implementations are delegated to ingress/cursor/subscription owners.
669 packages/ai/src/transports/openai-responses-client.ts READ — native AbortSignal composition already direct; request timeout includes separate host policy.
668 src/config/sessions/session-transcript-worker-runtime.ts READ — Abort revokes physical database work and joins accepted host effects; pool owns timeout enforcement.
667 extensions/browser/src/browser/pw-session-connection.ts READ — APPLIED: raw retry sleep only; x01 already consolidated close timeout, and retries retain final-failure sleep, rate-limit refusal, redaction, and supersession cleanup.
666 src/agents/harness/native-hook-relay.ts READ — (subscout) Retain: renewable expiry handles timer limits, replacement registration, foreground retention, and identity-bound disposal; invocation abort racing already canonical.
666 src/infra/tailscale.ts READ — APPLIED — startup handshake uses canonical timeout factory with the unchanged 15s unref timer, failure precedence and owned stop join; x01's stop simplification remains untouched.
666 src/meeting-bot/node-host.ts READ — Input-drain timeout shares stream cleanup; generic replacement does not simplify the owner.
665 extensions/browser/src/browser/extension-relay/relay-server.ts READ — Hello/auth deadlines are socket-bound authority transitions with early timer retirement; converting to observation races adds machinery or changes socket ownership.
665 extensions/browser/src/browser/server-context.availability.ts READ — Readiness loops share domain helpers and differing deadlines/diagnostics; Node sleep wrapper preserves raw or wrapped abort reasons, and cooldown arithmetic is already shorter than a canonical policy object.
665 extensions/whatsapp/src/inbound/message-delivery.ts READ — x01 already replaced the 5 s unref drain deadline. Remaining races alternate debounce flush, upsert settlement, and durable monitor idle so shutdown cannot deadlock or abandon claims. Keep distinct settlement barriers.
665 src/video-generation/dashscope-compatible.ts READ — Provider task loop preserves UNKNOWN/FAILED/CANCELED surfaces and successful response-body ownership; retry, deadline and poll sleep already use provider owners.
664 extensions/codex/src/app-server/native-hook-relay.ts READ — Foreground admission wait owns per-child shared deferreds, exact claim custody, capacity accounting and last-waiter deletion. The direct .then(resolve, reject) plus synchronous abort rejection has different same-turn precedence from canonical Promise.race; replacing it blindly can admit a child after cancellation. Retain.
664 extensions/codex/src/app-server/native-subagent-submission-owner.ts READ — actual per-receipt reconciliation polling. Initial reconciliation is immediate, subsequent schedule uses delayForAttempt, and detached observation, promotion, write settlement, native-history proof, and completion custody govern cancellation. Timer is canceled by promotion/retirement/settlement; a generic retry runner would add a second lifecycle owner.
664 packages/ai/src/transports/openai-responses-continuation.ts READ — expiry timer identity fences replacement claims; detached timer creation prevents context retention.
663 extensions/facetime/src/talk-driver.ts READ — FULL READ (candidate); x01 already canonicalized provider timeout. Remaining interruption can be triggered by external abort, logical media suspension and closure; startup failure, provider-ready, suppression and route-ready remain separate races.
663 src/agents/embedded-agent-runner/compact.queued.ts READ — FULL 1-663 Preserve: manual-compaction cancellation owner. The controller backs a registered exact EmbeddedAgentQueueHandle; both abort and cancel retain the user_abort default and combined caller/operator signal. Remove only that matching handle in finally. Source retention, foreground maintenance, runtime-generation admission, post-await owner checks, native locked-harness fallback, and deferred engine resource transfer have distinct lifetimes. No duplicated timer, abort listener, or generic retry loop is implemented here.
663 src/agents/embedded-agent-runner/run/auth-controller.ts READ — Retain scheduled auth refresh plus one retry: the mutable timer handle is cancelled by run/profile lifecycle and retries use distinct diagnostic reasons; delays already use the canonical clamp.
663 src/gateway/worker-environments/workspace-sync.ts READ — x01 canonicalized abort waiting; SSH retry delegates to its owner and forbids ambiguous stateful replay.
662 ui/src/pages/chat/components/chat-audio-player.ts READ — Abort timeout spans bounded body reading and ends before decoding.
661 apps/android/app/src/main/java/ai/openclaw/app/ConversationNotifications.kt READ — boundedConversationReplyStep is the one shared send/recovery timeout owner and preserves external cancellation while mapping step failure/expiry to unknown admission; notification publication separately fences generation.
661 apps/ios/Sources/Camera/CameraController.swift READ — photo/movie cancellation waits for AVFoundation terminal callbacks and joined session stop; AsyncTimeout would release ownership too early. Small safe candidate: inline single-caller sleepDelayMs into snap while keeping delay > 0, min(delay,10000), and exact nanosecond conversion. Not implemented under source freeze.
661 src/gateway/server/connection.ts READ — Handshake timer and asynchronous node drain belong to the connection owner.
660 src/agents/cli-runner.ts READ — RETAIN Fixed binding probes already call canonical sleep at 50/150ms after immediate first probe; no duplicate timer wrapper.
659 extensions/copilot/src/attempt-execution.ts READ — REJECTED: native AbortSignal.any retains parent propagation after deferred cleanup completes, whereas the existing finally detaches the parent listener; unused reason does not make this lifetime change equivalent.
659 src/auto-reply/reply/reply-run-registry.operation.ts READ — FULL worker large_runtime_reads Preserve: producer terminal, bounded slot release, and actual owner settlement are separate boundaries; stamp terminal before reentrant backend cancellation, install successor barrier before waking waiters, and retain single finalization lifetime.
659 src/mcp/channel-bridge.ts READ — Retain: waitForEvent abort resolves null and immediately deletes waiter/captures cursor gap; moving cleanup to Promise finally changes same-turn event behavior.
658 ui/src/pages/chat/talk/google-live.ts READ — Setup timeout synchronously owns WebSocket cleanup; frame timer is media cadence.
657 extensions/discord/src/monitor/thread-bindings.manager.ts READ — , EXCLUDED: periodic expiry sweeper with live binding identity checks and stop/drain ownership, not polling for operation completion.
655 src/agents/subagents/registry/subagent-registry-run-launch.ts READ — Ancestry traversal with visited-cycle protection; no retry, timer, or abort-listener implementation.
654 extensions/codex/src/app-server/native-subagent-model-source.ts READ — Actual abort-driven model-execution owner and event-driven source-change wait caller. Retain: cancellation is recorded before a native turn ID may exist, then interrupts that exact turn once it is bound; release detaches the listener and releases binding, completion custody, and source in order. captureNativeModelSource waits for owner/admission notifications using the already separate model-lookup wait owner and combines request/binding signals with AbortSignal.any; it is not a timed polling retry loop. No new sound simplification found.
654 src/config/sessions/session-history-worker-runtime.ts READ — 3s projection deadline cancels waiting and preserves original projection error; observation-only timeout changes behavior.
652 src/node-host/mcp.ts READ — Catalog success resets reconnect timing; timer ownership, session invalidation, and serialization remain distinct.
651 extensions/feishu/src/streaming-card.ts READ — 1-651; EXCLUDED, debounce/delegation. Only raw timer batches pending text at 160ms throttle with queue/finalization barriers; request timeouts delegate to fetchWithSsrFGuard and sends to requestFeishuApi. Truncated tail was separately reread 570-651.
651 src/agents/bash-tools.process.ts READ — carried / RETAIN Zero-delay native polling and custom cancellation/error behavior are intentional.
651 ui/src/pages/new-session/draft-gateway-state.ts READ — Two bounded retry schedules retain task generations, zero-delay task yielding, and separate exhaustion outcomes.
650 src/gateway/question-manager.ts READ — Waiters synchronously read terminal facts and unregister; expiry, cancellation, publication, and retained commits differ.
648 extensions/clickclack/src/discussions/service.ts READ — FULL READ (candidate); Recurring 60000ms reconciliation delegates to PluginServiceSchedulerV1; event subscription, fallback polling and pending-open recovery have separate admission/settlement ownership. No raw timer copy.
648 extensions/whatsapp/src/auto-reply/monitor.ts READ — Reconnect decisions/delays are delegated to the connection controller; the 30 s interval drives delivery recovery, not a duplicated sleep wrapper. Setup and active-close branches deliberately emit different messages/status and retain ownership.
645 src/media/playback-transcode.ts READ — Already uses canonical abort racing; pending job cancellation occurs only after its last waiter departs and never abandons active native inspection.
643 extensions/codex/src/app-server/run-attempt-connection.ts READ — Actual model-binding abort bridge, otherwise connection/policy preparation. Retain: upstream attempt cancellation already uses canonical createAgentHarnessAttemptCancellation; each replaceable model binding must separately call abortExplicitly(reason) and detach its old listener before releasing it. Combining these into a permanent signal would let a released model binding abort a successor or bypass explicit-cancellation bookkeeping. No independent timeout/retry helper remains.
642 apps/macos/Sources/OpenClaw/NodePairingApprovalPrompter.swift READ — retain eight startup attempts with 200/400/800/1600/2000 ms capped delays, source-lease revalidation, 15 s active reconciliation and zero-delay resync fast path. Existing Swift backoff owners are purpose-specific; adopting one would couple unrelated flows.
642 extensions/telegram/src/bot-handlers.inbound-media.ts READ — Album quiet timers, fixed maximum hold, revision fencing, predecessor heartbeat, and claim-settlement race are coupled to batch membership and durable ownership. A single timeout race cannot replace timers that are rescheduled when members join.
641 src/agents/sessions/tools/read.ts READ — RETAIN Synchronous abort rejection and queued byte-capture cancellation have unproved arbitration equivalence with shared Promise.race.
639 src/daemon/schtasks-runtime.ts READ — Poll shares remaining inspection budget and rejects post-deadline observations; takeover checks prior-process extinction.
639 src/gateway/worker-environments/session-attachment-service.ts READ — Cleanup spans maintenance passes with exact lease identity, ten attempts/one-hour budget, parked state and explicit reset.
638 apps/linux/src-tauri/src/desktop_node.rs READ — production 1–539; remainder cfg(test) — RETAIN: channel recv_timeout wakes early for changed desired state; cleanup failure retains unresolved process owners and retries before replacement, while ordinary 250ms ticks collect diagnostics/observe exit. Replacing with sleep loses immediate updates and cleanup ownership.
638 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-approval.ts READ — multi-room approval polling combines passive evidence and bounded active sync, with a minimum 25 ms final pause and exact timeout text.
638 extensions/telegram/src/bot-handlers.callback-router-controls.ts READ — Submit conflict retries retain exact [250, 1000, 2500] delays, participant settlement, and wrapped terminal errors. Duplicated result/error handling is a possible small simplification, but needs explicit cancellation/error-identity proof; no unconditional recommendation.
637 ui/src/components/terminal/terminal-connection.ts READ — Liveness depends on inbound activity, idle resets, stream count, and two-failure reconnect policy.
635 src/agents/agent-bundle-lsp-runtime.ts READ — RETAIN Pending-request registry owns deadlines and request-specific $/cancelRequest; shutdown already uses settlesWithin.
634 extensions/discord/src/voice/transcripts-source.ts READ — manager readiness wait can theoretically use combined raceWithTimeout, but its synchronous waiter removal would move to a microtask and the net reduction is marginal; occupancy subscription has a distinct long-lived owner.
634 src/infra/restart-stale-pids.ts READ — synchronous supervisor recovery polling needs synchronous wait including its fallback; no equivalent existing canonical sync sleep found.
632 src/agents/sandbox/browser.ts READ — APPLIED Replace only bounded <=150ms poll delay with canonical un-signaled sleep; per-request fetch abort timer and zero-delay scheduling remain unchanged.
632 src/state/openclaw-state-db-readonly.ts READ — Caller abort closes retained snapshot lifecycle; cleanup revocation and external cancellation retain distinct owners.
632 src/wizard/session.ts READ — Expiry defers cancellation across durable preparation/commit boundaries; per-step abort removes the matching answer/prompt and lifetime cleanup joins runner.
631 extensions/imessage/src/approval-handler.runtime.ts READ — The single 1100 ms node:timers/promises wait enforces native Messages ordering between prompt and poll balloon. It has no custom timer/abort cleanup to delete. Removing or shortening it changes visible ordering. Substituting the canonical sleep import would not reduce implementation complexity or lines.
629 apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayDiscovery.kt READ — five-second DNS refresh cadence follows completed refresh, system-DNS fallback switches resolver rather than reissuing an equivalent generic attempt, and native cancellation maps to Android CancellationSignal.
628 extensions/codex/src/app-server/bounded-turn.ts READ — actual elapsed-budget timeout plus one executable-selection recovery. Timeout aborts requests, records a distinct TimeoutError identity, and joins native interrupt/client closure before returning. The retry reuses the same monotonic deadline and may only occur for an owned isolated client. A generic race would return before mandatory interruption/resource cleanup or require reconstructing the same lifecycle.
626 extensions/voice-call/src/manager/outbound.ts READ — Notify hangup timer belongs to active-call identity, mutation ordering and tracked shutdown work; it is not a Promise timeout wrapper.
625 extensions/memory-core/src/memory/manager-database-context.ts READ — Publication retry is entered/committed-aware and deadline-bounded; it reacquires native writer admission and can stop when revision preparation declines. A generic exception retry would complicate those semantics.
624 src/agents/subagents/registry/subagent-control-kill-scope.ts READ — Queued refresh worklist and publication drains; each selected descendant is captured once, not retried after failure.
624 src/agents/subagents/registry/subagent-registry-lifecycle-announce-cleanup.ts READ — Retain: delivery deadline aborts queued admission but clears on execution start, preserving the requester execution budget and durable cleanup outcome.
624 src/gateway/worker-environments/node-bootstrap-artifact-build.ts READ — Archive-entry/pipeline race enforces backpressure; one rebuild repairs a mismatched prebuilt artifact rather than transient failure.
622 src/gateway/probe.ts READ — Connection/detail phases reset deadline and join shutdown before resolution; cache TTL excluded.
621 apps/ios/Sources/Web/AuthenticatedControlUIWebView.swift READ — five-second deadline enables upgrade guidance independently of a stalled WebKit query; late status/marker results can clear guidance, and document identity fences navigation. Not a reject/cancel timeout.
620 apps/ios/WatchApp/Sources/WatchRealtimeCallController.swift READ — Reconnects join attempt teardown before audio/transport replacement; media readiness deadline and user-visible failure have lifecycle ownership.
620 apps/macos/Sources/OpenClawDiscovery/GatewayDiscoveryModel.swift READ — Distinct 35-second discovery loops preserve distinct linear schedules; unused-argument one-caller Tailscale predicate can collapse to the owned beacon array's isEmpty.
620 extensions/browser/src/browser/pw-tools-core.interactions.content.ts READ — APPLIED: one-shot upload-file abort race; screenshot timeout already uses canonical helper, and executable waits retain document binding and full native navigation guard lifetime.
619 src/agents/subagents/registry/subagent-registry-run-wait.ts READ — (carried parent) Retain: generation-fenced durable reconciliation owns retry scheduling.
618 extensions/discord/src/voice/audio-worker.ts READ — two attempts share an elapsed connect budget; SDK entersState owns readiness and recovery waits; packet silence and playback lifecycle timers are not generic retry wrappers.
618 extensions/facetime/src/helper-rpc.ts READ — FULL READ (candidate); Auth timers are socket-owned and RPC deadlines are transaction-map-owned, removed synchronously on response/stop. Replacing these with observer races would retain pending admission or move cleanup ordering.
616 extensions/matrix/src/matrix/client/shared.ts READ — retirement deadline already consolidated by x01; leases, poisoning, late drain, and disposal completion cannot collapse into caller-only abort handling.
615 src/system-agent/greeting.ts READ — Timeout already canonical; synchronous CAS attempts cannot become async retries.
615 ui/src/components/sidebar-menus-controller.ts READ — Plugin actions delegate cancellation; timers implement hover/preload ownership.
614 extensions/qa-lab/src/mantis/visual-task.runtime.ts READ — APPLIED settle timer copy replaced by Node sleep, net -1 LOC; command/image timeouts delegate to their existing owners.
613 extensions/synology-chat/src/outbound-media.ts READ — FULL READ (candidate); Serving timeout holds the account slot until finish/close and suppresses late store reads; prepare uses native AbortSignal.timeout. Resource lease state is required, not a Promise-only timeout wrapper.
613 src/acp/control-plane/manager.turn-runner.ts READ — FULL self Preserve: backend sequence contains at most two fresh-handle attempts per backend; retries require pre-authoritative-prompt/no-output facts. Model revocation links exact accepted-turn controller and releases only after cancellation settlement; handle reconciliation and oneshot cleanup remain fenced.
613 src/daemon/launchd-runtime.ts READ — Bootstrap retry requires pending teardown, EIO classification, ExitTimeOut budget and native authority; generic retry mismatches deadline/results.
612 apps/android/app/src/main/java/ai/openclaw/app/wear/WearProxyBridge.kt READ — exact two-attempt peer discovery distinguishes Play Services task cancellation from actor cancellation; event retry excludes already-delivered peers and revalidates peer generations; no equivalent canonical retry exists.
612 extensions/clickclack/src/discussions/service-open.ts READ — FULL READ (candidate); Four immediate name-conflict attempts interleave relisting, durable reservation and current-authority checks. Last-error identity and ambiguous-create recovery/quarantine are domain behavior, not generic retry plumbing.
611 extensions/xai/xai-oauth.ts READ — Retain pending proof: local device sleep differs from canonical sleepWithAbort on zero/oversized delays; fixed refresh retry only retries non-structured Cloudflare responses and preserves error wrapping.
611 ui/src/lib/session-pull-requests.ts READ — Canonical set-sync/retry owners; remaining timers debounce per-session intent.
610 apps/android/wear/src/main/java/ai/openclaw/wear/WearRealtimeTalkClient.kt READ — Two channel attempts retain non-cancellable resource close before 250 ms retry; playback polling tracks cumulative PCM deadline and current attempt.
609 src/agents/embedded-agent-runner/prepared-compaction-runtime.ts READ — FULL 1-609 Preserve; controller-factory match. Creates one runAbortController, passes its signal into admitted coding tools, and returns it with the prepared runtime for downstream execution ownership. No local abort listener, timer, or retry loop is present. Iteration over MCP/LSP disposal is resource cleanup, not retry. Retain once-only tool disposal/skill-environment restoration and prepared tool/auth/prompt facts rather than introducing another timing owner.
608 src/media-understanding/shared.ts READ — APPLIED: canonical sleep replaces bounded positive integer poll timer; identical 2,147,000,000ms cap and deadline error.
606 apps/android/app/src/main/java/ai/openclaw/app/gateway/GatewayTls.kt READ — probe runner holds its worker slot until blocking native DNS exits, while the caller can time out; system-trust fallback divides the same remaining connect/handshake budget and retains failure classification.
606 ui/src/components/browser/browser-client.ts READ — Screenshot timeout aborts fetch through body consumption with its existing DOMException.
606 ui/src/pages/chat/talk/shared.ts READ — Final events, timeout, abort, and empty-final grace share synchronous cleanup.
605 src/gateway/desktop/session-registry.ts READ — Linger/unclaimed timers retain source ownership; readiness races attachment against invocation termination.
603 src/agents/tools/media-generate-background-shared.ts READ — RETAIN x01 migrated handoff delays; interval owns keepalive and detached completion lifetime.
602 extensions/telegram/src/polling-session.ts READ — Graceful-stop deadline already canonical from x01. Forced-cycle timeout starts only after watchdog-requested restart, while account abort and bot/media cancellation have distinct paths. Replacing it with a race armed at polling start would change behavior.
601 apps/macos/Sources/OpenClaw/ComputerActionService.swift READ — retain synchronous cancellation arbitration, FIFO execution, lifecycle generations, joined active work, and 100 ms failed input-release retries. A nonjoining timeout would surrender synthetic-input ownership early.
601 src/talk/agent-consult-runtime.ts READ — Lifecycle/caller abort feed admitted consult owner; admission stays held until cleanup.
599 extensions/browser/src/browser/pw-tools-core.interactions.navigation.ts READ — APPLIED: raw positive grace sleep; dual cancellation/interruption and late native settlement preserve policy-denial precedence and dialog reconciliation.
599 extensions/telegram/src/webhook.ts READ — Initial getMe failures reject startup, while asynchronous setWebhook retry keeps the registered route alive and later shuts it down on permanent failure. Infinite retries already use canonical sleep/backoff; shared finite retryAsync is not equivalent. Shutdown phases retain independent failure handling.
599 src/plugins/host-hook-runtime.ts READ — x01 consolidated race; remaining loop joins handlers added during settlement and preserves expired-context fence.
599 src/realtime-transcription/websocket-session.ts READ — Already RetrySupervisor/sleepWithAbort; readiness, stale socket generation and final transcript grace need distinct timers.
598 src/agents/mcp-ui-resource.ts READ — RETAIN Expiry retires one exact view, clears grants/context, and releases runtime custody.
598 src/node-host/node-worker-bundle-installer.ts READ — Retry allowance depends on retained download progress; busy responses and exact jitter are domain policy.
597 extensions/matrix/src/matrix/thread-bindings.ts READ — , EXCLUDED: 30s persistence debounce and 60s expiry sweep own durable snapshots and farewell effects; neither is a completion wait.
597 ui/src/plugins/control-ui-runtime.ts READ — x01 already adopted canonical races; grant interval and registration aborts own live authority.
596 apps/ios/Sources/LiveActivity/LiveActivityManager.swift READ — separate voice/tool leases refresh staleDate every 240 seconds while their producers live; generations prevent stale task cleanup from clearing replacements. 500 ms voice sampling is ordinary coalescing. No canonical periodic lease owner.
595 src/agents/embedded-agent-runner/compact.ts READ — FULL 1-595 Preserve. The abort listener closes an AsyncWorkScope under the exact captured async context. Logical caller completion and actual work settlement differ: drain all work, then release the prepared runtime generation, then remove the listener. A simple abort race would detach authoritative work or release the generation early. Model fallback already delegates to runWithModelFallback; preserve locked-harness/native-compaction and primary auth/runtime-plan boundaries.
595 ui/src/components/canvas-widget-view.ts READ — Retry invalidates current Lit binding; server retry floor remains uncapped.
593 apps/macos/Sources/OpenClaw/TalkMLXSpeechSynthesizer.swift READ — retain one helper recreation retry, id-scoped cancellation/fallback mapping, cancellation grace and idle shutdown. Stream stall already uses AsyncTimeout; shutdown joins the owned helper and pipes. Generic MainActor scheduling would change actor isolation.
593 extensions/google/video-generation-provider.ts READ — Retain: local timeout has exact TimeoutError surface; canonical fetch timeout would add diagnostics. Poll loop waits before each of 120 requests, unlike read-first pollProviderOperation.
593 src/skills/runtime/remote.ts READ — Already uses abortable sleep; failure backoff is a direct capped expression keyed by probe signature and pairing generation; generic policy would add machinery and random draws.
590 src/auto-reply/reply/reply-run-registry.registry.ts READ — FULL carried from lead Preserve: optional-unbounded admission and abort-false waits own paired timer/listener cleanup; state polling revalidates admitted database sources. Canonical helpers alone do not express those policies.
589 src/infra/sqlite-snapshot-single-flight.ts READ — cancellation services retained cleanup and sibling leases; observation races cannot replace it.
587 src/system-agent/setup-inference-core.ts READ — Provider-auth abort waiting is already canonical with its specific cancellation error.
586 apps/android/wear/src/main/java/ai/openclaw/wear/WearProxyClient.kt READ — whole-RPC deadline spans discovery, transport and reply, invalidates only the attempted preferred-phone registration, and clears the exact pending request; callback bridge differs intentionally from phone-side cancellation mapping.
586 extensions/diffs/src/browser.runtime.ts READ — Render retries deliberately reduce scale rather than repeat an unchanged operation; shared browser idle timer belongs to reference-counted lifetime and close ownership.
586 extensions/matrix/src/cli-shared.ts READ — , EXCLUDED: zero-delay CLI exit schedules stdout/stderr flushing before process exit; replacing it with generic sleep would obscure ordering without a structural win.
586 extensions/telegram/src/bot-handlers.message-pipeline.ts READ — Native AbortSignal.any already combines operation-time ALS ownership and explicit buffered participants. Settlement holds fence durable adoption against cancellation; no duplicated timeout implementation remains.
586 src/agents/prepared-model-runtime.build.ts READ — RETAIN runAbortableTimeout handles bounded observation; raw completion separately serializes later writes and abandoned-generation cleanup.
585 extensions/active-memory/index.ts READ — Hook deadline is re-armed across preflight and recall budgets, with publication authority checks; replacing it with one generic timer changes phase behavior.
584 src/config/sessions/session-accessor.sqlite-maintenance-kick.ts READ — Refreshable quiet window, bounded planning rejection count and age deadline belong to maintenance owner; one-line backoff is already simpler.
582 extensions/codex/src/app-server/sandbox-exec-server/http.ts READ — Actual session-abort/process-cleanup owner. Retain: session abort marks backend finalization failed and begins idempotent owned-child termination; headers may resolve the RPC while the response body and backend cleanup are still running. The completion deferred joins either natural child settlement or termination failure, so replacing it with an observational abort race would release custody too early. HTTP timeout is passed unchanged into the isolated Python urllib transport; there is no hand-written request retry loop.
581 src/agents/subagents/announce/subagent-announce-completion-delivery.ts READ — Retain: observer timeout is separated from private execution cancellation; acceptance/execution clears the timer, source invalidation aborts execution, and typing is disposed.
581 ui/src/components/terminal/terminal-panel-upload.ts READ — Retained upload batch owns cancellation; explicit retry resumes completed-file progress.
579 extensions/clickclack/src/http-client.ts READ — FULL READ (candidate); Optional abort-only request deadline spans response processing; only ephemeral publication supplies 15000ms. Private init.signal preservation branch has no current callers supplying a signal, but removing the condition is a very small option cleanup, not a new shared owner.
579 extensions/tlon/src/urbit/sse-client.ts READ — FULL READ (candidate); Candidate: delete private production-unused autoReconnect/maxReconnectAttempts/reconnectDelay/maxReconnectDelay options and fields, retaining current default 10-attempt batches, 10s reset and 1s..30s backoff. Keep cancellable header-only deadline, same-channel replay and 404-only channel recreation.
579 src/node-host/runner.ts READ — Interval keeps foreground process alive; reconnect policy belongs to Gateway client.
579 ui/src/app/native-conversation-bridge.ts READ — bounded() synchronously revokes authority, disposal hooks, and work on settlement.
577 extensions/workboard/src/lifecycle-sync.ts READ — Generation-fenced recurring reconciliation joins store operations and independently checks Gateway readiness; generic retry adds no simplification.
577 src/state/user-profile-github-identity.ts READ — Three immediate attempts bind live attribution authority to read without retrying or normalizing errors.
576 extensions/browser/src/browser/routes/agent.act.ts READ — EXCLUDED — Timer hit is browser-injected highlight restoration; all host deadlines delegate to createExistingSessionDeadline.
576 src/agents/subagents/registry/subagent-registry-lifecycle-wake.ts READ — Retain: future timer retains exact wake generation/deadline and source context; same-episode continuation and pending rearm must survive publication.
575 src/infra/triage-continuation.ts READ — candidate: private parent IPC exchange can reuse timeout/abort race; process cleanup timers must remain. Update-owner dependency, handed to lead.
575 src/media-understanding/image.ts READ — APPLIED: canonical optional timeout/abort observation; preserves initial abort, source-first outcome, exact Error/non-Error mapping, cooperative controller abort and separate setup/request budgets.
573 extensions/qa-lab/src/suite-runtime-agent-session.ts READ — FTS-only retry loop preserves exact schedule and raw terminal rejection; generic retry normalization is a contract difference.
573 extensions/whatsapp/src/login-qr.ts READ — x01 already consolidated waitForWebLogin deadlines. QR-start timer begins before socket creation and clears on the first QR, while recovered-login races can finish without QR. After authorization, replaced rejecting deferred plus late result mapping with a directly resolved failure/QR result, preserving timer points and exact displayed failure. Now 569 lines; regression proof pending with lead.
572 src/agents/subagents/registry/subagent-control-kill.ts READ — Frontier discovery and publication drains; visited-map intentionally prevents stopping the same execution twice.
572 ui/src/components/session-lineage-controller.ts READ — Refresh re-enters route ownership; descriptor loop handles invalidated reconciliation receipts.
571 extensions/feishu/src/monitor.account.ts READ — 1-571. Reaction verification uses async.ts. Account cancellation is already native AbortSignal.any; shutdown must abort, stop durable ingress, then drain detached tasks including tasks appended while closing.
571 extensions/memory-lancedb/embeddings.ts READ — (parent) — Parent confirmed full READ before this delegated pass; x01 already centralized outer timeout; native-work deadline and query cancellation retain cleanup custody.
571 extensions/qa-lab/src/live-transports/matrix/substrate/client.ts READ — registration is a four-stage UIAA negotiation, not retries; room join loop sleeps 300×attempt including terminal failure before wrapping its error.
571 src/agents/command/attempt-execution.helpers.ts READ — APPLIED Replace bare 250ms referenced transcript grace timer with canonical sleep; both transcript scans and diagnostics unchanged.
570 extensions/codex/src/app-server/sandbox-exec-server/filesystem.ts READ — EXCLUDED as an independent timed wait: the controller belongs to a connection-owned buffered file handle; close cancels pending reads while retaining reservations until physical settlement. Repeated identity checks after stat and readFile protect live ownership, not defensive duplicate validation.
570 extensions/matrix/src/approval-handler.runtime.ts READ — delivery retries already delegate to retryAsync, preserving exactly 3 attempts at 250/500ms and per-error opt-out.
570 src/agents/embedded-agent-runner/run/attempt.ts READ — FULL 1-570 Preserve: per-attempt controller and cleanup coordinator. Model-policy signal, resource-parent signal, logical transcript authority, and physical run controller intentionally differ. Yield queues its interrupt before aborting; external abort handling delegates to the existing controller owner. Session resources transfer before bounded cleanup to avoid double disposal. Successful completion retains tool cleanup and genuine abort listener until accepted tool work settles; cancellation/error performs immediate joined cleanup. A generic abort race would break these authority and cleanup boundaries.
569 extensions/browser/src/browser/server-context.lifecycle.ts READ — REJECTED: direct waiter rejection gives same-turn abort priority over an already-settled source, unlike canonical Promise.race; preserve existing owner.
568 extensions/browser/src/gateway/browser-request.ts READ — EXCLUDED — Timeout and abort coordination delegates to sdk-node-runtime and native AbortSignal.any; no local wait implementation.
566 apps/android/app/src/main/java/ai/openclaw/app/wear/WearRealtimeChannelRegistry.kt READ — claim polling has a deadline, but an already-reserved promotion must finish its bounded handoff afterward; teardown keeps physical cleanup alive after handoff timeout and fences owner/generation.
566 src/agents/worktrees/service-preparation.ts READ — RETAIN Setup failure aborts the owned process and awaits settlement before rollback; capacity retries retain publication/cleanup and allocation lock ordering.
566 ui/src/lib/chat/chat-metadata-store.ts READ — Existing helpers retain queued-request barriers and retry eligibility.
563 extensions/matrix/src/matrix/monitor/index.ts READ — main monitor races canonical waitUntilAbort against fatal sync termination, then joins cleanup; lease and task signals have separate owners.
563 src/agents/bash-tools.exec-approval-followup.ts READ — APPLIED Replace bare unref backoff wait with canonical sleepWithAbort without a signal; retain first-error immediate retry and accepted-run delivery ownership.
561 extensions/browser/src/browser-proxy-upload.ts READ — x01 already consolidated lock abort race; cleanup/recovery timers are keyed retained-artifact owners with explicit cancellation and startup restoration.
561 extensions/browser/src/browser/extension-relay/relay-session-owner.ts READ — Timer bounds only Fetch/Runtime close while Target cleanup remains separately awaited; aggregate finally clears it on Target failure, so a single timeout wrapper changes the boundary.
561 src/agents/agent-bundle-mcp-manager-lifecycle.ts READ — RETAIN Scheduler owns recurring sweeps/shutdown; keyed chains serialize acquisition and disposal.
560 extensions/qa-lab/src/multipass.runtime.ts READ — every failed attempt including terminal failure is logged, while only nonterminal attempts sleep; canonical retry onRetry would omit terminal logging and alter rejection handling.
560 packages/gateway-client/src/session-subscriptions.ts READ — await loops serialize wire ownership and compensation; numerical retries would replay different subscription operations.
559 extensions/qa-lab/src/live-transports/slack/channel-e2e.ts READ — correlated reply polling intentionally probes first, preserves exact receipt ownership, and uses native abortable sleep; no copied timer primitive.
558 extensions/matrix/src/matrix/actions/verification.ts READ — 250ms/25ms-minimum polling paths keep distinct readiness/rejection diagnostics and last observations; no matching canonical result-preserving poll owner found.
556 packages/sdk/src/run-event-replay.ts READ — computeBackoff/sleepWithAbort already canonical; replay loop observes different run/history states and activity revisions, with independent unavailable/pending budgets.
556 src/meeting-bot/browser-controller.ts READ — Canonical sleep already used; join/recovery loops preserve adoption, navigation errors and final deadline checks.
555 extensions/matrix/src/matrix/monitor/verification-events.ts READ — one native timer Promise can become node:timers/promises sleep with the same 750ms/default and test override semantics; 2-line net win, source left frozen.
555 src/process/spawn-broker/resource-server.ts READ — Socket-native attachment timeout; initialization and close receipts retain native custody.
554 apps/macos/Sources/OpenClaw/CuaDriverHostCoordinator.swift READ — retain 10 s readiness loop (50 ms), post-probe generation/permission revalidation, explicit five restart delays, and close-liveness/TERM/KILL staged cleanup with 25 ms process polls. No canonical helper owns this Foundation Process/TCC lifecycle.

@steipete

steipete commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Retry/timeout coverage log — part 3/7

Full READ inventory

Lines at read Production file Outcome / retained contract
553 src/infra/sqlite-transaction.ts READ — retries BEGIN against original deadline only; admitted writes and commit are never replayed.
552 extensions/browser/src/browser/server-context.tab-ops.ts READ — Discovery polling already uses canonical sleep; success adoption and error compensation require exact target identity, so no further safe retry consolidation.
552 src/security/audit-extra.async.ts READ — x01 simplified timer; Docker abort can synchronously reject work, requiring preserved DockerProbeTimeoutError precedence.
551 ui/src/lib/board/gateway-provider.ts READ — x01 adopted sleep; accumulation, generation fencing, offline admission, and wakeable retries remain.
550 apps/linux/src-tauri/src/runtime_action.rs READ — production 1–547; cfg(test) external module declaration at 548–550 — RETAIN: activation health loop checks current authority before each capture, verifies exact runtime/service/listener ownership, stops on explicit pause or existing deadline and preserves recovery command/error surface. No matching generic blocking helper.
549 src/agents/code-mode-controller-source.ts READ — RETAIN Guest timers are bridge requests with quotas, cancellation IDs, and VM snapshot ownership.
549 src/agents/prepared-model-runtime.configured-refresh.ts READ — RETAIN Abort races are already shared; bounded adoption retries join owner settlement and revalidate publication/config authority.
549 src/gateway/server/ws-connection/worker-connection.ts READ — Timer is credential TTL; abort lifetime owns concurrent socket-bound tools and bounded FIFO frames.
548 src/auto-reply/reply/reply-run-registry.message-injection.ts READ — FULL 1-548 Preserve: cancellation policy owner, not a retry loop. Source-bound and concrete backend authority compose at the guarded sink. Acceptance, transcript commitment, unsupported rejection, and indeterminate question dispatch retain different custody. Only confirmed accepted work can trigger target abort for unconfirmed transcript/adoption error; indeterminate input must never abort independent backing work. Keep synchronous queue admission, captured target identity, exactly-once acceptance, and post-commit provenance. No duplicate timer/listener helper to consolidate.
547 extensions/fal/video-generation-provider.ts READ — APPLIED: canonical sleep for already-normalized positive poll delay; preserve provider status-specific timeout text and the separate result HTTP request.
546 src/agents/subagents/swarm/swarm-scheduler.ts READ — Retain: retry readiness preserves FIFO reservation after undurable launch failure; abort removes only the exact queued item and joins admitted launch cleanup.
545 extensions/browser/src/browser/cdp.helpers.ts READ — Fetch timer remains live through caller-owned response consumption and release; release aborts before body cancel/guard disposal, which a request-only timeout race cannot preserve.
545 packages/agent-core/src/harness/env/kill-tree.ts READ — grace/taskkill timers authorize synchronous, identity-bound process signaling; timeout observation cannot replace retained escalation or settlement callbacks.
545 src/config/io.runtime.ts READ — Three fresh-reader attempts specifically retry path-selection conflicts and preserve arbitrary thrown values.
544 apps/ios/Sources/Voice/VoiceWakeManager.swift READ — recognition failure schedules one 700 ms restart while suppression and generation ownership prevent old callbacks from restarting capture; the 40 ms loop drains a realtime audio handoff, not request polling.
541 extensions/browser/src/node-host/invoke-browser.ts READ — EXCLUDED — Existing SDK timeout helper owns staging/dispatch/status waits; local deadline only apportions the same budget across stages.
541 extensions/discord/src/monitor/provider.lifecycle.ts READ — two-stage disconnect/terminate barrier and runtime READY status watch retain separate lifecycle facts; the fixed 250ms unref polling sleep can delegate to sleepWithAbort without a signal (small win).
538 src/agents/runtime/proxy.ts READ — carried / RETAIN Fetch and response-body deadlines have distinct custom errors and cancellation lifetimes.
537 extensions/llama-cpp/src/llama-server-install.ts READ — REJECTED abort-race replacement: direct reject listener and pending.then settlement have different synchronous-abort precedence from canonical Promise.race; serialized install retains custody.
537 extensions/slack/src/monitor/media.ts READ — total download race already x01; suppressing late abort rejection preserves the timeout error, while event-URL refresh has a distinct two-location fallback contract.
535 extensions/signal/src/monitor.ts READ — FULL READ (candidate); Startup endpoint, spawn and readiness share one absolute deadline with authority rechecks; already uses native AbortSignal.any/timeout. Task drain tracks accepted work across daemon stop.
535 packages/ai/src/transports/transport-stream-shared.ts READ — x01 canonicalized lifecycle abort race. Remaining zero-delay timeout must yield a macrotask; sleepWithAbort(0) returns immediately.
534 extensions/browser/src/browser/pw-tools-core.downloads.ts READ — Passive upload arm intentionally outlives caller, atomic upload joins native completion, and superseded page owners share cleanup debt; timers begin at different admission points.
532 apps/android/app/src/main/java/ai/openclaw/app/voice/VoiceWakeManager.kt READ — Error-specific recognizer delays and generation/operation fencing remain in the speech owner; delay is already canonical.
532 src/agents/sessions/tools/grep.ts READ — RETAIN Cancellation, child killing, stream failures, limit termination, and asynchronous formatting share settlement.
528 extensions/xai/realtime-voice-bridge.ts READ — Retain: canonical lifecycle/connect deadline and abortable sleep; xAI reconnect additionally fences unacknowledged tool outputs and session-resumption state.
527 src/worker/worker-connection.ts READ — Canonical backoff/sleep/abort race; admission consumes absolute budget and replay retains identity.
525 src/gateway/worker-environments/placement-turn-claims.ts READ — Waiters unregister synchronously on release/abort/timeout and reread after registration to prevent lost wakes.
524 src/agents/workspace-access.ts READ — RETAIN Abort revokes binding lifetime and watches; post-await authority checks preserve committed-write evidence, and attachment deadlines propagate to producer.
524 src/infra/update-immutable-service.ts READ — Native node:timers/promises delay already owns 100 ms sleeps. Stop polling requires successful systemd facts, empty cgroup, changed process generation, repeated live-authority checks, and a monotonic deadline. A retry helper would lose the success/failure-state distinctions or merely wrap the same loop.
523 extensions/slack/src/monitor/provider-support.ts READ — native reconnect patch must expose the timer through the SDK reconnectionTimer field; the separate waiter abort relay is a small AbortSignal.any candidate, with pre-abort behavior requiring care.
523 src/infra/clawhub-client.ts READ — timeout survives response headers until body owner releases it; observation race would clear the deadline too early.
520 src/infra/shell-env.ts READ — child-exit timeout bounds inherited pipe drain separately from spawn deadline; exact terminal isolation and output handling remain necessary.
520 ui/src/components/app-sidebar-session-catalog-live.ts READ — Distinct startup/ordinary attempts, server hints, progressive results, and visibility gates.
518 apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionSidebarCatalogs.swift READ — Refresh cadence is 30 seconds or 600 seconds depending on advertised events, with immediate trailing invalidation and page-window fences; direct Task.sleep already owns the wait.
517 extensions/qa-lab/src/mantis/run.runtime.ts READ — abort listener records the beginning of the owned cleanup budget, rather than racing a promise; retain worktree and artifact custody.
517 src/agents/exec-auto-reviewer.ts READ — carried / RETAIN Direct synchronous abort rejection precedence differs from a shared Promise.race observation.
517 src/secrets/egress-proxy/proxy-forward.ts READ — Five-minute timer owns request upload refusal, body budget release and socket teardown; asynchronous result racing does not match this event-driven transport owner.
516 src/agents/subagents/registry/subagent-registry-state.ts READ — (subscout) Projection/enumeration; invalidated consumption re-enters canonical preparation owner, without independent retry policy.
515 extensions/qa-lab/src/live-transports/discord/channel-e2e.ts READ — reply polling uses native abortable sleep and revalidates authority after awaits; stop joins pending writes before cleanup.
514 extensions/qa-lab/src/live-transports/slack/slack-live.observations.ts READ — stored-message polls intentionally probe before deadline check, then clamp sleep; exact message lookup and timeout labels must remain.
514 src/state/openclaw-agent-worker-store.ts READ — Shutdown abort releases execution grace retention while accepted publications and cleanup remain joined.
512 extensions/telegram/src/bot-message.ts READ — Post-irrevocable-adoption persistence retry holds the participant until durable protection or cancellation; returning a generic retry failure would release the wrong owner. Delay and abortable sleep already use their canonical owners.
511 extensions/codex/src/app-server/sandbox-exec-server/processes.ts READ — waitForProcessUpdate owns the process wait-list entry plus a capped 30-second timer, removing the same entry synchronously when either wins. A generic race still needs a deferred and waiter cleanup and does not simplify this 12-line owner. The 60-second timer is closed-process retention, not retry.
509 apps/ios/Sources/Screen/ScreenRecordService.swift READ — cancellation during ReplayKit startup retains the capture lease until startup and matching stop settle; duration cancellation then joins stop and ordered writer discard. Shared timeout intentionally has different cleanup semantics.
509 src/tui/tui-plugin-approvals.ts READ — Expiry transitions selected approval/overlay ownership rather than timing one promise.
509 ui/src/pages/profile/model-accounts.ts READ — Serial status polling stops at server deadline; replacement with interval polling changes cadence.
508 src/process/supervisor/service-child-windows-job-native.ts READ — Native ABI and handle transfer owner; no retry/timeout duplicate.
507 apps/shared/OpenClawKit/Sources/OpenClawChatUI/Swarm.swift READ — Capability retries use exactly 1/2/4 seconds with session and generation admission; the separate 250-ms event debounce supersedes the same task intentionally.
507 extensions/anthropic/cli.runtime.ts READ — Retain: idle TTL closes only warm session ownership; turn abort closes transport and invalidates live tool authority, not a duplicated promise race.
507 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-state-files.ts READ — persistence polling owns SQLite/legacy identity evidence and fixed 100 ms terminal sleeps; condition helper changes timing/error surfaces.
507 src/state/openclaw-agent-db-admission.ts READ — Already canonical abort race; shared admission survives one cancelled waiter and stops only after last departure.
506 extensions/anthropic/session-catalog-listing.ts READ — Existing canonical withTimeout call bounds response observation; poll hits describe cache/read semantics.
506 ui/src/lib/sessions/session-placement-startup.ts READ — x01 adopted sleep; retain lookup, empty-placement, overall limits, and compensation.
505 extensions/codex/src/migration/apply.ts READ — Marketplace discovery polls immediately, returns the last response on the 30-second discovery deadline, caps each request to the remaining budget, and caps the final 250 ms sleep. Already uses canonical sleep; generic retry would change return/error surfaces and introduce policy machinery. This imports from a current Codex installation, not a dated OpenClaw persisted-schema migration that can be removed under July-only policy.
504 ui/src/app/app-shell-gateway.ts READ — Authoritative-roster debounce with explicit shell teardown.
502 src/agents/embedded-agent-runner/run/llm-idle-timeout.ts READ — Retain stream watchdog ownership: first-event and inter-event budgets, provider/tool heartbeats, producer completion, immediate caller-abort precedence, and retained late iterator cleanup are distinct contracts.
501 src/infra/update-candidate-snapshot.ts READ — Output/progress abort is distinct from the canonical IO watchdog. AbortSignal.any reaches process-tree custody; progress persistence and uncertain child cleanup are joined before outcome projection. Both cleanup-error precedence and retained scratch are necessary.
498 src/gateway/net.ts READ — Bind deadline retains late-listening cleanup; a generic race adds plumbing without simplification.
497 apps/macos/Sources/OpenClaw/MenuBar.swift READ — retain AppKit terminateLater reply owner and nonjoining cleanup/deadline tasks; any AsyncTimeout rewrite needs proof of MainActor/AppKit callback scheduling and exactly-once reply. Startup/onboarding waits are ordinary UI timing.
497 apps/shared/OpenClawWatchRTC/src/lib.rs READ — Excluded: C ABI adapter feeds Input::Timeout(Instant::now()) to str0m and projects Output::Timeout deadlines; str0m owns timing, retransmission, and polling policy.
497 extensions/imessage/src/client.ts READ — , SIMPLIFIED; Request-scoped raceWithTimeout now owns deadline cleanup; removed PendingRequest.timer and duplicate clear branches from reply handling/fail-all. The deadline still starts before stdin write, nonpositive timeouts remain disabled, and pending ids are removed synchronously on reply, timeout, or transport failure. x01's child-reap consolidation is unchanged.
497 extensions/slack/src/monitor/ingress.ts READ — durable claim/session/channel settlement gates and abort listener preserve deferred lane release and channel-ID migration ordering; generic cancellation cannot replace those facts.
497 src/agents/subagents/registry/subagent-registry-read-snapshot.ts READ — (subscout) Retain: invalidated physical/publication/topology observations retry with source authority intact; these are coherence protocols, not generic backoff.
496 apps/macos/Sources/OpenClaw/QuickChatWindowPicker.swift READ — EXCLUDED from custom timing consolidation: direct 80 ms capture-settle and 450 ms success-display waits; provider owns discovery timeout. Tokens fence stale captures.
496 extensions/qa-lab/src/live-transports/matrix/substrate/fault-proxy.ts READ — per-request AbortControllers are necessary to cancel active upstream requests before server close; no abort race copy.
496 src/agents/shell-snapshot.ts READ — RETAIN Deadline, exit grace, close, and late spawn jointly own tree termination.
496 src/meeting-bot/transcripts-bridge.runtime.ts READ — Three delivery attempts preserve non-delivery handling and raw logger exceptions; retry adapter would add complexity.
495 extensions/browser/src/browser/extension-relay/relay-fetch.ts READ — x01 already uses raceWithTimeout for physical retirement; the remaining Fetch state machine enforces real exclusive ownership, pause stages, and native cleanup debt.
494 src/infra/update-startup-auto-run.ts READ — Retry history is an authoritative update decision, and handoff cancellation retains successor custody.
493 extensions/qa-lab/src/qa-transport.ts READ — this is the existing canonical QA condition poller and transport readiness owner; consumers already reuse its exact timeout contract where applicable.
492 extensions/active-memory/recall.ts READ — Two-stage race retains one watchdog across partial usable-memory fallback and distinguishes terminal-search cancellation from real timeout/circuit-breaker effects; direct parent relay also detaches after completion.
492 extensions/codex/src/app-server/request.ts READ — Actual two-attempt scoped request/deadline/abort owner. REJECTED in final lane review: replacing parent-signal forwarding with AbortSignal.any loses the explicit parent detach in finally; permanent composition can propagate late parent abort to leaked or retained consumers. Source final retains the listener and its cleanup boundary. Account-email timeout is already x01; phase diagnostics, remaining budgets, scope invalidation, and isolated-client shutdown settlement remain unchanged.
490 src/config/sessions/session-accessor.sqlite-mutation-worker.runtime.ts READ — x01 canonical sleep retained; remaining attempts aggregate cleanup warnings and return settlement, not retry exceptions.
489 extensions/qa-lab/src/live-transports/matrix/substrate/e2ee-client.ts READ — E2EE polls advance per-room cursors and retain minimum 25 ms sleeps; readiness calls canonical lifecycle timeout owner.
488 extensions/discord/src/voice/realtime-session.runtime.ts READ — READ: connectCandidate's local race/listener/finally can use racePromiseWithAbortSignal; preserve original pre-abort error and closeSpeaker-before-reject ordering. Also closes an existing synchronous-connect abort gap, so needs regression proof if applied.
487 apps/linux/src-tauri/src/desktop_node_process.rs READ — production 1–354. Polling joins owned process-tree/readers with distinct graceful/forced deadlines and bounded output; generic async timeout cannot replace settlement.
486 extensions/whatsapp/src/session.ts READ — Connection event waiter removes its event listener synchronously on open/close/timeout and creates the exact 408-shaped timeout error. Moving all cleanup to a generic Promise.finally would shift listener lifetime; no compelling reduction preserving that boundary.
485 extensions/crabbox/src/crabbox-worker-node-enrollment.ts READ — Remote bootstrap script runs before OpenClaw/SDK is installed; resumable download tracks retained bytes and distinguishes busy from no-progress retries, with joined npm termination.
485 src/agents/subagents/spawn/subagent-spawn-cleanup.ts READ — (subscout) Retain: false outcomes and exceptions retry until settlement or explicit ownership retirement; async continuation predicate and unref delay preserve custody; first-round sleep already canonical.
485 src/infra/package-lifecycle.ts READ — APPLIED — canonical sleep replaces manual admission timer; lock identity, original deadline, capped 100ms delay and settlement retries stay.
484 extensions/qa-lab/src/live-transports/slack/adapter.runtime.ts READ — cancellation-aware polling uses Node sleep and AbortSignal.any already; small wait wrapper intentionally suppresses only owner cancellation.
484 extensions/slack/src/monitor/message-handler.ts READ — bounded retry retains admitted config and can re-enter keyed debounce ownership after a twin releases admission; a generic retry loop alone cannot express this handoff.
484 src/auto-reply/inbound-debounce.ts READ — FULL worker mid_runtime_reads Preserve: reserved FIFO slots, generation cancellation, admission-versus-completion distinction, maximum debounce deadline, and hold-check tokens fence stale asynchronous results.
482 src/agents/tools/common.ts READ — RETAIN scheduleToolProgress is a cancellable callback timer, not an awaited delay.
481 extensions/discord/src/voice/realtime-output.runtime.ts READ — continuous preroll, silence retirement, and playback watchdog run in distinct resource lifecycle phases with resettable deadlines; not duplicate promise timeout wrappers.
481 extensions/matrix/src/matrix/sdk/transport.ts READ — canonical deadline spans guarded redirects and body consumption; authority conversion to AbortError deliberately stops matrix-js-sdk's network retries.
481 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-environment.ts READ — config conflict retry is immediate and refreshes baseHash; readiness polls preserve shared absolute deadlines, revision/epoch checks and final zero-delay sleep.
481 src/state/openclaw-state-db-read-connection.ts READ — Idle retirement retains exact physical identity and failed native cleanup for later retry.
480 extensions/openrouter/video-generation-provider.ts READ — Already uses canonical pollProviderOperation, waitProviderOperationPollInterval and shared deadline/request timeout resolvers.
480 src/agents/code-mode-headless.ts READ — APPLIED Inline the one-caller deadline boundary into its owning scope and use canonical raceWithTimeout; preserve elapsed-deadline-before-abort precedence, exact errors, and independent per-wait timer.
479 apps/macos/Sources/OpenClaw/NativeConversationBridge.swift READ — retain MainActor-owned 10 s ready watchdog and 15 s per-request settlement map, document retirement, callback ordering, and stale-document/timeout result surfaces. Direct sleeps surround real WebKit ownership rather than a duplicate generic race.
479 src/infra/update-repair-agent.runtime.ts READ — One per-turn timer sets the timeout outcome and aborts its controller, which is also the tool budget's cancellation owner. finally cancels the timer and closes admission; process cleanup is separately joined. raceWithTimeout would permit cleanup before completion, while fetch timeout helpers change reason/logging.
479 src/node-host/connection.ts READ — Retry state coalesces changing values and retires stale connection completions.
478 extensions/google/embedding-batch.ts READ — Retain: canonical deadline/interval owners; local loop interprets Google initial operation, wait=false, terminal status, and output-file contracts not matching generic batch state without extra adapters.
478 extensions/matrix/src/matrix/sdk/decrypt-bridge.ts READ — x01 owns drain race; retry map can be revived by key events, exhausted TTL, or quiescence, so replacing it with a straight retry loop loses behavior. Canonical zero-jitter backoff also adds RNG draws.
477 src/auto-reply/reply/block-reply-pipeline.ts READ — FULL 1-477 Canonical-helper timeout caller; preserve. Delivery already delegates to runAbortableTimeout. Its per-send fallback AbortController supplies an active signal only when timeout is disabled; this is not duplicate timer plumbing. Timeout abort stops later blocks to preserve send ordering while retaining possibly delivered/pending custody. Iteration over recorded BlockAttempt arrays performs dedupe/recovery classification, not retries. Keep media/source occurrence boundaries, terminal confirmation, and final-fallback suppression.
476 extensions/qa-lab/src/live-transports/slack/slack-live.scenario-implementations.ts READ — MPIM cleanup retries exactly once after 500 ms while retaining channel ownership; generic retry adds normalization/metadata without a clear simplification.
475 extensions/facetime/src/audio-pump.ts READ — FULL READ (candidate); 500ms child-exit observation could use raceWithTimeout with ref:false (same duration/signals), but does not remove lines. Capture/route readiness and playback timers retain physical audio safety and generation contracts.
474 ui/src/lib/model-catalog-store.ts READ — Deadline includes queueing, startup pauses, and transport ownership after local timeout.
472 extensions/browser/src/browser/client-fetch.ts READ — APPLIED: dispatcher abort race, preserving eager real dispatch and exact error mapping; HTTP timeout spans response-body reads and guard release.
472 src/agents/embedded-agent-helpers/bootstrap.ts READ — FULL 1-472 Exclude from timing-owner inventory. No timer, abort listener, retry, or poll owner exists. Three attempt iterations refine marker-length versus content budget; while loops shrink rendered string budgets. Preserve this deterministic UTF-16-safe trimming, policy digest, and personal-instruction handling; generic retry helpers are irrelevant.
471 src/node-host/node-worker-workspace-processes.ts READ — Abort cancels accepted processes while awaiting extinction; racing observation releases custody early.
470 extensions/codex/src/app-server/native-process-authority.ts READ — Actual source-revocation owner, EXCLUDED as a generic promise-wait wrapper. Source abort synchronously closes admission, clears retained background receipts, and terminates concrete owned process closures with all-settled error aggregation. Source authority is retained until all holds and process/background obligations settle; foreground completion alone cannot remove its listener. The inventory request delegates timeout/signal handling to the client. No sound canonical-wait replacement found.
470 src/agents/embedded-agent-runner/run/lane-controller.ts READ — APPLIED Replace manual AbortError construction with canonical createAbortError; preserve raw Error identity, absent-cause semantics, and every lane/authority guard.
470 src/decisions/provider-host.ts READ — Deadline cooperatively aborts provider but awaits physical settlement; circuit state and live consumer/config authority determine final outcome.
469 extensions/qa-lab/src/live-transports/matrix/adapter.runtime.ts READ — observer retry spans a deliberate homeserver interruption generation; general retry would lose generation fencing or add policy.
469 src/process/exec-spawn.ts READ — Scoped cancellation and identity-bound extinction polling already canonical; seemingly dead shell helper is public SDK.
469 ui/src/pages/chat/chat-history-request.ts READ — Shared producer and per-consumer deadlines differ; unbounded attempt loop rechecks live consumers after sleep.
469 ui/src/pages/chat/components/chat-ci-details.ts READ — Visible refresh and server retry availability invoke different actions; head/connection fences retained.
468 extensions/telegram/src/account-throttler.ts READ — Bot-token flood gate owns budget, replaceable suppression, and post-wait authority. grammY legacy-signal bridges are necessary; round-robin chat lanes and priority span flood waits. A blind canonical abort-race replacement can alter pre-abort error precedence.
467 extensions/codex/src/app-server/transport-process-snapshot.ts READ — Actual deadline and startup poll owner. Retain: empty Linux command bytes are retried using setImmediate only while the same PID/start/parent/group identity survives; changing this to sleep or generic retry changes cadence/failure policy. The inspector timeout actively destroys pipes, kills and unreferences the owned helper process, and maps permission/deadline/unavailable errors; Promise.race alone is not this lifecycle.
467 src/infra/push-apns.ts READ — request timeout is HTTP/2 idle timeout; abort/failure synchronously gates late start and selects close versus destroy.
465 extensions/minimax/video-generation-provider.ts READ — Already canonical pollProviderOperation plus provider deadline/timeout resolver; transport and MiniMax status parsing remain plugin-owned.
465 extensions/qa-lab/src/bus-server.ts READ — delayed force-close triggers connection cleanup but still waits for actual server.close callback; raceWithTimeout would return too early.
464 src/gateway/worker-environments/workspace-sync-helpers.ts READ — Renewal already uses canonical sleep; quota polling retains abort-and-join and strict final scan.
462 apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionSidebarBatch.swift READ — Pin moves retry exactly once only for the known unpublished config-hash conflict, recomputing from fresh config; overlapping config.changed reads drain before publishing the local mirror.
462 extensions/synology-chat/src/channel.ts READ — FULL READ (candidate); Already uses canonical waitUntilAbort for blocked and running account lifecycle, with cleanup before stopped status. No private wait duplicate remains.
462 extensions/whatsapp/src/inbound/socket-session.ts READ — Send retries can adopt only a same-identity successor and deliberately preserve the last send error if cancellation interrupts the wait. Canonical computeBackoff/sleep already supply timing; generic retry would add error conversion and disturb socket retirement.
461 extensions/discord/src/internal/gateway.ts READ — RETAINED: original 50-attempt lifecycle/backoff owner remains unchanged. The reverted timer substitution was actually in sibling gateway-identify-limiter.ts (39 lines), not this file; both are absent from committed diff.
461 extensions/workboard/src/sessions-board.ts READ — Only local timer coalesces change announcements; excluded from retry/timeout consolidation as debounce-only after full read.
461 ui/src/pages/chat/components/chat-composer-mention-menu.ts READ — Search debounce; request timeout already belongs to Gateway client.
460 apps/macos/Sources/OpenClaw/CloudWorkerHost.swift READ — retain TERM grace (10 s, 25 ms polls), then KILL and unbounded wait for Foundation Process exit before driver shutdown and host completion. Nonjoining AsyncTimeout or unreaped-child observer changes cleanup ownership.
460 extensions/synology-chat/src/client.ts READ — FULL READ (candidate); Pre-connect-only retryAsync protects non-idempotent POSTs; send slot is a serialized 500ms rate limiter. Absolute request timers preserve indeterminate result/error precedence and stale-cache fencing. Recent merged cleanup already removed one timer wrapper.
460 packages/ai/src/transports/anthropic-transport-stream.ts READ — RETAINED: the native read owner must start cancellation cleanup in its original work scope before completion settles. The shared helper added promise reactions and failed the existing ownership fixture; this consolidation was reverted.
460 src/infra/terminal-file-upload.ts READ — timer schedules earliest cleanup for retained inode identities; retry is lifecycle-owned, not a promise observation wrapper.
458 extensions/acpx/src/process-reaper.ts READ — Already uses node:timers/promises for fixed 750 ms grace; surrounding loop revalidates authority per PID before TERM/KILL. Recent owner change 4d79288.
458 src/infra/update-managed-service-handoff-control.ts READ — Generated helper timers terminate native scopes/owned commands and are retained until process close/activation join. Host waitForHandoffResponse already uses scheduleAbsoluteDeadline; closed-foreground completion intentionally has no competing timeout. Listener settlement and readline parsing are protocol ownership, not removable timeout copies.
458 ui/src/app/exec-approval.ts READ — Individual authoritative approval expiry and replacement fencing.
457 apps/android/app/src/main/java/ai/openclaw/app/PermissionRequester.kt READ — retries select a newly active Activity after host loss under one outer deadline, and request codes/dialog ownership retire on cancellation; already uses StateFlow.first and coroutine timeouts rather than polling.
457 src/plugin-sdk/qa-runtime.ts READ — Canonical Docker polling owner: HTTP clips request/sleep to deadline, compose deliberately allows full command plus sleep.
456 extensions/policy/src/cli.ts READ — Watch is a simple indefinite Node sleep loop with operator-selected cadence; domain report-dedup state is necessary and there is no duplicated scheduler helper.
455 extensions/qa-lab/src/suite.ts READ — heap capture polls file appearance then proves writer settlement through a same-process RPC; fixed sleeps and no-file undefined result are domain behavior.
454 extensions/memory-core/src/memory/manager-search-knn-subprocess.ts READ — Abort retains native-child admission until close and uses a separate kill-exit bound; queue cleanup and caller settlement cannot become a generic detached observation race.
454 extensions/signal/src/client.ts READ — FULL READ (candidate); HTTP has distinct absolute and idle deadline error surfaces; SSE clears only header timeout on success while retaining abort ownership through stream EOF. SDK does not export createAbortError, so its tiny local error constructor cannot simply import that leaf helper.
454 src/system-agent/setup-inference-detect.ts READ — Timeout already canonical and returns accumulated partial discovery.
453 extensions/discord/src/voice-message.ts READ — control-plane negotiation timeout and longer binary-transfer timeout are distinct; message-create retry policy tracks ambiguous commits separately from upload.
452 extensions/discord/src/monitor/gateway-plugin.ts READ — supplemental major caller; metadata deadline already delegated, fallback requires one later metadata refresh, and registration promise prevents double connect.
452 extensions/mattermost/src/mattermost/monitor-websocket.ts READ — authentication, protocol ping/pong and REST-health timers have independent reset/settlement contracts; no simpler canonical owner preserves all scheduling/late-response behavior.
452 src/infra/net/proxy/proxy-validation.ts READ — already uses native abort timeout and dispatcher connect timeout; canary lifecycle has distinct proof semantics.
451 extensions/google-meet/src/transports/google-meet-page-scripts.ts READ — FULL READ (candidate); 100ms UI waits live inside injected browser source strings; Node/SDK helpers are unavailable in that execution context. DOM actions and readiness probes retain exact per-action waits.
451 src/agents/tools/subagents-tool.ts READ — RETAIN Accepted preparation is joined before abort/timeout settlement; simple observation racing abandons custody.
450 apps/shared/OpenClawKit/Sources/OpenClawChatUI/WatchMessageJournal.swift READ — Pending settlement recovery is an explicit durable-claim replay pass, with token/version/expiry fences and first-error reporting; there is no timer or generic request retry to replace.
450 src/agents/embedded-agent-runner/run/model-setup.ts READ — FULL 1-450 Preserve. resolveOwnership makes exactly one immediate reread after NativeSessionOwnershipReadRaceError, under the same caller authority and publication scope; the second race becomes AgentHarnessPreflightError with the original cause. Every other error propagates. Publication subscription closes in finally; after-read session/harness/lifecycle/writer checks remain required. Native-host versus native-auth assertions deliberately differ.
448 extensions/crabbox/src/crabbox-managed-binary.ts READ — Cancellation removes a waiter, but the last waiter must join installation cleanup; canonical abort race would return early and break custody.
448 extensions/imessage/src/monitor/catchup.ts READ — The immediate loop retries compare-and-apply conflicts using the returned authoritative observation. Persisted per-GUID failure counts intentionally defer replay to a later catchup pass and hold the cursor behind the earliest failed row. Generic bounded/delayed retry would change ordering, counts, or durability. No existing SDK helper owns this CAS operation.
447 extensions/diffs/src/store.ts READ — eight-attempt allocation loops mint a different random ID after each collision and coordinate blob registration, filesystem rollback and materialization expiry. A quota failure retries exactly once after awaited cleanup. Generic retry would turn collision results into synthetic failures and still require the same cleanup state; retain allocation at this owner.
446 apps/macos/Sources/OpenClaw/CLIInstallPrompter.swift READ — retain exact 20-attempt 150 ms PID-change polling and kickstart/activation recovery order. Cancellation is swallowed and persisted unfinished-restart state remains until verified health; canonical cancellation-aware loops change behavior.
446 extensions/browser/src/browser/pw-tools-core.interactions.actions.ts READ — Click delay already uses canonical sleep; evaluate timeout is serialized into the browser execution context and cannot import the host helper.
446 extensions/openai/openai-chatgpt-device-code.ts READ — APPLIED: abortable device-poll sleep now canonical while retaining at-least-one-ms scheduling, preabort behavior, mapped cancellation, and 15-minute total deadline.
446 extensions/xai/tts.ts READ — Retain: separate connect deadline and refreshable synthesis-idle watchdog settle socket/ReadableStream ownership at different phases; shared absolute deadline is not equivalent.
444 extensions/irc/src/client.ts READ — FULL READ (candidate); Ready wait already uses withTimeout; persistent abort listener must switch from connect failure to QUIT and remain after readiness. No generic race can replace the listener lifetime directly.
444 src/agents/tool-call-id.ts READ — RETAIN Synchronous collision-resolution loops generate unique IDs; no asynchronous retry, timer, or abort owner to replace.
442 extensions/active-memory/trigger-recall.ts READ — (parent) — Parent confirmed full READ; canonical recall authority and direct abort settlement are owner-sensitive.
441 apps/macos/Sources/OpenClaw/ExecApprovalQueueStore.swift READ — retain deadline-at-scheduling expiry tasks, source publication identity, server-lease fencing, and invalidation-driven list rereads. Relative scheduling would extend expiry when task startup is delayed.
441 extensions/qa-lab/src/live-transports/matrix/scenarios/scenario-runtime-e2ee-shared.ts READ — trust/backup/verification polls differ in first-probe timing and retain observable verification state/error diagnostics; already use Node sleep.
440 apps/shared/OpenClawKit/Sources/OpenClawKit/RealtimeTalkOutput.swift READ — Retained: cancellation propagates to the exact playback child and awaits its result before generation-guarded publication; timeout race would change cleanup joins.
439 extensions/qa-lab/src/mantis/discord-smoke.runtime.ts READ — one native AbortSignal.timeout passed through the SSRF owner; no locally implemented timeout/retry.
439 src/gateway/worker-environments/node-enrollment.ts READ — Polling revalidates provisioning identity around availability reads; native sleep preserves abort surface.
439 src/infra/update-database-backup.ts READ — The controller supplies the retainSnapshotWork stop callback and is already composed with the caller signal. Snapshot generation, owner admission, exact inventory and retained partial files remain producer-owned; no timing clone remains.
438 apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessionHoverCardFacts.swift READ — Subscription recovery has its own non-postponable 5-second deadline, distinct from per-session activity debounce; shared unsubscribe cleanup and lifetime-fenced avatar caching must remain owned here.
438 packages/retry/src/index.ts READ — Extended the existing timeout owner to clean its optional abort listener and timer together; existing delay, jitter, retry-count, and raw error contracts retained.
438 ui/src/pages/chat/components/chat-message-attachment-availability.ts READ — Body timeout and retry state retain playable tickets and replacement authority.
437 extensions/acpx/src/service.ts READ — x01 already consolidated startup probe onto raceWithTimeout; leave current lifecycle revision and process-recovery ownership. Recent owner change 4d79288.
437 extensions/discord/src/monitor/message-media.ts READ — withAbortTimeout owns each download deadline; abort fan-in retains caller cancellation, while attachment/sticker fallback preserves visible unavailable facts.
437 extensions/team-reports/src/summaries.ts READ — exactly two model attempts implement validation repair, with the second request appending the prior output and an explicit repair instruction. Transport completion failures immediately return fallback rather than retry; parse failure updates distinct diagnostics. Canonical exception retry would require extra phase/state plumbing and could obscure the no-transport-retry contract.
436 apps/shared/OpenClawKit/Sources/OpenClawChatUI/VoiceNoteRecorder.swift READ — The 100-ms recording loop combines metering with the 180-second capture cutoff and synchronous attachment handoff; replacing it with an async race would change capture cleanup and cutoff sampling.
436 ui/src/components/browser/browser-panel-stream.ts READ — First-frame timer synchronously retires/reconnects attempts while fallback work may remain pending.
434 extensions/browser/src/browser/cdp-websocket.ts READ — Sleep already canonical; handshake jitter floors a symmetric 0.8–1.2 multiplier after the cap, unlike canonical backoff, and retry scope ends before side-effectful commands.
434 extensions/msteams/src/messenger.ts READ — canonical retryAsync already owns exactly three attempts; custom Retry-After/delay cap and zero-delay sleep behavior are explicit. Cached successful preparation and dispatch evidence prevent repeat uploads and unsafe resend.
434 src/auto-reply/reply/progress-narrator.ts READ — FULL worker mid_runtime_reads Preserve: 30 hidden-draft retries at 1s, 12s narration gate, 30 narrations/turn, two-failure disablement, urgency carryover, preamble freshness, and per-turn abort fence.
432 src/gateway/talk/transcription-relay.ts READ — TTL and five-second provider-final drain retain exact transcript ownership.
431 extensions/qa-lab/src/qa-credentials-admin.runtime.ts READ — one native AbortSignal.timeout plus typed broker error projection; no local timer wrapper.
431 ui/src/pages/plugin/logbook-controller.ts READ — Interval belongs to non-Lit host/client generation; background reads share one coalescing owner.
429 extensions/acpx/src/harness-attempt.ts READ — Retain: timer reports attempt-timeout and aborts controller, but joins runtime/transcript cleanup before returning; observation-only race would change settlement.
426 ui/src/pages/new-session/draft-preference-state.ts READ — Three CAS-conflict attempts recompute expected entries and publication ownership; no transient-error loop.
425 extensions/browser/src/browser/pw-session-state.ts READ — Armed dialog expiry is replaceable page state, and dialog/parent abort ordering intentionally shares controller ownership; no equivalent direct helper removes complexity.
425 src/agents/harness/native-session/binding-leases.ts READ — RETAIN Actual contention and compare-and-apply retry owner: only explicit comparison refusal is retried; uncertain writes retain custody. Acquisition timeout, exact-token renewal, held/settling/unknown phases, and renewal-before-release ordering serve distinct lease invariants. First-round local sleep removal already applies.
425 src/media/input-files.ts READ — APPLIED: canonical PDF task abort observation; cooperative deadline, task-factory registration ordering and toErrorObject mapping remain.
424 extensions/codex/src/app-server/transport-process-containment.ts READ — Actual bounded quiescence/termination poll owner. SOURCE FINAL: the two fixed, referenced 20 ms sleep replacements were not implemented before the lead's cutoff; this is a closed coverage disposition, not an outstanding change request. The 2 s deadline, 16 quiescence passes, every identity revalidation, stopped-root custody, unwind ordering, and final observation remain unchanged.
424 extensions/facetime/src/runtime-call-control.ts READ — FULL READ (candidate); 100ms topology-stability probes and 1000ms hangup retries retain carrier generation/authority. Startup waits for actual closure while keeping suppression active; generic finite retry would change lifetime.
424 extensions/feishu/src/setup-surface.ts READ — 1-424. One fixed 50ms raw promise timer is a sound small sleep-helper candidate; lead explicitly left this separate tiny change out. Registration poll itself is delegated.
424 src/agents/tools/sessions-send-tool.delivery.ts READ — RETAIN Acceptance races actual final response so accepted delivery survives later failure; neither branch is a timeout.
424 src/infra/telemetry.ts READ — native timeout already canonical; persistent success and in-flight state prevent repeat reports after failed local writes.
423 src/daemon/systemd-peer-native.ts READ — sd-bus process/wait drives native protocol under absolute deadline and must settle before bus disposal.
423 ui/src/pages/chat/components/chat-camera-capture.ts READ — Abort closes owned media immediately; late grants release streams under generation checks.
421 src/agents/mcp-http-transport.ts READ — RETAIN Zero-delay callbacks close SDK reconnect timers armed after error callbacks; DELETE already has its timeout signal.
421 src/channels/status-reactions.ts READ — Debounce, two stall indicators and cancellable terminal hold are independent reaction lifecycle operations.
420 apps/macos/Sources/OpenClaw/QuickChatFocusedTextCapture.swift READ — retain custom race: detached walk and its completion observer start before caller cancellation is installed, so an already-settled snapshot wins that admission window. AsyncTimeout installs cancellation before racer admission and can reverse that outcome. Preserve 3 s walk/1 s AX-message/4 s outer bounds.
420 extensions/qa-lab/src/suite-runtime-agent-process.ts READ — history polling honors typed per-error Retry-After and terminal causes; transcript polling retains last errors; memory poll fixed sleeps differ from generic poller.
419 src/node-host/node-worker-workspace-quiescence.ts READ — Canonical timeout/abort helpers bound observation while retained leases finish cleanup.
418 apps/linux/src-tauri/src/cli.rs READ — production 1–305. Chrome setup polls child exit and output cap, then kills/reaps before exposing JSON; no equivalent generic owner.
418 src/gateway/auth-rate-limit.ts READ — Per-key penalties extend shared deadlines across concurrent failures and survive history reset.
417 extensions/signal/src/send.ts READ — FULL READ (candidate); One quote-metadata rejection fallback retries with different payload exactly once; partial group success must not replay. This is shipped provider capability negotiation, not generic timed retry.
416 extensions/line/src/webhook-spool.ts READ — x01 already canonicalized active-delivery timeout. Preserve asymmetric bounded active delivery versus unbounded deferred claim drain and commit ownership.
416 src/agents/subagents/registry/subagent-registry-queued-registration.ts READ — (subscout) Retain: retries definite refusals associated with pending claims; committed/uncertain writes enter recovery. Inner claim-drain loops are not separately counted.
416 src/process/spawn-broker/resource-host.ts READ — Ordered delivery/close requests and retained native claims; no timer/retry duplicate.
415 apps/ios/Sources/Model/WatchReplyCoordinator.swift READ — Retry budget belongs to persisted command owner, only pre-dispatch failures retry; history polling and receipt retries carry distinct durable authority.
415 extensions/clickclack/src/outbound.ts READ — FULL READ (candidate); Attachment recovery intentionally reads after one failed idempotent write, then retries exactly once and rethrows the original error. Authority checks outside recovery catches and partial-delivery receipt ownership make generic retryAsync unsuitable.
414 extensions/browser/src/browser/chrome-mcp-routing.ts READ — Queue timeout/abort is intentionally ignored after native work starts; ordinary race helpers would reject active work and release its operation lease early.
414 src/gateway/desktop/rfb-preauth.ts READ — Handshake waits synchronously remove listeners/wakes; shared timeout aborts negotiations with established errors.
413 extensions/memory-core/src/memory/file-watcher.ts READ — Retry sequence follows observation retirement and only actual file changes reset it; close errors permanently block restart. Remaining watch timer is lifecycle-owned debounce.
413 packages/ai/src/transports/openai-responses-replay-internal.ts READ — retry loops own changing semantic attempts, tier ceilings, stream acceptance, and original error surfaces.
412 src/agents/code-mode-node.ts READ — RETAIN Worker deadline starts at input consumption and clears at host boundaries; acquisition cancellation retains late pool cleanup.
412 src/gateway/worker-environments/worker-turn-admission.ts READ — APPLIED canonical abort race; placement and workspace reconciliation barriers retained.
412 ui/src/lib/device-pair-setup.ts READ — Expiry retires bearer presentation before pairing reconciliation; countdown is presentation.
411 apps/macos/Sources/OpenClaw/RemotePortTunnel.swift READ — Listener polling distinguishes child exit, final stderr drain, and six-second timeout; caller joins termination and ledger cleanup.
409 apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatModelSignIn.swift READ — Wizard long polling advances gateway-executed steps and stops for local input, cancellation, or lost physical connection; no client retry delay or timeout wrapper exists.
409 extensions/codex/src/app-server/inference-dispatch.ts READ — Actual model-revocation bridge and canonical HTTP/WebSocket preparation owner. Retain: model abort cancels the captured native turn except for native Images, whose parent remains usable; release detaches exactly that model listener before releasing both leases. Request/context/execution signals already compose through AbortSignal.any. The retryable HTTP body is delegated to inference-upload.ts; this file does not implement a second retry policy.
409 src/tui/tui-questions.ts READ — Countdown/expiry preserves resolution and recovery locks.
409 src/worker/embedded-agent.runtime.ts READ — Abort invokes actual agent cancellation; cleanup/transcript settlement precede terminal ACK.
408 src/acp/translator.session-lifecycle.ts READ — FULL worker mid_runtime_reads Preserve: bounded pagination, exact-ID/key ledger replay, transcript fallback, resume existence check, cancellation before deletion, and session-creation rate accounting are separate contracts.
408 src/agents/subagents/registry/subagent-controller-read.ts READ — (subscout) Demand-driven ControllerReadRequired preparation worklist, not retrying a failed operation.
408 src/auto-reply/reply/queue/enqueue.ts READ — FULL worker mid_runtime_reads Preserve: dedupe before registry creation, admission before publication, cancelled steer predecessor FIFO, deferred overflow settlement, and post-await owner checks.
407 extensions/twitch/src/twitch-client.ts READ — FULL READ (candidate); Handshake timer shares finish with authentication/disconnect listeners; auth-retry disconnects intentionally remain pending. Synchronous unbinding before quit prevents reentrant terminal events; canonical race alone cannot remove this owner.
406 extensions/agentsapi/agentsapi-harness.ts READ — Isolated-run controllers are service-owned cancellation roots and dispose joins every admitted run; deadlines use native AbortSignal.timeout, no copied timer helper.
405 extensions/feishu/src/comment-shared.ts READ — 1-405. requestFeishuApi already owns three-attempt 500/1000ms canonical retryAsync and rechecks captured send authority before every request. Preserve fulfilled rate-limit conversion and final error wrapping.
405 src/agents/tools/secrets-tool.ts READ — RETAIN Prompt delivery races a real answer; terminal-answer recovery and prompt lifetime stay owner-specific.
405 ui/src/lib/board/widget-sandbox-host.ts READ — Delegates lifecycle to WidgetSandboxHost; signal spans fetch/body reading.
404 extensions/telegram/src/bot/delivery.resolve-media.ts READ — Three getFile attempts use 1/2 s fallback waits or uncapped server Retry-After; the 20 min signal deadline spans all attempts. Cancellation preserves the triggering Telegram/network error for durable replay classification. Generic retryAsync applies different rounding/caps/error conversion and is not a direct substitute.
404 src/infra/oauth-loopback-callback.ts READ — Retained synchronous abort rejection precedence and callback socket ownership beyond callback receipt.
403 src/gateway/talk/voice-selection.ts READ — Timeout synchronously removes replacement claim, rejects completion and sends cancellation.
402 src/agents/harness/native-hook-relay-bridge.ts READ — (carried parent) Retain: retirement grace and process-owned listener closure.

steipete added a commit that referenced this pull request Oct 5, 2026
…5536)

The catch refactor in 2faa6a0 (#165340) added an unlisted
preserve-caught-error suppression, failing the suppression inventory in
hourly job 111705914349. Both errors were already preserved: the command
failure was primary and the reporting failure was an aggregate member.

Capture the reporting failure before composing the final error so the
command stays the primary cause and both original errors remain available.
Keep the existing suppression inventory and every assertion unchanged.

Validation: suppression inventory before/after, 76 passing focused cases,
core types and all 27 test type graphs, lint and remaining static guards,
and P2 review. Unrelated Knip failures reproduced identically without the
patch. Testbox timed out after 15 minutes queued; use the authorized ready
PR fallback for remaining Linux proof.
steipete added a commit that referenced this pull request Oct 5, 2026
The shared abort helper introduced in #165340 adds cleanup promise turns.
The observer still cancels and publishes correctly, but the fixture checked
terminal health after a fixed twelve-microtask drain.

Await the actual broadcast, retain the terminal health and model call-count
assertions, and explicitly verify cancellation of the in-flight request.

Proof: original fixture failed 3/3 on main; the immediate parent of
2faa6a0 passed and that commit failed. The final 15-test file passed 3/3
on Linux Testbox (26s, 8s, 9s wall with --maxWorkers=1). Related plugin,
updater, and observer tests passed. Touched lint, formatting, all production
typechecks, Gateway test types, and the runtime cycle check passed against
2d3a5c7 plus this patch.

The broader checks still report unrelated pre-existing failures: Knip's
X_STREAM_HEADROOM_MICRO_USD export and the startup-migration Madge cycle.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 6, 2026
…65340)

* refactor(async): deslop bounded waits and retry ownership

Consolidate matching retry, timeout, sleep, and abort plumbing onto existing owners without changing retry counts, delay schedules, cancellation errors, or native cleanup barriers.

Fix an unobserved WhatsApp QR deadline rejection during socket startup and clear reconnect timers when runtime refresh preparation fails. Keep the shared timeout observer safe when an already-aborted signal meets a synchronously throwing operation.

* fix(async): preserve cancellation and fixture contracts

* fix(matrix): remove redundant deferred type argument
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 6, 2026
…openclaw#165479)

openclaw#165340 introduced Promise.withResolvers in the gateway-client package. The
package declaration build compiles against the repository's ES2023 lib, so
tsdown-packages fails with TS2550 and pnpm build (the Team deployer) aborts
before cutover. Create the pending-stop promise explicitly again.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 6, 2026
…nclaw#165536)

The catch refactor in e048d84 (openclaw#165340) added an unlisted
preserve-caught-error suppression, failing the suppression inventory in
hourly job 111705914349. Both errors were already preserved: the command
failure was primary and the reporting failure was an aggregate member.

Capture the reporting failure before composing the final error so the
command stays the primary cause and both original errors remain available.
Keep the existing suppression inventory and every assertion unchanged.

Validation: suppression inventory before/after, 76 passing focused cases,
core types and all 27 test type graphs, lint and remaining static guards,
and P2 review. Unrelated Knip failures reproduced identically without the
patch. Testbox timed out after 15 minutes queued; use the authorized ready
PR fallback for remaining Linux proof.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 6, 2026
The shared abort helper introduced in openclaw#165340 adds cleanup promise turns.
The observer still cancels and publishes correctly, but the fixture checked
terminal health after a fixed twelve-microtask drain.

Await the actual broadcast, retain the terminal health and model call-count
assertions, and explicitly verify cancellation of the in-flight request.

Proof: original fixture failed 3/3 on main; the immediate parent of
e048d84 passed and that commit failed. The final 15-test file passed 3/3
on Linux Testbox (26s, 8s, 9s wall with --maxWorkers=1). Related plugin,
updater, and observer tests passed. Touched lint, formatting, all production
typechecks, Gateway test types, and the runtime cycle check passed against
5ecafc8 plus this patch.

The broader checks still report unrelated pre-existing failures: Knip's
X_STREAM_HEADROOM_MICRO_USD export and the startup-migration Madge cycle.
RomneyDa pushed a commit that referenced this pull request Oct 7, 2026
Share a monotonic 20-second catalog deadline and stop waiting when the
request, connection, or captured operator authority is cancelled. Return
retryable UNAVAILABLE before committing a session and skip unused thinking
catalog hydration during creation.

Bounded-wait approach informed by #161422 by @DonnieFi.

Co-authored-by: Donnie Fiander <[email protected]>
(cherry picked from commit 4b485e5)

Backport note: also carries the raceWithTimeout signal/onAbort support from
2faa6a0 (#165340), which this fix relies on to stop catalog waits on
disconnect and authority revocation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: imessage Channel integration: imessage channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: voice-call Channel integration: voice-call channel: whatsapp-web Channel integration: whatsapp-web cli CLI command changes commands Command implementations docs Improvements or additions to documentation extensions: active-memory extensions: browser extensions: codex extensions: comfy extensions: copilot extensions: fal extensions: openai extensions: qa-lab gateway Gateway runtime P2 Normal backlog priority with limited blast radius. plugin: file-transfer rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts security-sensitive-changed 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.

1 participant