feat(FN-2617): merge fusion/fn-2617 (auto-resolved)
- test(FN-2617): stabilize workflow remediation timeout under full suite - test(FN-2617): complete Step 5 — add openclaw runtime resolution coverage - feat(FN-2617): complete Step 4 — route step sessions through runtime resolution - fix(FN-2617): thread runtimeHint through merger rebase push flow - feat(FN-2617): complete Step 3 — wire runtimeHint across engine subsystems - feat(FN-2617): complete Step 2 — thread runtimeHint in executor paths - feat(FN-2617): complete Step 1 — add runtimeHint extraction helper
This commit is contained in:
24
packages/engine/src/__tests__/agent-session-helpers.test.ts
Normal file
24
packages/engine/src/__tests__/agent-session-helpers.test.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { extractRuntimeHint } from "../agent-session-helpers.js";
|
||||
|
||||
describe("extractRuntimeHint", () => {
|
||||
it("returns undefined for undefined config", () => {
|
||||
expect(extractRuntimeHint(undefined)).toBeUndefined();
|
||||
});
|
||||
|
||||
it("returns undefined when runtimeHint key is missing", () => {
|
||||
expect(extractRuntimeHint({})).toBeUndefined();
|
||||
});
|
||||
|
||||
it("returns normalized runtime hint when configured", () => {
|
||||
expect(extractRuntimeHint({ runtimeHint: " openclaw " })).toBe("openclaw");
|
||||
});
|
||||
|
||||
it("returns undefined for whitespace-only runtimeHint", () => {
|
||||
expect(extractRuntimeHint({ runtimeHint: " " })).toBeUndefined();
|
||||
});
|
||||
|
||||
it("returns undefined for non-string runtimeHint", () => {
|
||||
expect(extractRuntimeHint({ runtimeHint: 42 })).toBeUndefined();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user