Skip to content

fix(cloud-agent-next): retry compute status connection resets - #5824

Merged
pandemicsyn merged 1 commit into
mainfrom
investigate/sentry-27ta
Sep 2, 2026
Merged

fix(cloud-agent-next): retry compute status connection resets#5824
pandemicsyn merged 1 commit into
mainfrom
investigate/sentry-27ta

Conversation

@pandemicsyn

@pandemicsyn pandemicsyn commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Retry each read-only compute-billing status query once on the server after a 100–200 ms jittered delay when its error cause chain contains ECONNRESET.
  • Leave mutations and unrelated errors unchanged, preserve the final failure, and terminate cause inspection safely for cyclic errors.
  • Addresses KILOCODE-WEB-27TA, where a reset on the web-to-Worker request made compute status temporarily unavailable.

Verification

No manual runtime tests were performed: this is server-side transport recovery, verified with mocked network failures rather than production fault injection.

Visual Changes

N/A

Reviewer Notes

  • Automated checks passed: all 35 client unit tests, pnpm --filter web run lint, pnpm --filter web run typecheck, changed-file formatting, and git diff --check.
  • Unit tests used the checked-in Jest transforms and mappings with database setup hooks disabled for this isolated mocked client suite.
  • Regression cases cover retry success, delay bounds, retry exhaustion, error identity, unrelated errors, and cyclic causes.
  • Typecheck completed with Rollup external-dependency warnings.
  • Independent static review completed with no actionable defects. It checked real tRPC error wrapping, authorization on both personal and organization routes, read-only Worker behavior, and test coverage.
  • The retry limit is per server invocation. The existing browser React Query retry remains unchanged; persistent failure can therefore produce up to four Worker requests across two web requests. Preserving browser retry retains recovery for browser-to-web failures outside this server-side fix.

@kilo-code-bot

kilo-code-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • apps/web/src/lib/cloud-agent-next/cloud-agent-client.ts
  • apps/web/src/lib/cloud-agent-next/cloud-agent-client.test.ts

Reviewed by grok-4.6 · Input: 196K · Output: 14.8K · Cached: 407.9K

Review guidance: REVIEW.md from base branch main

@pandemicsyn
pandemicsyn merged commit 5d172ec into main Sep 2, 2026
17 checks passed
@pandemicsyn
pandemicsyn deleted the investigate/sentry-27ta branch September 2, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants