Skip to content

feat: support independently packaged isolated Python runtimes (4/5) - #4464

Draft
TomCC7 wants to merge 4 commits into
cc/fix/package-module-collisionsfrom
cc/feat/packaged-isolated-python
Draft

TomCC7 wants to merge 4 commits into
cc/fix/package-module-collisionsfrom
cc/feat/packaged-isolated-python

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 7, 2026

Copy link
Copy Markdown
Member

Depends on #4463. Layer 4 of 5; base is the preceding stack branch.

An installed IsolatedPythonModule contract can now select package_project = PackageProject(package, path, distribution). Preparation snapshots the packaged project to a content-addressed cache, lets uv resolve its declared dependencies, and checks matching DimOS/shared contract versions, Python source and wheel payload fingerprints before startup. It no longer overlays an unrelated shared checkout for this mode. Repository-relative projects retain their existing behavior.

The cache identity covers runtime inputs, contracts, interpreter and platform. Preparation is locked, immutable project publication is atomic, locked projects use frozen resolution, and launch reuses the prepared environment. Host Python import paths are removed. The Python example exports both ordinary and isolated typed-message consumers, with packaging 25.0 pinned only in the child.

Validation: 34 focused package/module/bootstrap tests and strict mypy passed; applicable hooks passed. Real installed-wheel acceptance outside the checkout ran Rust + C++ + ordinary Python + isolated Python together, with host packaging 26.3 and child 25.0, and graceful process cleanup. Repeatable whole-stack acceptance and release/cleanup instructions follow in layer 5.

This is dependency separation, not a security sandbox. Release projects should ship a lock against their configured artifacts. The example remains an unlocked development project. No new RPC protocol or external bake registry discovery.

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

go2 replay realtime (arm64)

Details
Benchmark suite Current: 8234780 Previous: 8b17f2f Ratio
peak memory 1597.336 MB 1582.812 MB 1.01
peak threads 360 threads 360 threads 1
network (transport) 2724.709 MB 2721.697 MB 1.00
disk write 1.484 MB 1.617 MB 0.92
instructions 115.647 G 115.471 G 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.98113% with 17 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/experimental/isolated_python/package.py 85.71% 7 Missing and 7 partials ⚠️
dimos/experimental/isolated_python/module.py 93.93% 1 Missing and 1 partial ⚠️
dimos/experimental/isolated_python/bootstrap.py 50.00% 1 Missing ⚠️
@@                         Coverage Diff                          @@
##           cc/fix/package-module-collisions    #4464      +/-   ##
====================================================================
+ Coverage                             80.48%   80.49%   +0.01%     
====================================================================
  Files                                  1657     1659       +2     
  Lines                                155620   155830     +210     
  Branches                              13162    13185      +23     
====================================================================
+ Hits                                 125253   125443     +190     
- Misses                                26790    26800      +10     
- Partials                               3577     3587      +10     
Components Coverage Δ
Tests 95.19% <100.00%> (+<0.01%) ⬆️
Flag Coverage Δ
OS-macos-latest 74.83% <91.98%> (+<0.01%) ⬆️
OS-ubuntu-24.04-arm 74.56% <91.98%> (+0.02%) ⬆️
OS-ubuntu-latest 74.97% <91.98%> (+0.02%) ⬆️
Py-3.10 74.71% <91.98%> (-0.24%) ⬇️
Py-3.11 74.95% <91.98%> (+0.02%) ⬆️
Py-3.12 74.96% <91.98%> (+0.02%) ⬆️
SelfHosted-Large 32.14% <27.83%> (-0.01%) ⬇️
SelfHosted-Linux 39.87% <27.83%> (-0.02%) ⬇️
SelfHosted-macOS 40.16% <27.83%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/experimental/isolated_python/test_package.py 100.00% <100.00%> (ø)
dimos/experimental/isolated_python/bootstrap.py 48.71% <50.00%> (+0.03%) ⬆️
dimos/experimental/isolated_python/module.py 85.71% <93.93%> (+1.30%) ⬆️
dimos/experimental/isolated_python/package.py 85.71% <85.71%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TomCC7
TomCC7 force-pushed the cc/feat/packaged-isolated-python branch from d19150f to e125047 Compare October 10, 2026 07:20

This branch was successfully deployed

1 active (outdated) deployment
cachix — 1f33d02a Deployed Oct 9, 2026 by TomCC7 via cachix-build-macos #12342
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant