diff --git a/doc/plans/2026-10-12-claude-runner-default.md b/doc/plans/2026-10-12-claude-runner-default.md index b43f2fadd0a..3bd32e6b1ad 100644 --- a/doc/plans/2026-10-12-claude-runner-default.md +++ b/doc/plans/2026-10-12-claude-runner-default.md @@ -649,3 +649,20 @@ integration hold. The independent serialized issue-route timeout remains under phase diagnosis; a subsequent full mocked suite passes 36 controls but does not waive the cloud failure or prove its latency cause. Final source composition, required CI and the provider-free cloud packaging campaign remain pending. + +## Serialized route fixture initialization — 2026-10-12 + +The failing inherited-pause cloud case timed out at its 15000 ms outer test bound. +Temporary local phase instrumentation measured cold route imports at 9741 ms +(and 11920 ms in a separate diagnostic attempt), followed by a POST 409 response +in 11 ms and PATCH 409 in 4 ms. The subsequent full mocked suite passed 36 cases; +these measurements do not establish the exact unrecorded cloud latency. Route +module loading now runs in beforeEach after the same per-case module reset, +unmocking and mock initialization. It uses the existing 30000 ms setup-hook bound; +the 15000 ms request/test bound, application construction, policy assertions and +mutation/wakeup checks are unchanged. All 36 treatment controls pass. Temporary +phase instrumentation was removed. Evidence: +`/private/tmp/claude-pause-route-phases.txt`, +`/private/tmp/claude-pause-route-targeted-phases.log`, and +`/private/tmp/claude-pause-route-hook-controls.log`. Exact-head cloud verification +is still required; no timeout is waived and no provider or native build was run. diff --git a/server/src/__tests__/issue-update-comment-wakeup-routes.test.ts b/server/src/__tests__/issue-update-comment-wakeup-routes.test.ts index 217b07f0692..5bf63139673 100644 --- a/server/src/__tests__/issue-update-comment-wakeup-routes.test.ts +++ b/server/src/__tests__/issue-update-comment-wakeup-routes.test.ts @@ -205,12 +205,17 @@ function registerModuleMocks() { })); } -async function createApp(transaction: (callback: (tx: Record) => Promise) => Promise = - async (callback) => callback({})) { - const [{ errorHandler }, { issueRoutes }] = await Promise.all([ +function loadRouteFixture() { + return Promise.all([ vi.importActual("../middleware/index.js"), vi.importActual("../routes/issues.js"), ]); +} +let routeFixture: Awaited>; + +async function createApp(transaction: (callback: (tx: Record) => Promise) => Promise = + async (callback) => callback({})) { + const [{ errorHandler }, { issueRoutes }] = routeFixture; const app = express(); app.use(express.json()); app.use((req, _res, next) => { @@ -253,7 +258,7 @@ function makeIssue(overrides: Record = {}) { } describe("issue update comment wakeups", () => { - beforeEach(() => { + beforeEach(async () => { vi.resetModules(); vi.doUnmock("../routes/issues.js"); vi.doUnmock("../routes/authz.js"); @@ -271,6 +276,9 @@ describe("issue update comment wakeups", () => { mockIssueService.getWakeableParentAfterChildCompletion.mockResolvedValue(null); mockIssueService.getCurrentScheduledRetry.mockResolvedValue(null); mockIssueService.listReviewAttention.mockResolvedValue(new Map()); + // A fresh route graph is fixture preparation, not request execution. Keep + // per-case module resets while charging the cold transform to hookTimeout. + routeFixture = await loadRouteFixture(); }); it.each(["post", "patch"] as const)("rejects %s board messages under an inherited pause before any mutation", async (method) => {