Conversation
|
Note: GPT-6 on behalf of shivam (@shivamhwp). The first CI run found failures in unchanged V2-base files: Check reports formatting in seven files, Test Server 1 expects 58 migrations but the base registers 59, and Release Smoke fails on an unused expo-notifications@57.0.15 patch. None of those files are changed by this PR. Keeping those fixes separate from session cleanup. The review fixes are in d68d735a. All 34 focused session-manager and turn-start tests pass locally, along with targeted lint and server typecheck. Waiting for the new CI and review results. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR is a broad product and platform change rather than a contained session-cleanup fix: it adds Forgejo/GitHub routing, reusable authentication, mobile widgets and paste workflows, notifications, and substantial orchestration changes. It also changes product defaults and authentication behavior, so the scope and sensitivity warrant human review. Not approved because:
Review your spending limits in Billing settings, or comment |
|
Note: GPT-6 on behalf of shivam (@shivamhwp). Latest head bf93d875 passes Bugbot and Macroscope correctness. All reported review threads are resolved. Locally, 58 focused tests across six session-manager consumer test files pass, as do targeted lint and server typecheck. CI remains blocked outside this change: seven unchanged files fail formatting, the migration test expects 58 entries instead of the registered 59, and Release Smoke rejects the unused Expo notifications patch. Earlier Test Server 3 logs also show stale replay expectations for the runtime-info prompt suffix. I reproduced the migration failure, the seven formatting failures, and the tool_call_read_only/cursor replay mismatch locally. The relevant adapter, migration, fixture, and release files match the V2 base. Leaving these base fixes out of the cleanup PR pending maintainer direction. Nothing has been merged. |
c61d233 to
c86ae9d
Compare
f2e4a0d to
3ed8c4d
Compare
8098b97 to
bc10499
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bc10499e4e572b4e7f364ee5d8077acdb6f6ad92. Configure here.
b82facd to
2ac9bfe
Compare
b0ccd56 to
38e1a9a
Compare
8187b17 to
ada72ce
Compare
38e1a9a to
e352dd3
Compare
ed5dc41 to
2b1139a
Compare
1cb4a21 to
a2de137
Compare
e03e376 to
e39429e
Compare
…finishes A V2 provider session released its session-map entry before its scope cleanup finished, so a replacement open could start a new process while the old one still owned credentials and resources, and a hung cleanup silently unblocked reuse. Releasing sessions now keep a pending-release record until cleanup actually completes. Replacement opens and runtime thread attachments for its recorded threads are blocked; repeated close/detach calls join the same cleanup Deferred instead of racing it; shared MCP credentials are revoked only when no live session, reservation, or pending release still holds them; a detach that loses its session to a concurrent close joins the pending cleanup; and the 30s wait reports an honest error state without claiming the process stopped. Ports pingdotgg#9806 onto t3code/codex-turn-mapping, plus post-review hardening for detach-vs-close and runtime attachment races. Generated with Devin (swe-2-high, T3 Code via Cursor harness)
…ingdotgg#11518) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…finishes A V2 provider session released its session-map entry before its scope cleanup finished, so a replacement open could start a new process while the old one still owned credentials and resources, and a hung cleanup silently unblocked reuse. Releasing sessions now keep a pending-release record until cleanup actually completes. Replacement opens and runtime thread attachments for its recorded threads are blocked; repeated close/detach calls join the same cleanup Deferred instead of racing it; shared MCP credentials are revoked only when no live session, reservation, or pending release still holds them; a detach that loses its session to a concurrent close joins the pending cleanup; and the 30s wait reports an honest error state without claiming the process stopped. Ports pingdotgg#9806 onto t3code/codex-turn-mapping, plus post-review hardening for detach-vs-close and runtime attachment races. Generated with Devin (swe-2-high, T3 Code via Cursor harness)
20f1f27 to
6bb0952
Compare
6bb0952 to
8023b0a
Compare
463d0c6 to
e10a1e2
Compare
…finishes A V2 provider session released its session-map entry before its scope cleanup finished, so a replacement open could start a new process while the old one still owned credentials and resources, and a hung cleanup silently unblocked reuse. Releasing sessions now keep a pending-release record until cleanup actually completes. Replacement opens and runtime thread attachments for its recorded threads are blocked; repeated close/detach calls join the same cleanup Deferred instead of racing it; shared MCP credentials are revoked only when no live session, reservation, or pending release still holds them; a detach that loses its session to a concurrent close joins the pending cleanup; and the 30s wait reports an honest error state without claiming the process stopped. Ports pingdotgg#9806 onto t3code/codex-turn-mapping, plus post-review hardening for detach-vs-close and runtime attachment races. Generated with Devin (swe-2-high, T3 Code via Cursor harness)
|
Stale duplicate of #11492 — the same session-cleanup ownership fix exists on the newer branch. Thanks! |
…finishes A V2 provider session released its session-map entry before its scope cleanup finished, so a replacement open could start a new process while the old one still owned credentials and resources, and a hung cleanup silently unblocked reuse. Releasing sessions now keep a pending-release record until cleanup actually completes. Replacement opens and runtime thread attachments for its recorded threads are blocked; repeated close/detach calls join the same cleanup Deferred instead of racing it; shared MCP credentials are revoked only when no live session, reservation, or pending release still holds them; a detach that loses its session to a concurrent close joins the pending cleanup; and the 30s wait reports an honest error state without claiming the process stopped. Ports pingdotgg#9806 onto t3code/codex-turn-mapping, plus post-review hardening for detach-vs-close and runtime attachment races. Generated with Devin (swe-2-high, T3 Code via Cursor harness)
…finishes A V2 provider session released its session-map entry before its scope cleanup finished, so a replacement open could start a new process while the old one still owned credentials and resources, and a hung cleanup silently unblocked reuse. Releasing sessions now keep a pending-release record until cleanup actually completes. Replacement opens and runtime thread attachments for its recorded threads are blocked; repeated close/detach calls join the same cleanup Deferred instead of racing it; shared MCP credentials are revoked only when no live session, reservation, or pending release still holds them; a detach that loses its session to a concurrent close joins the pending cleanup; and the 30s wait reports an honest error state without claiming the process stopped. Ports pingdotgg#9806 onto t3code/codex-turn-mapping, plus post-review hardening for detach-vs-close and runtime attachment races. Generated with Devin (swe-2-high, T3 Code via Cursor harness)
…finishes A V2 provider session released its session-map entry before its scope cleanup finished, so a replacement open could start a new process while the old one still owned credentials and resources, and a hung cleanup silently unblocked reuse. Releasing sessions now keep a pending-release record until cleanup actually completes. Replacement opens and runtime thread attachments for its recorded threads are blocked; repeated close/detach calls join the same cleanup Deferred instead of racing it; shared MCP credentials are revoked only when no live session, reservation, or pending release still holds them; a detach that loses its session to a concurrent close joins the pending cleanup; and the 30s wait reports an honest error state without claiming the process stopped. Ports pingdotgg#9806 onto t3code/codex-turn-mapping, plus post-review hardening for detach-vs-close and runtime attachment races. Generated with Devin (swe-2-high, T3 Code via Cursor harness)
…finishes A V2 provider session released its session-map entry before its scope cleanup finished, so a replacement open could start a new process while the old one still owned credentials and resources, and a hung cleanup silently unblocked reuse. Releasing sessions now keep a pending-release record until cleanup actually completes. Replacement opens and runtime thread attachments for its recorded threads are blocked; repeated close/detach calls join the same cleanup Deferred instead of racing it; shared MCP credentials are revoked only when no live session, reservation, or pending release still holds them; a detach that loses its session to a concurrent close joins the pending cleanup; and the 30s wait reports an honest error state without claiming the process stopped. Ports pingdotgg#9806 onto t3code/codex-turn-mapping, plus post-review hardening for detach-vs-close and runtime attachment races. Generated with Devin (swe-2-high, T3 Code via Cursor harness)
…finishes A V2 provider session released its session-map entry before its scope cleanup finished, so a replacement open could start a new process while the old one still owned credentials and resources, and a hung cleanup silently unblocked reuse. Releasing sessions now keep a pending-release record until cleanup actually completes. Replacement opens and runtime thread attachments for its recorded threads are blocked; repeated close/detach calls join the same cleanup Deferred instead of racing it; shared MCP credentials are revoked only when no live session, reservation, or pending release still holds them; a detach that loses its session to a concurrent close joins the pending cleanup; and the 30s wait reports an honest error state without claiming the process stopped. Ports pingdotgg#9806 onto t3code/codex-turn-mapping, plus post-review hardening for detach-vs-close and runtime attachment races. Generated with Devin (swe-2-high, T3 Code via Cursor harness)
…finishes A V2 provider session released its session-map entry before its scope cleanup finished, so a replacement open could start a new process while the old one still owned credentials and resources, and a hung cleanup silently unblocked reuse. Releasing sessions now keep a pending-release record until cleanup actually completes. Replacement opens and runtime thread attachments for its recorded threads are blocked; repeated close/detach calls join the same cleanup Deferred instead of racing it; shared MCP credentials are revoked only when no live session, reservation, or pending release still holds them; a detach that loses its session to a concurrent close joins the pending cleanup; and the 30s wait reports an honest error state without claiming the process stopped. Ports pingdotgg#9806 onto t3code/codex-turn-mapping, plus post-review hardening for detach-vs-close and runtime attachment races. Generated with Devin (swe-2-high, T3 Code via Cursor harness)
…finishes A V2 provider session released its session-map entry before its scope cleanup finished, so a replacement open could start a new process while the old one still owned credentials and resources, and a hung cleanup silently unblocked reuse. Releasing sessions now keep a pending-release record until cleanup actually completes. Replacement opens and runtime thread attachments for its recorded threads are blocked; repeated close/detach calls join the same cleanup Deferred instead of racing it; shared MCP credentials are revoked only when no live session, reservation, or pending release still holds them; a detach that loses its session to a concurrent close joins the pending cleanup; and the 30s wait reports an honest error state without claiming the process stopped. Ports pingdotgg#9806 onto t3code/codex-turn-mapping, plus post-review hardening for detach-vs-close and runtime attachment races. Generated with Devin (swe-2-high, T3 Code via Cursor harness)
…finishes A V2 provider session released its session-map entry before its scope cleanup finished, so a replacement open could start a new process while the old one still owned credentials and resources, and a hung cleanup silently unblocked reuse. Releasing sessions now keep a pending-release record until cleanup actually completes. Replacement opens and runtime thread attachments for its recorded threads are blocked; repeated close/detach calls join the same cleanup Deferred instead of racing it; shared MCP credentials are revoked only when no live session, reservation, or pending release still holds them; a detach that loses its session to a concurrent close joins the pending cleanup; and the 30s wait reports an honest error state without claiming the process stopped. Ports pingdotgg#9806 onto t3code/codex-turn-mapping, plus post-review hardening for detach-vs-close and runtime attachment races. Generated with Devin (swe-2-high, T3 Code via Cursor harness)

