Repository navigation
Agent: bundle the python tool's CPython in macOS apps - #1412
Draft
AnthonyRonning wants to merge 1 commit into
Draft
AnthonyRonning wants to merge 1 commit into
AnthonyRonning wants to merge 1 commit into
Conversation
Release packaging prepares the hash-pinned runtime and copies it into Contents/Resources/python, signs every Mach-O in it with the app's identity before sealing the app, and gives the interpreter alone the reviewed entitlements in app/packaging/macos-python-entitlements.plist. Library validation is off for the interpreter so the native extensions of wheels the tool installs can load. Release verification requires the runtime, checks the interpreter's signature flags and entitlements, and imports its native standard-library modules when it may run artifact code. `just debug-app` bundles the runtime the same way with ad hoc signatures and runs the worker smoke from inside the bundle (#897's debug-app change). The runtime pin and preparation script count as packaging inputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AnthonyRonning
force-pushed
the
agent/python-packaging-macos
branch
from
November 2, 2026 01:20
8d9e925 to
5a57949
Compare
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Third layer of the CodeMode catch-up stack, on PR #1410 (the
pythontool). macOS apps now carry the CPython runtime the tool runs, so packaged builds offerpythonthe wayjust runalready does.What changed
scripts/macos-release-app.sh):scripts/python-runtime.json(Python Build Standalone 20260929, CPython 3.14.7) and copies it intoContents/Resources/python. The app's package resolver already looks there.macos_codesign, which retries Apple timestamp failures.app/packaging/macos-python-entitlements.plist). Unsigned PR previews stay ad hoc without hardened runtime, like the app.com.apple.security.cs.disable-library-validation. Hardened runtime would otherwise refuse native extensions of wheels the tool installs (numpy, lxml, …), whose code is signed by someone else or not at all. The app's own entitlements are unchanged. Sandboxing is out of scope for the tool, and the model already runs arbitrary programs through the shell, so this adds no capability the model lacks.just debug-appbundles the runtime with ad hoc signatures and runs the worker smoke from inside the bundle. This is Port bundled CPython and ordered CodeMode into Maple Agent #897'smacos-debug-app.shchange, applied unchanged apart from the version.lanes.py.Rebased onto master's simplified release tooling. The verification-script and packaging-test additions an earlier revision carried went away with those files.
Size
The runtime adds 59 MB uncompressed to the app, once the next layer prunes Tcl/Tk and IDLE; it was 69 MB with them.
Validation
just debug-appon macOS arm64: every runtime Mach-O signed; the bundle is "valid on disk" and "satisfies its Designated Requirement"; "CPython 3.14.7 (pbs-20260929-aarch64-apple-darwin) at …/Maple Agent Debug.app/Contents/Resources/python/bin/python3.14: native worker smoke passed".ci:packagerehearsals passed on every platform: macOS, Linux, and Windows x64 and arm64. The Windows x64 run needed one rerun after an installer-check timeout. The label re-runs them on the rebased branch.agent-desktop-build.ymlon master.Linux and Windows packaging follow in the next layers.
🤖 Generated with Claude Code