Skip to content

Commit 1262ce3

Browse files
test(e2e): raise todo-synthesis prompt-roundtrip waits to CI budget
The three 10s waitFor budgets each wrap a full opencode-serve prompt round-trip (~1s locally, 7-12s on loaded CI runners). First gated CI run after restoring host-e2e gating timed out at exactly 10s on two of them. 60s matches the suite-wide budget for prompt-wrapping waits. Co-authored-by: Alfonso [Magic Context] <288211368+alfonso-magic-context@users.noreply.github.com>
1 parent e3fc4e5 commit 1262ce3

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

packages/e2e-tests/tests/todo-synthesis.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ function updateTodoMeta(sessionId: string, sql: string): void {
148148

149149
async function waitForLastTodoState(sessionId: string, stateJson: string): Promise<void> {
150150
await h.waitFor(() => readTodoMeta(sessionId)?.last_todo_state === stateJson, {
151-
timeoutMs: 10_000,
151+
// Wraps a full opencode-serve prompt round-trip: ~1s locally, 7-12s on
152+
// loaded CI runners — budget must absorb runner latency, not gate it.
153+
timeoutMs: 60_000,
152154
label: "last_todo_state captured",
153155
});
154156
}
@@ -162,7 +164,8 @@ async function waitForHighPressure(sessionId: string): Promise<void> {
162164
.get(sessionId) as { last_context_percentage: number } | null;
163165
return (row?.last_context_percentage ?? 0) >= 65;
164166
},
165-
{ timeoutMs: 10_000, label: "session crosses execute threshold" },
167+
// Same prompt-round-trip dependency as above: 60s for CI runner latency.
168+
{ timeoutMs: 60_000, label: "session crosses execute threshold" },
166169
);
167170
}
168171

@@ -353,7 +356,8 @@ describe("synthetic todowrite e2e", () => {
353356
const parentId = await h.createSession();
354357
const childId = await h.createChildSession(parentId, "todo-synthesis-child");
355358
await h.waitFor(() => h.isSubagent(childId) === true, {
356-
timeoutMs: 10_000,
359+
// Same CI-runner-latency class as the waits above.
360+
timeoutMs: 60_000,
357361
label: "child is_subagent=true",
358362
});
359363

0 commit comments

Comments
 (0)