From d8e1bd97f530fc7a5119549a35b871b7b3d9f737 Mon Sep 17 00:00:00 2001 From: Dotta Date: Sun, 25 Oct 2026 18:48:59 -0500 Subject: [PATCH] test: await GitHub recovery deadline settlement after resume Co-Authored-By: Paperclip --- .../2026-10-24-recurring-server-sleep-stack.md | 9 +++++++++ ...-10-25-github-webhook-recovery-sleep-audit.md | 16 ++++++++++++---- .../__tests__/chat-channels.integration.test.ts | 5 ++++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/doc/plans/2026-10-24-recurring-server-sleep-stack.md b/doc/plans/2026-10-24-recurring-server-sleep-stack.md index 153d9eb777a..9a98efbf885 100644 --- a/doc/plans/2026-10-24-recurring-server-sleep-stack.md +++ b/doc/plans/2026-10-24-recurring-server-sleep-stack.md @@ -2042,3 +2042,12 @@ standalone publication filename. The corrected three-file command is running on a fresh database; the earlier result is not full publication acceptance. Earlier stack CI/review issues, all remaining migrations, and master reconciliation remain outstanding. No stack PR is merged or claimed ready as a whole. + + +Slice 38 production repair is pushed at `491a7e1eef`; fresh review is 5/5 and +the P1 thread is resolved. Workspace types/build passed. The corrected complete +three-suite run passed 1,605 tests and failed one assertion that read the timer +before worker settlement. The assertion now waits for settled idle tracking and +the actual future deadline; all 37 affected lifecycle/publication/startup cases +pass. The full failure remains in the audit; latest-head remote gates are required. +No full-run success or stack completion is inferred from that focused repair. diff --git a/doc/plans/2026-10-25-github-webhook-recovery-sleep-audit.md b/doc/plans/2026-10-25-github-webhook-recovery-sleep-audit.md index 39efc20e2f9..2973a716dfc 100644 --- a/doc/plans/2026-10-25-github-webhook-recovery-sleep-audit.md +++ b/doc/plans/2026-10-25-github-webhook-recovery-sleep-audit.md @@ -161,10 +161,18 @@ persist restoration, still requires conservative durable uncertainty handling. (`/tmp/sleep38-full-chat.log`). It misspelled the standalone publication suite filename, so it did not run that suite and is not three-suite acceptance. The corrected complete command includes `chat-interaction-publications.test.ts`. -- Fresh final workspace typecheck/build and corrected three-suite acceptance on - `paperclip_sleep38_final_20261025_1837_test` are running. Initial remote CI has - 52 passing checks and the valid failing Greptile review; repaired-head gates - remain required. +- Final workspace typecheck/build passed. Corrected three-suite acceptance on + `paperclip_sleep38_final_20261025_1837_test` passed 1,605 cases and failed one + resume timing assertion in 571.32 seconds (`/tmp/sleep38-final-chat.log`). + The test observed the newly committed checkpoint before `check` reloaded its + deadline and the coordinator scheduled it. It now waits for idle tracking to + settle and a deadline more than 30 seconds in the future, then verifies pause + disarms it. Production code is unchanged by this assertion repair. +- All 37 selected lifecycle/publication/startup cases pass with that assertion + (`/tmp/sleep38-settlement-fixed.log`, 23.10 seconds). This is focused repair + evidence, not a claim that the earlier full run passed. The latest commit still + requires all remote CI and fresh review. The production repair at `491a7e1eef` + received Greptile 5/5 and its P1 thread is resolved. ## Remaining boundaries diff --git a/server/src/__tests__/chat-channels.integration.test.ts b/server/src/__tests__/chat-channels.integration.test.ts index 4f7b707f0db..6743fe2e146 100644 --- a/server/src/__tests__/chat-channels.integration.test.ts +++ b/server/src/__tests__/chat-channels.integration.test.ts @@ -15497,7 +15497,10 @@ describeEmbeddedPostgres("chat channel control-plane integration", () => { const oldVersion = (await f.checkpoint()).version; await f.service.configure(f.endpoint.id, { action: "resume" }, "owner-user"); await expect.poll(async () => (await f.checkpoint()).version, { timeout: 5000 }).toBeGreaterThan(oldVersion); - expect(coordinator.nextWakeAt()).not.toBeNull(); + await expect.poll(() => { + const next = coordinator.nextWakeAt(); + return { active: idleWorkSnapshot().active, future: next !== null && next > Date.now() + 30_000 }; + }, { timeout: 5000 }).toEqual({ active: 0, future: true }); await f.service.configure(f.endpoint.id, { action: "pause" }, "owner-user"); await expect.poll(() => ({ active: idleWorkSnapshot().active, next: coordinator.nextWakeAt() }), { timeout: 5000 }) .toEqual({ active: 0, next: null });