mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 19:40:42 +00:00
Fix model and tool normalization regressions
Summary:
- Fix model and tool normalization regressions, including explicit tool-policy grants for messaging profile warnings.
- Keep Codex and Microsoft Foundry auth handling compatible with aws-sdk auth profile modes after rebasing onto current main.
Verification:
- pnpm test src/agents/pi-tools.policy.test.ts
- pnpm tsgo:extensions
- pnpm tsgo:extensions:test
- pnpm test extensions/codex/src/app-server/auth-bridge.test.ts extensions/microsoft-foundry/index.test.ts
- pnpm test:extensions:package-boundary
- pnpm lint --threads=8
- git diff --check
- GitHub PR checks green on 4ad136106b
This commit is contained in:
@@ -401,6 +401,36 @@ describe("executeNodeHostCommand", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("rejects disconnected node targets before invoking system.run", async () => {
|
||||
listNodesMock.mockResolvedValueOnce([
|
||||
{
|
||||
nodeId: "node-1",
|
||||
commands: ["system.run", "system.run.prepare"],
|
||||
connected: false,
|
||||
platform: process.platform,
|
||||
},
|
||||
]);
|
||||
|
||||
await expect(
|
||||
executeNodeHostCommand({
|
||||
command: "git log --oneline -5",
|
||||
workdir: "/tmp/work",
|
||||
env: {},
|
||||
security: "allowlist",
|
||||
ask: "off",
|
||||
requestedNode: "node-1",
|
||||
defaultTimeoutSec: 30,
|
||||
approvalRunningNoticeMs: 0,
|
||||
warnings: [],
|
||||
agentId: "requested-agent",
|
||||
sessionKey: "requested-session",
|
||||
}),
|
||||
).rejects.toThrow(
|
||||
"exec host=node requires a connected node (node-1 is currently disconnected)",
|
||||
);
|
||||
expect(callGatewayToolMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("returns a non-empty placeholder for silent node exec results", async () => {
|
||||
callGatewayToolMock.mockImplementationOnce(
|
||||
async (method: string, _options: unknown, params: MockNodeInvokeParams | undefined) => {
|
||||
|
||||
Reference in New Issue
Block a user