惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
量子位
V
V2EX
S
SegmentFault 最新的问题
月光博客
月光博客
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
V
Visual Studio Blog
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
博客园_首页
博客园 - Franky
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
Y
Y Combinator Blog
The Cloudflare Blog
C
Check Point Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
B
Blog
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: require core deferred callbacks · openclaw/openclaw...
steipete · 2026-05-09 · via Recent Commits to openclaw:main

@@ -60,18 +60,26 @@ async function createRealtimeServer(params?: {

6060

return { url: `ws://127.0.0.1:${port}` };

6161

}

626263+

function createSignal() {

64+

let resolve: (() => void) | undefined;

65+

const promise = new Promise<void>((next) => {

66+

resolve = next;

67+

});

68+

if (!resolve) {

69+

throw new Error("Expected frame signal resolver to be initialized");

70+

}

71+

return { promise, resolve };

72+

}

73+6374

describe("createRealtimeTranscriptionWebSocketSession", () => {

6475

it("flushes queued binary audio after an open-ready connection", async () => {

6576

const frames: Buffer[] = [];

66-

let resolveFrames!: () => void;

67-

const framesReady = new Promise<void>((resolve) => {

68-

resolveFrames = resolve;

69-

});

77+

const framesReady = createSignal();

7078

const server = await createRealtimeServer({

7179

onBinary: (payload) => {

7280

frames.push(payload);

7381

if (Buffer.concat(frames).toString() === "queuedafter") {

74-

resolveFrames();

82+

framesReady.resolve();

7583

}

7684

},

7785

});

@@ -88,24 +96,21 @@ describe("createRealtimeTranscriptionWebSocketSession", () => {

8896

session.sendAudio(Buffer.from("queued"));

8997

await session.connect();

9098

session.sendAudio(Buffer.from("after"));

91-

await framesReady;

99+

await framesReady.promise;

92100

expect(Buffer.concat(frames).toString()).toBe("queuedafter");

93101

expect(session.isConnected()).toBe(true);

94102

session.close();

95103

});

9610497105

it("lets providers mark ready after a JSON handshake", async () => {

98106

const frames: unknown[] = [];

99-

let resolveFrames!: () => void;

100-

const framesReady = new Promise<void>((resolve) => {

101-

resolveFrames = resolve;

102-

});

107+

const framesReady = createSignal();

103108

const server = await createRealtimeServer({

104109

initialEvent: { type: "session.created" },

105110

onText: (payload) => {

106111

frames.push(payload);

107112

if (frames.length === 2) {

108-

resolveFrames();

113+

framesReady.resolve();

109114

}

110115

},

111116

});

@@ -126,7 +131,7 @@ describe("createRealtimeTranscriptionWebSocketSession", () => {

126131127132

session.sendAudio(Buffer.from("queued"));

128133

await session.connect();

129-

await framesReady;

134+

await framesReady.promise;

130135

expect(frames).toEqual([

131136

{ type: "session.update" },

132137

{ type: "input_audio.append", audio: Buffer.from("queued").toString("base64") },