Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

fix(ci): budget both package smoke phases (#834)

mldangelo-oai032eb569aa8b
diff --git a/sdk/typescript/scripts/package-smoke-timeouts.mjs b/sdk/typescript/scripts/package-smoke-timeouts.mjs
index 148d38a46..019d582a1 100644
--- a/sdk/typescript/scripts/package-smoke-timeouts.mjs
+++ b/sdk/typescript/scripts/package-smoke-timeouts.mjs
@@ -3,6 +3,7 @@ export function packageSmokeTimeouts(platform = process.platform) {
return {
commandTimeoutMs,
- processTimeoutMs: commandTimeoutMs + 30_000,
+ // Installation and verification run sequentially; allow both plus cleanup.
+ processTimeoutMs: commandTimeoutMs * 2 + 30_000,
};
}
diff --git a/sdk/typescript/tests-ts/package-smoke-timeouts.test.ts b/sdk/typescript/tests-ts/package-smoke-timeouts.test.ts
index 631b77735..67bdd9df4 100644
--- a/sdk/typescript/tests-ts/package-smoke-timeouts.test.ts
+++ b/sdk/typescript/tests-ts/package-smoke-timeouts.test.ts
@@ -12,30 +12,26 @@ const { packageSmokeTimeouts } = (await import(
)) as PackageSmokeTimeouts;
describe("npm package smoke timeouts", () => {
- test("preserves the existing timeout on Linux and macOS", () => {
+ test("preserves the command timeout on Linux and macOS", () => {
for (const platform of ["linux", "darwin"] as const) {
- expect(packageSmokeTimeouts(platform)).toEqual({
- commandTimeoutMs: 120_000,
- processTimeoutMs: 150_000,
- });
+ expect(packageSmokeTimeouts(platform).commandTimeoutMs).toBe(120_000);
}
});
test("allows the Windows npm install to complete", () => {
- expect(packageSmokeTimeouts("win32")).toEqual({
- commandTimeoutMs: 180_000,
- processTimeoutMs: 210_000,
- });
+ expect(packageSmokeTimeouts("win32").commandTimeoutMs).toBe(180_000);
});
- test("keeps the parent smoke timeout above the command timeout", () => {
- for (const platform of ["linux", "darwin", "win32"] as const) {
+ test.each(["linux", "darwin", "win32"] as const)(
+ "allows installation and verification to each use a command budget on %s",
+ (platform) => {
const { commandTimeoutMs, processTimeoutMs } =
packageSmokeTimeouts(platform);
- expect(processTimeoutMs).toBe(commandTimeoutMs + 30_000);
- }
- });
+ const remainingAfterInstallation = processTimeoutMs - commandTimeoutMs;
+ expect(remainingAfterInstallation).toBeGreaterThan(commandTimeoutMs);
+ },
+ );
test("uses the active runtime platform by default", () => {
expect(packageSmokeTimeouts()).toEqual(