Skip to content

fix(server): bound device hub proxy HTTP with 30s time-to-first-response timeout - #14146

Closed
kvnloo wants to merge 1 commit into
pingdotgg:mainfrom
kvnloo:muse/device-hub-proxy-http-timeout
Closed

kvnloo wants to merge 1 commit into
pingdotgg:mainfrom
kvnloo:muse/device-hub-proxy-http-timeout

Conversation

@kvnloo

@kvnloo kvnloo commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

A hub that accepts the TCP connection but never sends response headers parks the proxy request forever: httpClient.execute waits indefinitely for headers, hanging the client fiber with no error.

Wraps execute in Effect.timeoutOption(30s). On expiry the proxy returns 504 'Device hub did not respond' instead of hanging. execute resolves once headers arrive and the body streams afterward, so this bounds time-to-first-response without truncating long-lived MJPEG/AVCC bodies.

Tests: existing DeviceHubProxy suite 14/14 green (no regression). A dedicated 504 integration test is blocked: Effect v4's HttpClient.withScope never invokes a hanging stub executor, and the repo AGENTS.md forbids timeout-dependent tests.


authored with AI assistance (Muse, Meta's Muse Spark) under the contributor's direction

…t-response timeout

A hub that accepts the TCP connection but never sends response headers
parks the proxy request forever: `httpClient.execute` waits indefinitely
for headers, hanging the client fiber with no error.

Wrap `execute` in `Effect.timeoutOption(30s)`. On expiry the proxy
returns 504 'Device hub did not respond' instead of hanging. `execute`
resolves once headers arrive and the body streams afterward, so this
bounds time-to-first-response without truncating long-lived MJPEG/AVCC
bodies.

Tests: existing DeviceHubProxy suite 14/14 green (no regression). A
dedicated 504 integration test is blocked: Effect v4's
`HttpClient.withScope` never invokes a hanging stub executor, and the
repo's AGENTS.md forbids timeout-dependent tests.

authored with AI assistance (Muse, Meta's Muse Spark) under the contributor's direction
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 69c14b76-50cf-445f-97ea-f1f52c4d0155

📥 Commits

Reviewing files that changed from the base of the PR and between ed57bed and 61e3590.

📒 Files selected for processing (1)
  • apps/server/src/device/DeviceHubProxy.ts

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Sep 28, 2026

Copy link
Copy Markdown
Member

Note

This comment is posted by Julius' dot

The 14 existing tests don't exercise the new 30-second deadline or 504 response, and the PR explicitly says that check is blocked. Closing under the verification rule. Add a focused regression that shows a stalled hub returns 504 while a successful long-lived response keeps streaming, report the result, and request reconsideration.

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

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants