feat(ql3): establish 3.0 incubation baseline

This commit is contained in:
whyour
2026-08-12 00:25:26 +08:00
parent 4bf92dcfeb
commit c699c32461
2817 changed files with 779642 additions and 653 deletions
@@ -0,0 +1,41 @@
export const CANCELLATION_DISPATCH_STATUSES = [
'pending',
'leased',
'retry_wait',
'dispatched',
'blocked',
] as const;
export type CancellationDispatchStatus =
(typeof CANCELLATION_DISPATCH_STATUSES)[number];
export const CANCELLATION_DISPATCH_RESULTS = [
'termination_requested',
'already_exited',
'identity_mismatch',
'pid_mismatch',
'unsupported',
'invalid',
'controller_missing',
'handle_missing',
'dispatch_error',
] as const;
export type CancellationDispatchResult =
(typeof CANCELLATION_DISPATCH_RESULTS)[number];
export interface CancellationDispatchRecord {
runId: string;
attemptId: string;
status: CancellationDispatchStatus;
version: number;
dispatchCount: number;
nextAttemptAtMs?: number;
leaseOwner?: string;
leaseToken?: string;
leaseExpiresAtMs?: number;
lastResult?: CancellationDispatchResult;
lastDispatchedAtMs?: number;
createdAtMs: number;
updatedAtMs: number;
}