add gstack 2 parity and lifecycle gates

This commit is contained in:
Sinabina
2026-07-17 11:08:32 -07:00
parent b6572ebbb7
commit 9919c4cdd3
212 changed files with 29098 additions and 3845 deletions
+8 -5
View File
@@ -28,7 +28,7 @@ type Handler = (req: Request) => Response | Promise<Response>;
interface MockServer {
url: string;
close: () => void;
close: () => Promise<void>;
requests: Array<{ method: string; path: string; body?: string }>;
}
@@ -52,10 +52,13 @@ function startMock(routes: Record<string, Handler>): MockServer {
return handler(req);
},
});
const base = `http://localhost:${server.port}`;
// Pin IPv4 so curl cannot intermittently choose ::1 while Bun.serve is
// listening on an IPv4 socket. That mismatch turns a six-second retry test
// into three 30-second network timeouts.
const base = `http://127.0.0.1:${server.port}`;
return {
url: base,
close: () => server.stop(true),
close: async () => { await server.stop(true); },
requests,
};
}
@@ -89,8 +92,8 @@ function jsonResp(body: any, status = 200): Response {
let mock: MockServer;
afterEach(() => {
if (mock) mock.close();
afterEach(async () => {
if (mock) await mock.close();
});
describe('list-orgs', () => {