Skip to content

bundle sandbox helper binaries in main zip, for winget.#9707

Merged
iceweasel-oai merged 1 commit intomainfrom
dev/iceweasel/winget-include-binaries
Jan 23, 2026
Merged

bundle sandbox helper binaries in main zip, for winget.#9707
iceweasel-oai merged 1 commit intomainfrom
dev/iceweasel/winget-include-binaries

Conversation

@iceweasel-oai
Copy link
Collaborator

Winget uses the main codex.exe value as its target.
The elevated sandbox requires these two binaries to live next to codex.exe

Comment on lines +291 to +292
# Fall back to the single-binary zip if the helpers are missing
# to avoid breaking releases.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't follow: are we talking about what happens on our CI builder machine? Shouldn't that be deterministic? I'm confused what "Fall back" situation we are designing for here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is me not wanting to break the release, and if it fails to find the binaries (like I'm constructing the filepaths wrong) falling back to what currently happens (each binary in its own zip file)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I plan to remove this once I'm sure this is working.

fi
rm -rf "$bundle_dir"
else
(cd "$dest" && 7z a "${base}.zip" "$base")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this step should just be run for "codex-windows-sandbox-setup-${{ matrix.target }}.exe", is that right?

If so, maybe we should make an elif for that right here and then a final else that raises an exception that $base does not match one of the expected patterns.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the bundling part of it should happen in the loop for "codex-${{ matrix.target }}.exe"
all other binaries should be as they are today, just the binary by itself in a zip file

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it is both of these:

codex-windows-sandbox-setup-${{ matrix.target }}.exe
codex-windows-command-runner-${{ matrix.target }}.exe

Does each of these need to be in its own .zip? Do we encourage users to download these individually?

It feels like we should favor the big codex.zip now that it will include everything?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, both of those are being included in codex.zip with this change. That is what winget will use

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing build script for the npm package appears to rely on a .zst being available for both codex-windows-sandbox-setup and codex-command-runner:

def _archive_name_for_target(artifact_prefix: str, target: str) -> str:
if "windows" in target:
return f"{artifact_prefix}-{target}.exe.zst"
return f"{artifact_prefix}-{target}.zst"

so I guess we still need to publish both of these until we update that script.

Comment on lines +302 to +304
echo "warning: missing sandbox binaries; falling back to single-binary zip"
echo "warning: expected $runner_src and $setup_src"
(cd "$dest" && 7z a "${base}.zip" "$base")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why shouldn't this break the release build? Hasn't something gone horribly wrong if this is true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mostly don't want to break the build while I am testing/iterating on this. Like making sure I don't have a typo or something. Once it's working, I would revert any fallbacks and then the build would break if something was missing

Copy link
Collaborator

@bolinfest bolinfest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can land this as-is for now, but as a follow-up, I would like to see dependent build scripts rely on only these artifacts (or the .zip or .tar.gz versions) for Windows:

codex-x86_64-pc-windows-msvc.exe.zst
codex-aarch64-pc-windows-msvc.exe.zst

and then extract codex-windows-sandbox-setup and codex-command-runner from within the archive, as necessary.

We should then stop publishing all of the individual codex-windows-sandbox-setup and codex-command-runner entries from our GitHub release to make things easier to reason about.

@iceweasel-oai iceweasel-oai merged commit d923240 into main Jan 23, 2026
32 checks passed
@iceweasel-oai iceweasel-oai deleted the dev/iceweasel/winget-include-binaries branch January 23, 2026 22:36
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants