Skip to content

Commit 58a63e4

Browse files
stephentoubCopilot
andcommitted
Update tests for CLI 1.0.81-6
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 3aac895 commit 58a63e4

4 files changed

Lines changed: 64 additions & 79 deletions

File tree

nodejs/test/e2e/factory.e2e.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,9 @@ it.skipIf(isInProcessTransport)(
9393
}
9494
);
9595

96-
// TODO(cli-1.0.81-2): the subagent request is rejected downstream under CLI 1.0.81-2, so the
97-
// fixture reports didThrow: true. Re-enable once the runtime fix ships.
98-
//
9996
// The timeout is generous because the factory abandons its subagent once the runtime has
10097
// accepted the request, so the run settles only after the runtime drains that work.
101-
it.skip("forwards every declared subagent option to the runtime", async () => {
98+
it("forwards every declared subagent option to the runtime", async () => {
10299
if (!factoryTestContext) {
103100
throw new Error("Factory E2E requires the stdio transport");
104101
}

nodejs/test/e2e/permissions.e2e.test.ts

Lines changed: 60 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ import { approveAll, defineTool, createAttributedPermissionResult } from "../../
1717
import { createSdkTestContext, isInProcessTransport } from "./harness/sdkTestContext.js";
1818
import { getFinalAssistantMessage, getNextEventOfType } from "./harness/sdkTestHelper.js";
1919

20-
const isWindows = process.platform === "win32";
21-
2220
describe("Permission callbacks", async () => {
2321
const { copilotClient: client, workDir } = await createSdkTestContext();
2422

@@ -632,76 +630,67 @@ describe("Permission callbacks", async () => {
632630
}
633631
});
634632

635-
// TODO(cli-1.0.81-2): CLI 1.0.81-2 no longer matches the location key returned by
636-
// permissions.locations.resolve when permissions.locations.apply re-resolves it on Windows,
637-
// so appliedRuleCount comes back as 0. Still covered on Linux and macOS.
638-
it.skipIf(isWindows)(
639-
"should invoke permission location and folder trust rpc apis",
640-
async () => {
641-
const session = await client.createSession({ onPermissionRequest: approveAll });
642-
const locationDirectory = await createUniqueWorkDirectory(
643-
workDir,
644-
"permission-location"
645-
);
646-
const trustedDirectory = await createUniqueWorkDirectory(workDir, "folder-trust");
647-
const commandIdentifier = `node-permission-location-${Date.now()}`;
648-
try {
649-
const resolved = await session.rpc.permissions.locations.resolve({
650-
workingDirectory: locationDirectory,
651-
});
652-
expect(resolved.locationType).toBe("dir");
653-
expectPathEqual(resolved.locationKey, locationDirectory);
654-
655-
expect(
656-
(
657-
await session.rpc.permissions.locations.addToolApproval({
658-
locationKey: resolved.locationKey,
659-
approval: {
660-
kind: "commands",
661-
commandIdentifiers: [commandIdentifier],
662-
},
663-
})
664-
).success
665-
).toBe(true);
666-
667-
const applied = await session.rpc.permissions.locations.apply({
668-
workingDirectory: locationDirectory,
669-
});
670-
expect(applied.locationType).toBe(resolved.locationType);
671-
expectPathEqual(applied.locationKey, resolved.locationKey);
672-
expect(applied.appliedRuleCount).toBeGreaterThanOrEqual(1);
673-
expect(
674-
applied.appliedRules.some(
675-
(rule) => rule.kind === "shell" && rule.argument === commandIdentifier
676-
)
677-
).toBe(true);
678-
679-
expect(
680-
(
681-
await session.rpc.permissions.folderTrust.isTrusted({
682-
path: trustedDirectory,
683-
})
684-
).trusted
685-
).toBe(false);
686-
expect(
687-
(
688-
await session.rpc.permissions.folderTrust.addTrusted({
689-
path: trustedDirectory,
690-
})
691-
).success
692-
).toBe(true);
693-
expect(
694-
(
695-
await session.rpc.permissions.folderTrust.isTrusted({
696-
path: trustedDirectory,
697-
})
698-
).trusted
699-
).toBe(true);
700-
} finally {
701-
await session.disconnect();
702-
}
633+
it("should invoke permission location and folder trust rpc apis", async () => {
634+
const session = await client.createSession({ onPermissionRequest: approveAll });
635+
const locationDirectory = await createUniqueWorkDirectory(workDir, "permission-location");
636+
const trustedDirectory = await createUniqueWorkDirectory(workDir, "folder-trust");
637+
const commandIdentifier = `node-permission-location-${Date.now()}`;
638+
try {
639+
const resolved = await session.rpc.permissions.locations.resolve({
640+
workingDirectory: locationDirectory,
641+
});
642+
expect(resolved.locationType).toBe("dir");
643+
expectPathEqual(resolved.locationKey, locationDirectory);
644+
645+
expect(
646+
(
647+
await session.rpc.permissions.locations.addToolApproval({
648+
locationKey: resolved.locationKey,
649+
approval: {
650+
kind: "commands",
651+
commandIdentifiers: [commandIdentifier],
652+
},
653+
})
654+
).success
655+
).toBe(true);
656+
657+
const applied = await session.rpc.permissions.locations.apply({
658+
workingDirectory: locationDirectory,
659+
});
660+
expect(applied.locationType).toBe(resolved.locationType);
661+
expectPathEqual(applied.locationKey, resolved.locationKey);
662+
expect(applied.appliedRuleCount).toBeGreaterThanOrEqual(1);
663+
expect(
664+
applied.appliedRules.some(
665+
(rule) => rule.kind === "shell" && rule.argument === commandIdentifier
666+
)
667+
).toBe(true);
668+
669+
expect(
670+
(
671+
await session.rpc.permissions.folderTrust.isTrusted({
672+
path: trustedDirectory,
673+
})
674+
).trusted
675+
).toBe(false);
676+
expect(
677+
(
678+
await session.rpc.permissions.folderTrust.addTrusted({
679+
path: trustedDirectory,
680+
})
681+
).success
682+
).toBe(true);
683+
expect(
684+
(
685+
await session.rpc.permissions.folderTrust.isTrusted({
686+
path: trustedDirectory,
687+
})
688+
).trusted
689+
).toBe(true);
690+
} finally {
691+
await session.disconnect();
703692
}
704-
);
693+
});
705694
});
706695

707696
async function createUniqueWorkDirectory(baseDir: string, prefix: string): Promise<string> {

nodejs/test/e2e/rpc_ui_ephemeral_query.e2e.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ import { createSdkTestContext } from "./harness/sdkTestContext.js";
99
describe("UI ephemeral query RPC", async () => {
1010
const { copilotClient: client } = await createSdkTestContext();
1111

12-
// TODO(cli-1.0.81-2): CLI 1.0.81-5 still fails session.ui.ephemeralQuery against the
13-
// recorded snapshot on macOS ("Failed to get response from the AI model"). Re-enable
14-
// once the runtime fix ships.
15-
it.skip("should answer ephemeral query", { timeout: 120_000 }, async () => {
12+
it("should answer ephemeral query", { timeout: 120_000 }, async () => {
1613
const session = await client.createSession({ onPermissionRequest: approveAll });
1714
try {
1815
const result = await session.rpc.ui.ephemeralQuery({

rust/tests/e2e/rpc_mcp_lifecycle.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ async fn should_start_and_restart_mcp_server() {
209209
// internal methods generically; it never exercised a supported wire API.
210210

211211
#[tokio::test]
212+
#[ignore = "blocked on CLI 1.0.81-6 missing session.mcp.reloadWithConfig handler"]
212213
async fn should_reload_mcp_servers_with_config() {
213214
super::support::with_shared_e2e_context(
214215
&E2E,
@@ -252,6 +253,7 @@ async fn should_reload_mcp_servers_with_config() {
252253
}
253254

254255
#[tokio::test]
256+
#[ignore = "blocked on CLI 1.0.81-6 missing session.mcp.configureGitHub handler"]
255257
async fn should_configure_github_mcp_server() {
256258
super::support::with_shared_e2e_context(
257259
&E2E,

0 commit comments

Comments
 (0)