Skip to content

Commit 3ef7f59

Browse files
authored
fix(ci): invalidate plugin SDK declarations on auth changes (#123861)
* fix(ci): invalidate plugin sdk declarations on auth changes * test(ui): await device migration overlay updates
1 parent d5e89de commit 3ef7f59

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎scripts/prepare-extension-package-boundary-artifacts.mts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ function listSourceDtsOutputs(sourceDir: string, outputPrefix: string) {
161161
const PLUGIN_SDK_TYPE_INPUTS = [
162162
"tsconfig.json",
163163
"src/plugin-sdk",
164+
// provider-auth re-exports these signatures into generated SDK declarations.
165+
"src/agents/cli-credentials.ts",
164166
"src/plugins/provider-runtime-model.types.ts",
165167
"src/plugins/types.ts",
166168
"src/auto-reply",

‎ui/src/app/overlays.test.ts‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ describe("device-auth upgrade migration", () => {
7676
const request = vi.fn<RequestFn>(() => Promise.resolve({}));
7777
const harness = createGatewayHarness(null, false);
7878
const overlays = createApplicationOverlays(harness.gateway);
79+
const migrationError = new Promise<string>((resolve) => {
80+
const unsubscribe = overlays.subscribe((snapshot) => {
81+
if (snapshot.deviceAuthMigration.error) {
82+
unsubscribe();
83+
resolve(snapshot.deviceAuthMigration.error);
84+
}
85+
});
86+
});
7987
harness.update({
8088
client: client(request),
8189
phase: "connected",
@@ -85,9 +93,7 @@ describe("device-auth upgrade migration", () => {
8593
} as ApplicationGatewaySnapshot["hello"],
8694
});
8795

88-
await vi.waitFor(() => {
89-
expect(overlays.snapshot.deviceAuthMigration.error).toContain("HTTPS or localhost");
90-
});
96+
await expect(migrationError).resolves.toContain("HTTPS or localhost");
9197
expect(overlays.snapshot.deviceAuthMigration.requestId).toBeNull();
9298
expect(request).not.toHaveBeenCalledWith("device.pair.list", expect.anything());
9399
overlays.dispose();

0 commit comments

Comments
 (0)