Revert "fix(memory): bound OOM-prone accumulators (#10179)" (#10255)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Neil
2026-07-23 18:35:31 -07:00
committed by GitHub
co-authored by Orca
parent 6eb70d8370
commit aab112933e
1577 changed files with 15167 additions and 91655 deletions
@@ -1,6 +1,4 @@
import WebSocket from 'ws'
import { RemoteRuntimeClientError } from './remote-runtime-client-error'
import { REMOTE_RUNTIME_MAX_READY_WAITERS } from './remote-runtime-memory-limits'
import { remoteRuntimeUnavailableError } from './remote-runtime-request-frames'
import type {
SharedControlConnectionState,
@@ -20,14 +18,6 @@ export function waitForSharedControlReadyWithTimeout(args: {
timeoutMs: number
open: () => void
}): Promise<void> {
if (args.readyWaiters.length >= REMOTE_RUNTIME_MAX_READY_WAITERS) {
return Promise.reject(
new RemoteRuntimeClientError(
'remote_runtime_busy',
'Remote runtime connection wait limit reached; retry after pending work finishes.'
)
)
}
return new Promise<void>((resolve, reject) => {
let settled = false
let waiter!: SharedControlReadyWaiter
@@ -61,14 +51,6 @@ export function waitForSharedControlReadyWithTimeout(args: {
}
}
args.readyWaiters.push(waiter)
try {
args.open()
} catch (error) {
const index = args.readyWaiters.indexOf(waiter)
if (index >= 0) {
args.readyWaiters.splice(index, 1)
}
waiter.reject(error instanceof Error ? error : remoteRuntimeUnavailableError(String(error)))
}
args.open()
})
}