Keep ACP probe assertions limited to environment keys

Verify the empty SSH probe environment through its key set so a regression failure cannot print controller environment values. Preserve the public entry and remote target assertions.

Validation: all 16 public-entry cases and both provider typechecks passed.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Devin FoleyandPaperclip committed 2026-11-13 03:46:22 -08:00
1 parent a59c580b54
commit 342a87ba12
2 files changed
+8 -6

No files matched your search

@@ -128,9 +128,10 @@ describe("claude remote execution", () => {
try {
expect(await execute(ctx)).toMatchObject({ exitCode: 0, resultJson: { engine: "acp" } });
expect(executeAcp).toHaveBeenCalledWith(ctx);
expect(ensureCommandResolvable).toHaveBeenCalledWith("claude-agent-acp", expect.any(String), {}, {
remoteExecution: expect.objectContaining({ host: "ssh.example.test", useHostAuth: false }),
});
const probe = ensureCommandResolvable.mock.calls[0] as unknown as unknown[];
expect(probe[0]).toBe("claude-agent-acp");
expect(Object.keys(probe[2] as Record<string, unknown>)).toEqual([]);
expect(probe[3]).toMatchObject({ remoteExecution: { host: "ssh.example.test", useHostAuth: false } });
} finally {
if (previous === undefined) delete process.env.CLAUDE_CODE_OAUTH_TOKEN;
else process.env.CLAUDE_CODE_OAUTH_TOKEN = previous;
@@ -118,9 +118,10 @@ describe("codex remote execution", () => {
try {
expect(await execute(ctx)).toMatchObject({ exitCode: 0, resultJson: { engine: "acp" } });
expect(executeAcp).toHaveBeenCalledWith(ctx);
expect(ensureCommandResolvable).toHaveBeenCalledWith("codex-acp", expect.any(String), {}, {
remoteExecution: expect.objectContaining({ host: "ssh.example.test", useHostAuth: false }),
});
const probe = ensureCommandResolvable.mock.calls[0] as unknown as unknown[];
expect(probe[0]).toBe("codex-acp");
expect(Object.keys(probe[2] as Record<string, unknown>)).toEqual([]);
expect(probe[3]).toMatchObject({ remoteExecution: { host: "ssh.example.test", useHostAuth: false } });
} finally {
if (previous === undefined) delete process.env.OPENAI_API_KEY;
else process.env.OPENAI_API_KEY = previous;