mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-08 17:10:50 -10:00
test(weixin): wait for poll progress during an accepted approval
An approval can be delivered by a getupdates request already in flight when the fixture snapshots the poll count. The decision becomes observable before that batch returns and the bridge starts its next request. Checking the count immediately after the decision raced the real polling loop in hosted CI. Reuse the existing bounded until predicate to await both the owner's decision and subsequent poll progress. Keep the existing 8-second fixture deadline, 1.5-second turn timeout, deduplication, owner binding and privacy assertions. No production bridge code or runtime deadline changes. Verified: actual production-process fixture 11 passed / 0 failed; npm 1289 passed / 0 failed / 7 skipped; web 770 passed plus check:web; diff check passed. Previous 130-test Rust repair paths are byte-unchanged. Original CI failure preserved in ci-e206-integrations-failure.log. Receipts: weixin-poll-progress- focused.log, weixin-poll-web-receipt.json. Fresh exact-head release proof remains required; no publication or deployment. Signed-off-by: CodeWhale Bot <[email protected]>
This commit is contained in:
1 parent
e206669d33
commit
16e1596f7b
1 file changed
+1
-1
@@ -107,7 +107,7 @@ test("production process keeps polling and owner approvals live, dedupes real me
|
||||
f.event("approval.required", f.approvals[0]);
|
||||
await until(() => f.sent.some((msg) => msg.item_list[0].text_item.text.includes("approval_id=approval-1")), "approval notice missing");
|
||||
f.batches.push([incoming(0, "private original prompt"), incoming(2, "/allow approval-1", "bob"), incoming(3, "/allow approval-1")]);
|
||||
await until(() => f.decisions.length === 1, "initiating owner could not approve during stream");
|
||||
await until(() => f.decisions.length === 1 && f.polls > polls, "initiating owner could not approve or polling stopped during stream");
|
||||
assert.equal(f.posts.length, 1); assert.ok(f.polls > polls); assert.deepEqual(f.decisions, [{ decision: "allow", remember: false }]);
|
||||
f.event("item.delta", { kind: "agent_message", delta: "answer" }); f.complete("answer");
|
||||
await until(async () => !(await f.disk()).chats?.alice?.activeTurnId, "accepted output did not settle");
|
||||
|
||||
Reference in new issue
Block a user