fix(server): isolate V2 Cursor metadata and own request cleanup - #9940
fix(server): isolate V2 Cursor metadata and own request cleanup#9940saphid wants to merge 392 commits into
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes the default execution model for every Cursor metadata-generation request and adds substantial asynchronous request, cancellation, sandbox, and temporary-workspace lifecycle behavior. It also introduces a static-analysis diagnostic suppression in tests, so the combined scope and policy impact warrant human review. You can add or adjust custom eligibility rules. Learn more. |
9242b91 to
3d81172
Compare
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
|
Independent automated first-pass review (Amp/Astra): 1 finding. Addressed in f8a04ca: provider-scope close while a metadata request was in flight permanently leaked the temporary workspace (the interrupt exit branch only requested cancellation, and the scope-close test asserted the leak). The completion fiber now starts immediately so its exit finalizers always run, and workspace removal is scheduled once the SDK request settles. Verified with the 8 focused Cursor text-generation tests, server typecheck, and targeted lint. |
|
Macroscope has since reviewed this pull request. An earlier review was skipped by a cost limit; a review has now completed, so that notice no longer applies. |
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Restore the failed-before-start timer guard, align two server fixtures with the reconciled behavior, and remove dead files, exports, and dependencies surfaced by Knip. Drop the temporary branch push trigger now that the PR is mergeable, so each update runs the pull-request workflow once.
Keep main's batch machine-update banner and update action while preserving the v2 runtime-based environment lock used by draft load balancing.
Adopt TypeScript 7 and Effect rc.112 across orchestration v2, including the TaggedError API migration and updated Effect-aware tests. Restore main's composer-aware scroll-to-end clearance while retaining selected-model settings sync, preview recording transfer, image galleries, desktop context menus, and layout hit targets. Regenerate the lockfile on the upgraded dependency baseline.
efd9994 to
6102d00
Compare
Advertise bounded socket snapshots and authoritative dispatch validation, omit raw command output and inline file bodies at the wire boundary, and preserve compact status metadata across web and mobile. Add transport-budget coverage for snapshots, resume, commands, legacy import, and projection maintenance.
…ettlement Closing the provider instance scope while a metadata request was in flight only requested SDK cancellation and permanently leaked the temporary workspace; the scope-close test asserted the leak. Start the completion fiber immediately so its exit finalizers always run, and schedule workspace removal once the SDK request settles (after cancellation and disposal), preserving the workspace while the SDK may still use it.
eee0dfc to
d4da069
Compare
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Effect Service Conventions found three blocking convention violations. See the inline review comments for the expected fixes. Posted via Macroscope — Effect Service Conventions |
8187b17 to
ada72ce
Compare
Cursor metadata generation used write-capable agent mode in the project directory. Use an isolated temporary workspace, plan mode, sandboxing, and no ambient settings for title, branch, commit and PR text generation.
Keep the 180-second caller deadline through stalled workspace or SDK acquisition. Application-provided CursorRequestLifetime owns SDK completion and cleanup; provider-instance closure requests cancellation without destroying the workspace before SDK settlement. Application shutdown cancels remaining fibers and retains unsettled workspaces. No imperative Effect runtime bridge remains.
Current head
2b68f136dis based on V27dd9873edwith test-only prerequisite #10865 (merge first). Validation: 15 text-generation/driver/registry tests and server typecheck, targeted lint and formatting pass. New CI pending. No authenticated Cursor call was made. Direct Claude Opus 5 high review was retried for this change and exited 1 due to expired OAuth before inference; no independent review occurred.Targets V2 #2829; #9914 is the separate ACP implementation for main. Updated with GPT-6 in Codex/T3.