Skip to content

Commit 9301598

Browse files
committed
fix(release): stabilize beta validation after main rebase
1 parent 6f57286 commit 9301598

4 files changed

Lines changed: 36 additions & 10 deletions

File tree

.github/actions/setup-pnpm-store-cache/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ runs:
5454
cache: ${{ inputs.use-actions-cache }}
5555
cache_dependency_path: ${{ inputs.lockfile-path }}
5656

57+
- name: Ensure pnpm store cache directory exists
58+
if: ${{ inputs.use-actions-cache == 'true' }}
59+
shell: bash
60+
run: |
61+
set -euo pipefail
62+
store_path="$(pnpm store path --silent)"
63+
node -e "require('node:fs').mkdirSync(process.argv[1], { recursive: true })" "$store_path"
64+
5765
- name: Record pnpm version
5866
id: pnpm-version
5967
shell: bash
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
4e41932c1c152cf4ac0acadec9f9813c4f68615483b5d8c90252837efe3609f3 config-baseline.json
2-
1bf08d3e55b5d766867b9675a1b8dbfbcbf91f82d9f038f9eb676557ce51f63e config-baseline.core.json
1+
1d2c2fa07a2d3c4d046d2defe2eb48b27011be25e75db205b19e3da37e9fd0a0 config-baseline.json
2+
5b12e247f4375de2d454802d3af188a840851dd69e9d15a1a92a4815c7ef7d97 config-baseline.core.json
33
c766614db5c416910fb6cdd454efb0738779af80ddd58a4fb06d8b1ca6484ce2 config-baseline.channel.json
44
74441e331aabb3026784c148d4ee5ce3f489a15ed87ffd9b7ba0c5e2a7bc93be config-baseline.plugin.json
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
80a4c9d4a12e4c4c24bf31fa31d498a6ac3cec83834a564817c68a0a36d96483 plugin-sdk-api-baseline.json
2-
819a64c37603957e0053c4949966c99c8122299ad0f59b5780d5e5fe4ea97be3 plugin-sdk-api-baseline.jsonl
1+
d9aba1f3520e4f7213f5d5fe30bd284e2adc7feefee329b31c09a9e36347dc18 plugin-sdk-api-baseline.json
2+
cee3b04182ded8df3c52fb2abe5596644fee2f40d23000402891825337f2d6bf plugin-sdk-api-baseline.jsonl

extensions/codex/src/app-server/run-attempt.test.ts

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ function createAppServerHarness(
364364
} = {},
365365
) {
366366
const requests: Array<{ method: string; params: unknown }> = [];
367-
let notify: (notification: CodexServerNotification) => Promise<void> = async () => undefined;
367+
let notifyHandler: ((notification: CodexServerNotification) => Promise<void>) | undefined;
368368
let handleServerRequest: AppServerRequestHandler | undefined;
369369
const closeHandlers = new Set<() => void>();
370370
const request = vi.fn(async (method: string, params?: unknown, requestOptions?: unknown) => {
@@ -377,9 +377,15 @@ function createAppServerHarness(
377377
return {
378378
getServerVersion: () => "0.132.0",
379379
request,
380-
addNotificationHandler: (handler: typeof notify) => {
381-
notify = handler;
382-
return () => undefined;
380+
addNotificationHandler: (
381+
handler: (notification: CodexServerNotification) => Promise<void>,
382+
) => {
383+
notifyHandler = handler;
384+
return () => {
385+
if (notifyHandler === handler) {
386+
notifyHandler = undefined;
387+
}
388+
};
383389
},
384390
addRequestHandler: (handler: AppServerRequestHandler) => {
385391
handleServerRequest = handler;
@@ -400,6 +406,18 @@ function createAppServerHarness(
400406
return handleServerRequest!;
401407
};
402408

409+
const waitForNotificationHandler = async () => {
410+
await vi.waitFor(() => expect(notifyHandler).toBeTypeOf("function"), {
411+
interval: 1,
412+
timeout: appServerHarnessWait.timeout,
413+
});
414+
return notifyHandler!;
415+
};
416+
const sendNotification = async (notification: CodexServerNotification) => {
417+
const handler = notifyHandler ?? (await waitForNotificationHandler());
418+
await handler(notification);
419+
};
420+
403421
return {
404422
request,
405423
requests,
@@ -419,15 +437,15 @@ function createAppServerHarness(
419437
);
420438
},
421439
async notify(notification: CodexServerNotification) {
422-
await notify(notification);
440+
await sendNotification(notification);
423441
},
424442
waitForServerRequestHandler,
425443
async handleServerRequest(request: Parameters<AppServerRequestHandler>[0]) {
426444
const handler = await waitForServerRequestHandler();
427445
return handler(request);
428446
},
429447
async completeTurn(params: { threadId: string; turnId: string }) {
430-
await notify({
448+
await sendNotification({
431449
method: "turn/completed",
432450
params: {
433451
threadId: params.threadId,

0 commit comments

Comments
 (0)