V2 marks a provider session stopped after a 30-second cleanup timeout even when the provider is still shutting down. That allows a replacement to start too early and can revoke credentials still held by the old process.
Keep ownership of the pending cleanup until it finishes. A timeout records an error and blocks replacements and new attachments. Close, detach, and provider-wide close retries wait on that same cleanup. Shared credentials survive until the last holder finishes, and an attachment racing with close fails without revoking a peer's credential. Successful cleanup clears the error and block; failed cleanup keeps replacements blocked until the environment restarts.
Targets the Orchestration V2 branch in #2829. Includes main through
b70015b6dband the V2 target througha8cc38b95b. The main integrations are separate merge commits; the original cleanup commits remain isolated in the history. The aggregate PR diff now includes main's web, mobile, server, and shared-package updates.The merge keeps V2's run and projected-item model while carrying forward main's pasted-text attachments, connection controls, notifications, and response streaming settings. Paragraph streaming and missing-worktree fallback are adapted to the V2 execution and launch paths; retired V1 runtime files stay removed. Main advanced to
73b206f4bfduring validation; that later worktree-setup feature is not included. The latest integration also includes main's CLI release archives and update/uninstall commands, and its compact-sidebar revert.Validation on
8023b0a1d8: focused server, web, mobile, and client-runtime tests pass, including session cleanup, V2 replay, paragraph boundaries and completion, and worktree fallback. Typechecks pass for server, web, desktop, mobile, contracts, client-runtime, and shared. Targeted lint, formatting, and the exact unused-code check pass. Follow-updfdde1f624passed all GitHub CI jobs after fixing Hermes array compatibility and migrating notification test fixtures to V2. Latest head96704fdb6badditionally passes 207 focused tests, server/web/desktop typechecks, CLI bundle and help smoke checks, marketing build, targeted lint, formatting, and unused-code checks. All GitHub CI jobs pass on this latest head. Vercel still reports a deployment failure without a log URL, so the PR is not fully green. Macroscope's last correctness review was skipped because its $20.01 estimate exceeded the $15 per-review limit; human review remains needed. No new browser or device verification was performed for this integration; the evidence below predates the merge.Earlier UI verification
Before: no warning while cleanup is still running.
After: the PR shows the cleanup timeout and blocks replacement sessions.
Recovery: the warning clears automatically after cleanup succeeds.
Captured in a real Chromium client connected to an isolated local server and the real Codex provider. Both the V2 base and PR head used a temporary five-second idle timer and a 120-second cleanup delay. The production 30-second cleanup timeout was unchanged.
3ed8c4df: the session was marked stopped after the timeout, with no warning while cleanup was still running.b0ccd56f: the session stayed in error and the app showed that replacement sessions were blocked until cleanup completed.Temporary test hooks were removed after capture and are not included in this PR. Original PNGs and the captured session-state evidence are retained with the test artifacts.
Earlier detailed test report. The validation above records the integrated commits.
Implemented and tested by GPT-6 using Codex in T3 Code for shivamhwp.