Skip to content

Release lock for interruptable client requests#237

Open
mishushakov wants to merge 6 commits intomainfrom
fix-interrupt
Open

Release lock for interruptable client requests#237
mishushakov wants to merge 6 commits intomainfrom
fix-interrupt

Conversation

@mishushakov
Copy link
Member

@mishushakov mishushakov commented Mar 24, 2026

fixes #213

@cursor
Copy link

cursor bot commented Mar 24, 2026

PR Summary

Medium Risk
Changes the server-side execution locking scope in template/server/messaging.py, which affects concurrency and cleanup ordering; mistakes could cause leaked executions or out-of-order env var cleanup under load. Coverage is improved via new regression tests across JS and Python clients for the timeout/disconnect scenario.

Overview
Fixes issue #213 by releasing the websocket execution lock after the request is sent, rather than holding it through result streaming in template/server/messaging.py, so a client-side timeout/disconnect can’t block subsequent executions.

Adds regression tests in JS and Python (sync + async) to ensure a timed-out run doesn’t prevent later runCode/run_code calls in the same context, and includes a patch changeset for the template release.

Written by Cursor Bugbot for commit e86f3a2. This will update automatically on new commits. Configure here.

@mishushakov mishushakov enabled auto-merge (squash) March 24, 2026 19:11
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.

asyncio.Lock in messaging.py not released on client disconnect → cascading timeouts

1 participant