mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-18 05:23:39 +02:00
fix(boat): bound provider-pack cold bootstrap separately
Allow thirty minutes for computer ACPX pack staging without extending turn, recovery, finalization or warm-idle deadlines. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
cebfa8b09f
commit
ab5bb8552a
4 files changed
+46
-6
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { nativeSessionBootstrapTimeoutMs } from "./native-session-executor.js";
|
||||
import { prepareHeartbeatGitHubLaunchers } from "../heartbeat-github-launchers.js";
|
||||
import { gunzipSync } from "node:zlib";
|
||||
import { configuredEnvironmentProjection } from "../../vendor/paperclip-runner/index.js";
|
||||
@@ -13766,3 +13767,18 @@ it.each([
|
||||
),
|
||||
).toBe("native_event_replay_conflict");
|
||||
});
|
||||
|
||||
|
||||
describe("computer provider-pack bootstrap policy", () => {
|
||||
it.each([
|
||||
["acpx", "computer", 1_800_000],
|
||||
["codex", "computer", undefined],
|
||||
["opencode", "computer", undefined],
|
||||
["acpx", "sandbox", undefined],
|
||||
["acpx", "ssh", undefined],
|
||||
["acpx", "local", undefined],
|
||||
] as const)("bounds only %s on %s", (provider, transport, expected) => {
|
||||
const target = transport === "local" ? undefined : { kind: "remote" as const, transport };
|
||||
expect(nativeSessionBootstrapTimeoutMs(provider, target)).toBe(expected);
|
||||
});
|
||||
});
|
||||
@@ -7497,6 +7497,19 @@ export async function renewNativeSessionExecutionLease(input: {
|
||||
if (!updated) throw new Error("native_session_lease_lost");
|
||||
}
|
||||
|
||||
/** Computer ACPX cold starts stage the complete qualified Linux provider pack.
|
||||
* Measured 1.1 GiB transfers plus compression/verification need about 24 minutes;
|
||||
* this finite admission budget does not extend warm leases or turn execution.
|
||||
*/
|
||||
export function nativeSessionBootstrapTimeoutMs(
|
||||
providerKind: NativeExecutionInput["provider"]["kind"],
|
||||
target?: Pick<Extract<AdapterExecutionTarget, { kind: "remote" }>, "kind" | "transport"> | { kind: "local" } | null,
|
||||
): number | undefined {
|
||||
return providerKind === "acpx" && target?.kind === "remote" && target.transport === "computer"
|
||||
? 30 * 60 * 1_000
|
||||
: undefined;
|
||||
}
|
||||
|
||||
function startNativeSessionExecutionLeaseRenewal(input: {
|
||||
db: Db;
|
||||
runId: string;
|
||||
@@ -8802,6 +8815,7 @@ async function executePaperclipNativeSessionWithinScope(
|
||||
input: runnerExecution,
|
||||
remoteCleanupScope: remoteCleanupLease ? remoteLeaseCleanupScope(remoteCleanupLease) : undefined,
|
||||
turnTimeoutMs: input.turnTimeoutMs,
|
||||
bootstrapTimeoutMs: nativeSessionBootstrapTimeoutMs(input.execution.provider.kind, input.runnerExecutionTarget),
|
||||
backend:
|
||||
input.backend ??
|
||||
runnerdBackend ??
|
||||
|
||||
Reference in new issue
Block a user