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

ci: keep source checks for TypeScript changes with SDK guides (#2019)

Michael D'Angelo37ebb8472805
diff --git a/.github/scripts/select-ci-checks.mjs b/.github/scripts/select-ci-checks.mjs
index c990df89f..35c3dd3c9 100644
--- a/.github/scripts/select-ci-checks.mjs
+++ b/.github/scripts/select-ci-checks.mjs
@@ -24,28 +24,21 @@ const packagedDocs = new Set(
.filter((file) => file.endsWith(".md"))
.map((file) => `sdk/typescript/${file}`),
);
+const isDocumentation = (path) =>
+ documentation.test(path) || packagedDocs.has(path);
function scopeFor(paths, { event, baseChanged, modifiedOnly }) {
if (event !== "pull_request" || baseChanged || !paths.length) return "full";
if (modifiedOnly && paths.every((path) => pythonTest.test(path)))
return "python-tests";
- if (
- paths.every(
- (path) =>
- documentation.test(path) ||
- path === "RELEASING.md" ||
- packagedDocs.has(path),
- )
- ) {
+ if (paths.every((path) => isDocumentation(path) || path === "RELEASING.md")) {
// The Action profile already builds the package and installs it on Node 24.
// Select the separate Action job from its own inputs below.
return paths.some((path) => packagedDocs.has(path)) ? "action" : "docs";
}
if (paths.every((path) => actionFiles.test(path))) return "action";
if (paths.every((path) => evalFiles.test(path))) return "evals";
- if (
- paths.every((path) => ordinarySource.test(path) || documentation.test(path))
- )
+ if (paths.every((path) => ordinarySource.test(path) || isDocumentation(path)))
return "source";
return "full";
}
diff --git a/.github/scripts/test-ci-selection.mjs b/.github/scripts/test-ci-selection.mjs
index 4c9169e9b..c7f903dce 100644
--- a/.github/scripts/test-ci-selection.mjs
+++ b/.github/scripts/test-ci-selection.mjs
@@ -312,7 +312,9 @@ test("ordinary TypeScript source and tests retain the reduced version matrices",
"plugins/codex-security/mcp-app/tests/support/fixture.ts",
]) {
assert.deepEqual(select([path]), regularSource, path);
- assert.deepEqual(select(["README.md", path]), regularSource, path);
+ for (const guide of ["README.md", "sdk/typescript/docs/cli.md"]) {
+ assert.deepEqual(select([guide, path]), regularSource, path);
+ }
}
});
@@ -358,7 +360,7 @@ test("unknown paths and dependency configuration receive full qualification", ()
["sdk/typescript/.npmrc"],
["sdk/typescript/docs/unlisted.md"],
["RELEASING.md", "sdk/typescript/src/api.ts"],
- ["sdk/typescript/docs/cli.md", "sdk/typescript/src/api.ts"],
+ ["sdk/typescript/docs/cli.md", "sdk/typescript/docs/unlisted.md"],
["plugins/codex-security/mcp-app/src/.npmrc"],
["pnpm-workspace.yaml"],
["sdk/typescript/pnpm-workspace.yaml"],
diff --git a/docs/ci.md b/docs/ci.md
index 3cf860472..99e547dc5 100644
--- a/docs/ci.md
+++ b/docs/ci.md
@@ -12,7 +12,7 @@ ordinary docs or `RELEASING.md`, require the native payload, the real package
build and archive inspection, and one Ubuntu Node 24 installation. Removing or
renaming a required guide must still pass archive inspection. The static job
validates the canonical recovery example in `RELEASING.md` on docs-only PRs too.
-Mixing either kind of guide with product source selects full qualification.
+Mixing the release guide with product source selects full qualification.
Product source changes run the complete SDK suite on Linux, macOS, and Windows,
plus MCP, standalone-plugin, native-runtime, and installed-package checks. Tests
@@ -32,7 +32,7 @@ slow-file estimates in `run-mcp-test-shard.mts` when the jobs drift apart.
Pull requests limited to `.ts` files under `sdk/typescript/src/`,
`sdk/typescript/tests-ts/`, `plugins/codex-security/mcp-app/src/`, and
-`plugins/codex-security/mcp-app/tests/`, optionally mixed with ordinary docs,
+`plugins/codex-security/mcp-app/tests/`, plus any ordinary docs or packaged SDK guides,
use reduced version matrices. They test the minimum Node 22, 24, and 26 versions,
current Node 24 for the Action adapter, macOS installation, and Windows Node 22
installation. When selected, Python runs the full suite on 3.12 and the native