OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security
TypeScript ai-securityapplication-securityclicode-scanningcodexcodex-securitycybersecuritydevsecopsnodejsnpmopenaisdksecuritytypescriptvulnerability-scanning
ci: group consecutive pushes waiting for native builds (#2020)
Michael D'Angelo83111fb03ef1
diff --git a/.github/actions/native-cache-key/key.sh b/.github/actions/native-cache-key/key.shindex 70e7b87e4..ee19cc304 100644--- a/.github/actions/native-cache-key/key.sh+++ b/.github/actions/native-cache-key/key.sh@@ -33,9 +33,9 @@ if [[ ${1-} == cold-group ]]; thenprintf 'week=%s\n' "$week"# The listing is only a scheduling hint. prepare always restores or builds.hit="$(timeout 5s gh cache list --ref refs/heads/main --key "$key" --limit 1 --json key --jq '.[0].key // empty')"- # Three lanes per 300 workflow numbers keep each group within GitHub's 100-pending limit.+ # Keep adjacent misses together, with at most 15 other runs in the group.if [[ "$hit" != "$key" ]]; then- printf 'cold-group=%s-%s-%s\n' "$key" "$((GITHUB_RUN_NUMBER / 300))" "$((GITHUB_RUN_NUMBER % 3))"+ printf 'cold-group=%s-%s\n' "$key" "$(((GITHUB_RUN_NUMBER - 1) / 16))"fielseprintf 'key=%s\n' "$key"diff --git a/docs/ci.md b/docs/ci.mdindex c213def12..3cf860472 100644--- a/docs/ci.md+++ b/docs/ci.md@@ -124,11 +124,10 @@ execution time, prerequisite waits, runner scheduling, approval waits, andmanual retry delays. Compare matching revisions and test configurations, andrecord failures as well as successful runs.-Protected `main` pushes that miss the same native cache use three queues per-300 workflow numbers, keeping each queue within GitHub’s capacity. Each run looks-up the verified payload again; a miss still builds and proves all eight-platforms. The cache listing only selects a queue. Hits, unavailable listings,-different inputs, and PR checks can start independently.+Protected `main` pushes that miss the same native cache share a queue per block+of 16 consecutive workflow numbers. Each run waits behind at most 15 others,+then restores the verified payload or builds and proves all eight platforms.+Hits, unavailable listings, different inputs, and PR checks can start independently.When a batch can wait, look for the first protected cache save before landingmore changes with the same inputs: `gh cache list --ref refs/heads/main --key KEY`.diff --git a/sdk/typescript/tests-ts/native-artifact-cache.test.ts b/sdk/typescript/tests-ts/native-artifact-cache.test.tsindex b4b686154..4a856ec2b 100644--- a/sdk/typescript/tests-ts/native-artifact-cache.test.ts+++ b/sdk/typescript/tests-ts/native-artifact-cache.test.ts@@ -145,13 +145,12 @@ test("native reuse hashes committed inputs with Git alone across platforms", ()const nextWeek = previous.slice("key=".length).replace("2026-43", "2026-44");- const cold = key("2026-44", 4, fingerprint);- expect(cold).toBe(`week=202644\ncold-group=${nextWeek}-0-1`);+ const cold = key("2026-44", 15, fingerprint);+ expect(cold).toBe(`week=202644\ncold-group=${nextWeek}-0`);+ expect(key("2026-44", 16, fingerprint)).toBe(cold);const admittedWeek = cold.split("\n")[0]!.slice("week=".length);expect(key("2026-45", undefined, "", admittedWeek)).toBe(`key=${nextWeek}`);- expect(key("2026-44", 304, fingerprint)).toBe(- `week=202644\ncold-group=${nextWeek}-1-1`,- );+ expect(key("2026-44", 17, fingerprint)).not.toBe(cold);} finally {rmSync(root, { recursive: true, force: true });}