Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/lib/onboard/managed-workload/onboard-orchestration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,41 +99,57 @@ describe("managed workload onboard orchestration", () => {
expect(
shouldActivateStockManagedRuntime({
portableLifecycle: false,
hermesPortableLifecycle: false,
agentName: "openclaw",
}),
).toBe(true);
expect(
shouldActivateStockManagedRuntime({
portableLifecycle: false,
hermesPortableLifecycle: false,
agentName: "hermes",
}),
).toBe(true);
expect(
shouldActivateStockManagedRuntime({
portableLifecycle: false,
hermesPortableLifecycle: false,
agentName: "langchain-deepagents-code",
}),
).toBe(true);
expect(
shouldActivateStockManagedRuntime({
portableLifecycle: true,
hermesPortableLifecycle: false,
agentName: "openclaw",
}),
).toBe(false);
expect(
shouldActivateStockManagedRuntime({
portableLifecycle: false,
hermesPortableLifecycle: false,
agentName: "nemocua",
}),
).toBe(false);
expect(
shouldActivateStockManagedRuntime({
portableLifecycle: false,
hermesPortableLifecycle: false,
agentName: "pi",
}),
).toBe(false);
});

it("does not activate stock managed images for Hermes Portable (#9634)", () => {
expect(
shouldActivateStockManagedRuntime({
portableLifecycle: false,
hermesPortableLifecycle: true,
agentName: "hermes",
}),
).toBe(false);
});

it("selects only the shipped Hermes Dockerfile fallback without profile or prebuild work", async () => {
const expectedDockerfilePath = "/workspace/agents/hermes/Dockerfile";
const ensurePreparedProfile = vi.fn(() => null);
Expand Down
7 changes: 6 additions & 1 deletion src/lib/onboard/managed-workload/onboard-orchestration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,14 @@ export interface ManagedWorkloadOnboardRuntime {

export function shouldActivateStockManagedRuntime(input: {
readonly portableLifecycle: boolean;
readonly hermesPortableLifecycle: boolean;
readonly agentName: string;
}): boolean {
return !input.portableLifecycle && isShippedManagedImageAgent(input.agentName);
return (
!input.portableLifecycle &&
!input.hermesPortableLifecycle &&
isShippedManagedImageAgent(input.agentName)
);
}

export function assertPortableManagedBootstrapNotSelected(
Expand Down
1 change: 1 addition & 0 deletions src/lib/onboard/sandbox-create/orchestration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ export function createSandboxWithBaseImageResolution(runtime: SandboxCreateOrche
tempManagedRuntime ||
managedWorkloadOnboard.shouldActivateStockManagedRuntime({
portableLifecycle: sandboxGpuCreateFlow.resolvePortableLifecycleMode(agent),
hermesPortableLifecycle: agentCreateInput.hermesPortableLifecycle,
agentName: requestedAgentName,
}),
tempManagedRuntimeCatalog,
Expand Down
Loading