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(release): allow more time for npm package availability (#2532)

Michael D'Angelo41c53a297a74
diff --git a/.github/workflows/node-github-release.yml b/.github/workflows/node-github-release.yml
index 80b6c75de..d50412d80 100644
--- a/.github/workflows/node-github-release.yml
+++ b/.github/workflows/node-github-release.yml
@@ -175,8 +175,8 @@ jobs:
run: |
set -euo pipefail
- # npm can finish publishing before its registry makes the version available.
- for attempt in {1..21}; do
+ # npm scans new versions before making them available to install.
+ for attempt in {1..61}; do
if metadata="$(
npm view "@openai/codex-security@$RELEASE_VERSION" version \
--json --prefer-online --registry=https://registry.npmjs.org/
@@ -191,8 +191,8 @@ jobs:
'; then
exit 1
fi
- if (( attempt == 21 )); then
- echo "The published npm version did not become available within ten minutes." >&2
+ if (( attempt == 61 )); then
+ echo "The published npm version did not become available within thirty minutes." >&2
exit 1
fi
echo "Waiting for npm publication to become available." >&2
diff --git a/RELEASING.md b/RELEASING.md
index c76d4c25b..6337b528f 100644
--- a/RELEASING.md
+++ b/RELEASING.md
@@ -359,10 +359,11 @@ Historical releases whose source predates `action.yml` skip Action publication
and still run the exact-version installation checks. The workflow does not add
Action code from a later commit to an older CLI release.
-After npm accepts a publication, its registry can take several minutes to expose
-the version. GitHub publication waits up to ten minutes for that version to
-become available before verifying its archive and signed provenance. Other
-registry errors fail immediately.
+After npm accepts a release, its publish-time scan can delay installation.
+GitHub publication retries a missing version every 30 seconds for up to
+30 minutes. Once the version is available, it verifies the archive and signed
+provenance. Other registry errors fail immediately. If the wait expires,
+[retry GitHub publication](#recover-or-repair-a-release) when the version is available.
`node-release` generates the npm plugin payload from the canonical source under
`plugins/codex-security/` during `prepack`. The generated
diff --git a/sdk/typescript/tests-ts/release-automation.test.ts b/sdk/typescript/tests-ts/release-automation.test.ts
index 7fba4f3c9..8124a83a7 100644
--- a/sdk/typescript/tests-ts/release-automation.test.ts
+++ b/sdk/typescript/tests-ts/release-automation.test.ts
@@ -3242,17 +3242,18 @@ ${steps[record]!.run}`;
status: 0,
},
{
- description: "a version becoming visible after npm processing",
- missingAttempts: 4,
- calls: 5,
- waits: 4,
+ description:
+ "a version becoming visible after twenty minutes of npm processing",
+ missingAttempts: 40,
+ calls: 41,
+ waits: 40,
status: 0,
},
{
description: "a version remaining absent past the publication wait",
missingAttempts: 100,
- calls: 21,
- waits: 20,
+ calls: 61,
+ waits: 60,
status: 1,
},
{