Assert listSessions reflects bootstrap session when startup succeeds

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 06:05:09 +00:00
1 parent c4b7956430
commit f997cc3716
1 file changed
+9
+9
View File
@@ -1675,6 +1675,7 @@ async function main() {
) {
throw new Error("Smoke test failed: app.bootstrap response payload mismatch.");
}
const bootstrapSessionId = bootstrapResponse.result.session.sessionId;
const listedSessionsResponse = await sendWsRequest(ws, {
id: "smoke-providers-list-sessions",
@@ -1688,6 +1689,14 @@ async function main() {
throw new Error("Smoke test failed: providers.listSessions entry missing sessionId.");
}
}
const listedIncludesBootstrap = listedSessionsResponse.result.some(
(session) => session?.sessionId === bootstrapSessionId,
);
if (!bootstrapResponse.result.bootstrapError && !listedIncludesBootstrap) {
throw new Error(
`Smoke test failed: providers.listSessions did not include bootstrap session ${bootstrapSessionId}.`,
);
}
const todoTitle = `Smoke todo ${String(backendPort)}-${String(webPort)}-${Date.now()}`;
const addedTodosResponse = await sendWsRequest(ws, {