mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 02:26:12 +02:00
Fix remote runner staging from deployed server artifacts
Reuse the controller-resolved binary when replacing an incompatible sandbox runner. The package development lookup does not match the deployed server vendor layout. Cover the controller and uploaded artifact identity in the remote runner regression. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
8b62b64d69
commit
fd13485ea9
2 files changed
+6
-6
No files matched your search
@@ -40,7 +40,6 @@ import {
|
||||
NativeSessionCleanupQuarantinedError,
|
||||
NativeProviderTerminalFailure,
|
||||
NativeSessionProtocolIntegrityError,
|
||||
defaultCapabilityRunnerdBinary,
|
||||
} from "../../vendor/paperclip-runner/index.js";
|
||||
import * as issueServiceModule from "../issues.js";
|
||||
import {
|
||||
@@ -174,7 +173,6 @@ vi.mock("../../vendor/paperclip-runner/index.js", async (importOriginal) => {
|
||||
>();
|
||||
return {
|
||||
...original,
|
||||
defaultCapabilityRunnerdBinary: vi.fn(original.defaultCapabilityRunnerdBinary),
|
||||
createNativeSessionBackend: state.createBackend,
|
||||
createRunnerdCodexTransport: state.createTransport,
|
||||
executeNativeSession: state.execute,
|
||||
@@ -9650,7 +9648,7 @@ describe("runnerd provider runtime wiring", () => {
|
||||
const controllerArtifact = join(isolatedStateDirectory, "paperclip-runnerd");
|
||||
if (staleRunner) {
|
||||
await writeFile(controllerArtifact, "fixture runner artifact");
|
||||
vi.mocked(defaultCapabilityRunnerdBinary).mockReturnValueOnce(controllerArtifact);
|
||||
state.resolveRunnerBinary.mockReturnValueOnce(controllerArtifact);
|
||||
}
|
||||
const syncIn = vi.fn(async () => undefined);
|
||||
const remoteExecute = vi.fn(
|
||||
@@ -9726,6 +9724,7 @@ describe("runnerd provider runtime wiring", () => {
|
||||
"reached-preinstalled-codex-verification",
|
||||
);
|
||||
if (staleRunner) {
|
||||
expect(transport.runnerBinary).toBe(controllerArtifact);
|
||||
expect(syncIn).toHaveBeenCalledTimes(1);
|
||||
expect(syncIn).toHaveBeenCalledWith([expect.objectContaining({
|
||||
files: [expect.objectContaining({
|
||||
|
||||
@@ -62,7 +62,6 @@ import {
|
||||
acpxRuntimeSessionDirectoryName,
|
||||
createNativeSessionBackend,
|
||||
createRunnerdCodexTransport,
|
||||
defaultCapabilityRunnerdBinary,
|
||||
executeNativeSession,
|
||||
applyNativeSessionGoalControl,
|
||||
inspectWarmRunTransition,
|
||||
@@ -10432,8 +10431,10 @@ async function createRunnerdBackendWithinSessionClaim(
|
||||
}
|
||||
}
|
||||
if (!usedPreinstalledRunner) {
|
||||
const sourceBinary =
|
||||
explicitRemoteBinary ?? defaultCapabilityRunnerdBinary();
|
||||
// Upload the same artifact used for the controller identity. The server
|
||||
// vendors the runner under vendor/paperclip-runner/bin, so the package
|
||||
// development fallback cannot locate it in a deployed server.
|
||||
const sourceBinary = controllerRunnerBinary;
|
||||
if (!existsSync(sourceBinary)) {
|
||||
throw new Error("runner_remote_artifact_unavailable");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user