Skip to content

Commit a6e2865

Browse files
committed
fix(openai): satisfy lint and live-shard gates for GPT-Live
Types the retry-delay finish callback as Error so the rejection reason is provably an Error at the call site; the abort path already normalized a non-Error AbortSignal reason, but the unknown parameter type hid that from static analysis. Registers the new GPT-Live live test in the native-live-extensions-openai shard expectation. The shard selector already picked the file up from the real tree; only the hardcoded list in the tooling test lagged.
1 parent 12c04cb commit a6e2865

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎extensions/openai/realtime-quicksilver-sideband.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ function waitForSocketOpen(params: {
9393

9494
function waitForRetryDelay(ms: number, signal: AbortSignal): Promise<void> {
9595
return new Promise((resolve, reject) => {
96-
const finish = (error?: unknown) => {
96+
// Typed as Error so the rejection reason is provably an Error at the call site;
97+
// onAbort normalizes a non-Error AbortSignal reason before it reaches here.
98+
const finish = (error?: Error) => {
9799
clearTimeout(timer);
98100
signal.removeEventListener("abort", onAbort);
99101
if (error) {

‎test/scripts/test-live-shard.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ describe("scripts/test-live-shard", () => {
129129
expect(selectLiveShardFiles("native-live-extensions-openai", allFiles)).toEqual([
130130
"extensions/openai/openai-provider.live.test.ts",
131131
"extensions/openai/openai.live.test.ts",
132+
"extensions/openai/realtime-quicksilver.live.test.ts",
132133
]);
133134
expect(selectLiveShardFiles("native-live-extensions-l-n", allFiles)).toEqual([
134135
"extensions/memory-lancedb/memory-lancedb.live.test.ts",

0 commit comments

Comments
 (0)