Repository navigation
Conversation
…tion The ACP patched protocol's sendRequest awaited its response Deferred with no deadline. A wedged ACP agent that stays alive but never answers an extension request (e.g. cursor/list_available_models during Cursor model discovery) hung the caller forever; termination only rescued the dead-process case. Mirrors the codex app-server transport fix: request() now accepts an optional timeout (default unbounded, existing behavior). On expiry the pending entry is dropped (late responses are ignored by resolveExtPending) and the request fails with AcpRequestTimeoutError. The runtime's request() passes the option through, and Cursor model discovery is now bounded at 30s. Tests: protocol.test.ts gains a TestClock test (timeout fires, late response ignored, next request routes by id) plus a default-unbounded control. Red-on-base verified (hangs, 15s vitest timeout); 29/29 green with the fix. Authored with AI assistance (Muse, Meta's Muse Spark) under the contributor's direction.
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Repository: pingdotgg/t3code/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Comment |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — The PR adds tested, backward-compatible timeout plumbing, but changes Cursor model discovery from unbounded waiting to a 30-second failure deadline. That is a product-level default behavior change affecting an existing path and warrants deliberate review. Notes:
You can add or adjust custom eligibility rules. Learn more. |
Dismissing prior approval to re-evaluate 5cfffb8
Problem
The ACP patched protocol's
sendRequestawaited its responseDeferredwith no deadline. A wedged ACP agent that stays alive but never answers an extension request (e.g.cursor/list_available_modelsduring Cursor model discovery) hung the caller forever — termination only rescued the dead-process case. This is the ACP twin of the unbounded codex app-server transport request fixed in #4.Fix
Mirrors the #4 shape:
request()accepts an optionaltimeout(AcpPatchedRequestOptions), default unbounded (existing behavior).resolveExtPending) and the request fails with the newAcpRequestTimeoutError(added to theAcpErrorunion).AcpSessionRuntime.request()passes the option through; Cursor model discovery is now bounded at 30s.session/promptand the typed agent RPC path are untouched — turn-length prompts stay unbounded by design.Validation
protocol.test.tstests (TestClock, deterministic): timeout fires withAcpRequestTimeoutError(method, requestId, message), late response ignored, next request routes by id; plus a default-unbounded control.protocol.test.ts+errors.test.ts).tsc --noEmitclean onpackages/effect-acp; touched server files verified against the new types (isolated check).vp fmtclean.Files
packages/effect-acp/src/protocol.ts—AcpPatchedRequestOptions,sendRequesttimeoutpackages/effect-acp/src/errors.ts—AcpRequestTimeoutError+ unionpackages/effect-acp/src/protocol.test.ts— 2 testsapps/server/src/provider/acp/AcpSessionRuntime.ts— option pass-throughapps/server/src/provider/Layers/CursorProvider.ts— 30s bound on model discoveryAuthored with AI assistance (Muse, Meta's Muse Spark) under the contributor's direction.