-
Notifications
You must be signed in to change notification settings - Fork 750
fix(release): unify component versions at 0.2.0 #752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mldangelo-oai
wants to merge
6
commits into
main
Choose a base branch
from
mdangelo/codex/unify-versions-0.2.0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a57ce93
fix(release): unify component versions at 0.2.0
mldangelo-oai 907037f
test(release): include version checks in the prepack contract
mldangelo-oai d9aaac4
chore(evals): align Codex SDK with shipping runtime
mldangelo-oai 4d40720
Merge remote-tracking branch 'origin/main' into mdangelo/codex/unify-…
mldangelo-oai 3208788
Revert "chore(evals): align Codex SDK with shipping runtime"
mldangelo-oai 727375e
Merge commit 'f714a6582ec0b7fe32fc06894a3eb9cdd768b48f' into mdangelo…
mldangelo-oai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,43 +1,30 @@ | ||
| <!-- release-version: 0.1.24 --> | ||
| <!-- release-version: 0.2.0 --> | ||
|
|
||
| ## Highlights | ||
|
|
||
| - Start the preview findings service directly with | ||
| `codex-security serve [--port PORT]`, without Docker or an internal package | ||
| path. The command reuses the existing service, state, and shutdown behavior; | ||
| `--port` overrides `PORT`, and port `0` selects a free port. See | ||
| [running without Docker](https://github.com/openai/codex-security/blob/npm-v0.1.24/sdk/typescript/README.md#running-without-docker). | ||
| - Observe durable Deep Scan progress from the SDK with the optional | ||
| `onDeepProgress({ completed, active, maximum })` callback. Updates report | ||
| changed completed and active independent-review counts without blocking the | ||
| scan. See | ||
| [SDK scan options](https://github.com/openai/codex-security/blob/npm-v0.1.24/sdk/typescript/README.md#sdk-configuration-and-scan-options). | ||
| - Make stopped-result handling explicit and stable. Read, list, and export | ||
| operations no longer publish late retained results as a side effect; the app | ||
| reports when recovery is needed and can recover validated results on request. | ||
| See | ||
| [stopped result recovery](https://github.com/openai/codex-security/blob/npm-v0.1.24/plugins/codex-security/references/scan-contract.md#stopped-result-recovery). | ||
| - Include changed PowerShell `.ps1` files in diff-scan inventories and remove a | ||
| conflicting reporting rule so valid internal attack paths remain eligible for | ||
| review. Nested Deep Scan workers now also receive an explicitly configured | ||
| OpenAI provider credential through the plugin's existing environment boundary. | ||
| - Improve Windows reliability by preserving case-insensitive `CODEX_HOME` | ||
| entries and repository paths from ordinary PowerShell activity, and by | ||
| retrying credential snapshots when a descendant file disappears during ACL | ||
| inspection. Existing path-safety and permission failures remain fatal. | ||
| - Use one Codex Security release version across the CLI, TypeScript SDK, | ||
| bundled plugin, and MCP server. Every product release now advances the plugin | ||
| version so cached plugin installations recognize the upgrade. The findings | ||
| service and dashboards continue to ship in the same package and image. | ||
| - Require container releases to use the same source commit as the matching npm | ||
| release tag. An identical package version on a later commit no longer counts | ||
| as the same release. | ||
| - Recognize BOM-marked UTF-16 source files and PowerShell module and data files | ||
| in scan inventories. | ||
| - Improve Windows handling of long Codex executable paths, case-only renames, | ||
| and dedupe environment settings. | ||
|
|
||
| ## Upgrade notes | ||
|
|
||
| - The findings API and dashboard still have no built-in authentication. | ||
| `codex-security serve` binds to loopback by default; keep it local or place it | ||
| behind an authenticated TLS proxy before sharing access. Python is still | ||
| required, and nonempty imports still require an embeddings API credential. | ||
| - Stopped-scan recovery is now explicit. App clients should check | ||
| `resultsRecoveryNeeded` and request recovery when they want validated late | ||
| results republished. Canceled scans remain immutable and cannot use this | ||
| recovery path. | ||
| - `onDeepProgress.maximum` is the configured independent-review cap, not a | ||
| percentage denominator. The SDK polls the durable projection only when the | ||
| callback is supplied. | ||
| - SDK consumers using a range such as `^0.1.24` must explicitly update to | ||
| `^0.2.0`. Existing CLI commands and public SDK version fields remain available. | ||
| - Version alignment does not change artifact schemas or database migration | ||
| versions. Saved scans keep their original producer versions, and custom | ||
| plugins continue to report their own versions. Codex runtime dependencies and | ||
| external plugin catalogs retain their independent versions. | ||
| - Publish a container from `container-v0.2.0` at the same commit as | ||
| `npm-v0.2.0`. Manual publication from `main` works only while `main` points to | ||
| that release commit. See | ||
| [container publishing](https://github.com/openai/codex-security/blob/npm-v0.2.0/docker/README.md#publishing). | ||
|
|
||
| The categorized list below contains the individual changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #!/bin/sh | ||
|
|
||
| set -eu | ||
|
|
||
| if [ "$#" -ne 2 ]; then | ||
| printf '%s\n' 'Usage: verify-container-release-source.sh VERSION COMMIT' >&2 | ||
| exit 2 | ||
| fi | ||
|
|
||
| version=$1 | ||
| expected_commit=$2 | ||
| release_tag="npm-v$version" | ||
|
|
||
| if ! release_commit="$(git rev-parse --verify "refs/tags/$release_tag^{commit}")"; then | ||
| printf '%s\n' "::error::Create the npm release $release_tag before publishing its container." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ "$release_commit" != "$expected_commit" ]; then | ||
| printf '%s\n' "::error::Container version $version must use the same commit as $release_tag. Create container-v$version at that release commit if main has advanced." >&2 | ||
| exit 1 | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| import { readFile, writeFile } from "node:fs/promises"; | ||
| import { join, resolve } from "node:path"; | ||
| import { fileURLToPath, pathToFileURL } from "node:url"; | ||
| import { releaseVersion } from "./release-automation.mjs"; | ||
|
|
||
| const repositoryRoot = fileURLToPath(new URL("../../../", import.meta.url)); | ||
| const componentManifests = [ | ||
| "plugins/codex-security/.codex-plugin/plugin.json", | ||
| "plugins/codex-security/mcp-app/package.json", | ||
| "plugins/codex-security/pyproject.toml", | ||
| ]; | ||
|
|
||
| export async function syncVersions({ | ||
| root = repositoryRoot, | ||
| check = false, | ||
| } = {}) { | ||
| const version = releaseVersion( | ||
| JSON.parse( | ||
| await readFile(join(root, "sdk/typescript/package.json"), "utf8"), | ||
| ), | ||
| ); | ||
| const updates = await Promise.all( | ||
| componentManifests.map(async (path) => { | ||
| const contents = await readFile(join(root, path), "utf8"); | ||
| const field = path.endsWith(".json") | ||
| ? /^([ \t]*"version"[ \t]*:[ \t]*")[^"]+("[ \t]*,?)/mu | ||
| : /^(version[ \t]*=[ \t]*")[^"]+(")/mu; | ||
| if (!field.test(contents)) { | ||
| throw new Error(`${path} must declare its component version.`); | ||
| } | ||
| return { | ||
| path, | ||
| contents, | ||
| updated: contents.replace( | ||
| field, | ||
| (_match, prefix, suffix) => `${prefix}${version}${suffix}`, | ||
| ), | ||
| }; | ||
| }), | ||
| ); | ||
| const changed = updates.filter( | ||
| ({ contents, updated }) => contents !== updated, | ||
| ); | ||
| if (check && changed.length > 0) { | ||
| throw new Error( | ||
| `Component versions must match ${version}:\n${changed.map(({ path }) => path).join("\n")}\nRun pnpm --dir sdk/typescript run sync:versions.`, | ||
| ); | ||
| } | ||
| if (!check) { | ||
| for (const { path, updated } of changed) { | ||
| await writeFile(join(root, path), updated); | ||
| } | ||
| } | ||
| return { version, changed: changed.map(({ path }) => path) }; | ||
| } | ||
|
|
||
| const invokedPath = process.argv[1]; | ||
| if ( | ||
| invokedPath !== undefined && | ||
| pathToFileURL(resolve(invokedPath)).href === import.meta.url | ||
| ) { | ||
| try { | ||
| const args = process.argv.slice(2); | ||
| if (args.length > 1 || (args.length === 1 && args[0] !== "--check")) { | ||
| throw new Error("Usage: node scripts/sync-versions.mjs [--check]"); | ||
| } | ||
| const check = args[0] === "--check"; | ||
| const { version, changed } = await syncVersions({ check }); | ||
| console.log( | ||
| check | ||
| ? `Verified component versions match ${version}.` | ||
| : `Synchronized ${changed.length} component manifests to ${version}.`, | ||
| ); | ||
| } catch (error) { | ||
| console.error(error instanceof Error ? error.message : error); | ||
| process.exitCode = 1; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.