fix(pi): keep active runs alive during background sleep
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
} from 'node:child_process';
|
||||
import { platform } from 'node:os';
|
||||
import { logger } from '../../utils/logger';
|
||||
import type { CodingRuntimeDisposeReason } from '../contracts';
|
||||
import { PiProcessError, type PiProcessErrorCode } from './process-errors';
|
||||
import {
|
||||
PiRpcClient,
|
||||
@@ -49,16 +50,13 @@ export type PiWorkerStopResult = {
|
||||
|
||||
export type PiWorkerProofFailure = 'unexpected_exit' | 'protocol_invalidation';
|
||||
|
||||
export type PiWorkerStopReason =
|
||||
export type PiWorkerStopReason = CodingRuntimeDisposeReason
|
||||
| 'app_shutdown'
|
||||
| 'idle_eviction'
|
||||
| 'queued_suspension'
|
||||
| 'stale_resource_rebuild'
|
||||
| 'recover'
|
||||
| 'dispose'
|
||||
| 'model_reconfiguration'
|
||||
| 'process_capacity_reopen'
|
||||
| 'fork_replacement'
|
||||
| 'protocol_invalidation'
|
||||
| 'unexpected_exit_cleanup'
|
||||
| 'open_failure'
|
||||
@@ -74,7 +72,11 @@ const PI_WORKER_STOP_REASONS = new Set<PiWorkerStopReason>([
|
||||
'queued_suspension',
|
||||
'stale_resource_rebuild',
|
||||
'recover',
|
||||
'dispose',
|
||||
'background_sleep',
|
||||
'project_deactivated',
|
||||
'project_removed',
|
||||
'conversation_deleted',
|
||||
'auth_cleanup',
|
||||
'model_reconfiguration',
|
||||
'process_capacity_reopen',
|
||||
'fork_replacement',
|
||||
|
||||
Reference in New Issue
Block a user