Skip to content

Commit 1488c27

Browse files
author
hzq
committed
Wait for negotiated ACP coverage in cancellation test
Remote registration precedes the tool-free capability advertisement. Wait for both fixture engines, and check this path in the Windows CI matrix without relaxing gateway admission.
1 parent 37e4a8a commit 1488c27

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,7 @@ jobs:
6666
- run: npm run format:check
6767
- run: npm run build
6868
- run: node --import ./dist/test/setup-locale.js --test --test-concurrency=1 dist/test/release-plan.test.js dist/test/claude-sdk.test.js dist/test/profile-init.test.js dist/test/profile-update.test.js dist/test/caller-key-setup.test.js
69+
- name: Verify cancellation after remote ACP capability negotiation
70+
run: node --import ./dist/test/setup-locale.js --test --test-timeout=30000 dist/test/acp-cancel-usage.test.js
6971
- name: Verify profile edits with an agent-only PATH
7072
run: node --import ./dist/test/setup-locale.js --test --test-concurrency=1 --test-name-pattern="oaa doctor --write|一键启用已安装的智能体" dist/test/acp.test.js dist/test/handoff.test.js

‎test/acp-cancel-usage.test.ts‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,19 @@ for (const remote of [false, true]) {
6262
controller.signal,
6363
);
6464
void worker.catch(() => {});
65-
await waitFor(() =>
66-
s.hub.inventory('owner').some((node) => node.nodeId === 'usage-worker'),
65+
// Hello registers the node before the welcome-negotiated capability update arrives.
66+
await waitFor(
67+
() =>
68+
s.hub.inventory('owner').some((node) => {
69+
const execution = node.execution as { toolFreeReasoning?: string[] } | undefined;
70+
return (
71+
node.nodeId === 'usage-worker' &&
72+
Object.keys(adapters).every((name) =>
73+
execution?.toolFreeReasoning?.includes(`adapter/${name}`),
74+
)
75+
);
76+
}),
77+
10_000,
6778
);
6879
} else Object.assign(s.runtime.config.adapters, adapters);
6980

0 commit comments

Comments
 (0)