mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-06 07:38:47 +01:00
Carry voice backlog clock repair into sleep-30-inbound-wake-notices
Co-Authored-By: Paperclip <noreply@paperclip.ing> * codex/sleep-cancel-contention: Keep voice backlog assertions from fast-forwarding provider retries
This commit is contained in:
commit
be9e511a3f
2 files changed
+15
-2
No files matched your search
@@ -272,3 +272,15 @@ All 132 cases across the complete voice-session and inbound-cleanup suites pass
|
||||
on separate fresh databases, and server typechecking passes. Downstream
|
||||
integration and latest-head CI remain required. The separate company-deletion
|
||||
cleanup findings are not resolved by this correction.
|
||||
|
||||
## Fairness-test clock follow-up (2026-10-27)
|
||||
|
||||
CI's backlog test observed two provider failures where it expected one. A controlled
|
||||
30 ms provider delay reproduced the same failure: the assertion callback advanced
|
||||
fake time by one second on every retry, in addition to Vitest's ordinary clock
|
||||
advancement, reaching the failed provider's retry while the original backlog was
|
||||
still settling through PostgreSQL. Removing that extra clock jump makes the same
|
||||
controlled case pass. The five-second assertion budget and all product code remain
|
||||
unchanged. With the temporary provider delay removed, all 13 lifecycle tests pass.
|
||||
This repairs test clock ownership; it does not weaken provider retries or delivery
|
||||
fairness. Current-head CI remains required.
|
||||
@@ -184,8 +184,9 @@ const support = external ? { supported: true } : await getEmbeddedPostgresTestSu
|
||||
terminate.mockImplementation(async call => { if (call.id === broken.id && failed) throw new Error("provider unavailable"); return true; });
|
||||
await start();
|
||||
expect(terminate.mock.calls.slice(0, 25).some(([call]) => call.id === last.id)).toBe(true);
|
||||
await vi.waitFor(async () => {
|
||||
await vi.advanceTimersByTimeAsync(1000);
|
||||
// waitFor already advances fake time. Extra one-second jumps can reach
|
||||
// the failed provider's retry while ordinary database writes are pending.
|
||||
await vi.waitFor(() => {
|
||||
expect(terminate.mock.calls.filter(([call]) => call.id !== broken.id)).toHaveLength(105);
|
||||
}, { timeout: 5000 });
|
||||
expect(errors).toHaveLength(1); failed = false;
|
||||
|
||||
Reference in new issue
Block a user