Skip to content

Implement perry-container and perry-compose functionality#8

Draft
yumin-chen wants to merge 5 commits intofeat/container-composefrom
perry-container-impl-1428739520203871530
Draft

Implement perry-container and perry-compose functionality#8
yumin-chen wants to merge 5 commits intofeat/container-composefrom
perry-container-impl-1428739520203871530

Conversation

@yumin-chen
Copy link
Copy Markdown

Implemented the perry-container and perry/compose features.

  • Created a new standalone Rust crate perry-container-compose which provides a library and CLI for OCI container orchestration. It implements a deterministic topological sort for service dependencies and supports environment variable interpolation and .env files.
  • Implemented PodmanBackend and DockerBackend that shell out to their respective CLIs for container operations.
  • Added a new container module to perry-stdlib that exposes js_container_* and js_compose_* functions via Perry's FFI bridge.
  • Updated perry-hir and perry-codegen to recognize and link these new built-in modules.
  • Implemented alloy_container_run_capability to provide secure, sandboxed execution for shell capabilities in OCI containers.
  • Added property-based tests using the proptest crate to verify ComposeSpec serialization round-trips and the correctness of the dependency resolution algorithm.
  • Verified the implementation by running unit and property tests.

PR created automatically by Jules for task 1428739520203871530 started by @yumin-chen

yumin-chen and others added 2 commits April 15, 2026 07:01
This commit adds OCI container management and multi-container orchestration
to Perry via two new TypeScript modules: `perry/container` and `perry/compose`.

Key changes:
- New `perry-container-compose` Rust crate: standalone library and CLI
  that ports container-compose from Go to Rust with full features.
- Platform-adaptive backend selection: apple/container on macOS/iOS,
  Podman/Docker on other platforms.
- Native `ComposeEngine` using Kahn's algorithm for deterministic startup.
- Expanded `perry-stdlib` with `container` module and FFI bridge.
- Compiler integration: HIR lowering and codegen dispatch for new modules.
- Security isolation for `shellCapabilities` using ephemeral containers.
- Comprehensive property-based tests for spec serialization and sorting.

Co-authored-by: yumin-chen <10954839+yumin-chen@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@yumin-chen yumin-chen marked this pull request as draft April 16, 2026 00:04
@yumin-chen yumin-chen force-pushed the feat/container-compose branch 7 times, most recently from f94aca9 to 58c806b Compare April 16, 2026 10:48
@Chen-Software Chen-Software deleted a comment from google-labs-jules Bot Apr 16, 2026
- Refactor perry-container-compose to a standalone Rust library and CLI.
- Implement multi-candidate backend probing with 2s timeouts (Colima, Podman, Docker, Apple Container).
- Use Kahn's algorithm for deterministic service orchestration in ComposeEngine.
- Add robust FFI layer in perry-stdlib with safety checks and JSON serialization.
- Implement sandboxed shell capabilities with image verification and strict isolation.
- Add property-based testing for core orchestration and serialization logic.

Co-authored-by: yumin-chen <10954839+yumin-chen@users.noreply.github.com>
@yumin-chen yumin-chen force-pushed the feat/container-compose branch 3 times, most recently from 30a27ae to 52b28fe Compare April 17, 2026 00:37
- Refactor perry-container-compose as a first-class library with Kahn's algorithm
- Implement platform-adaptive OCI backend detection (Apple/Podman/Docker)
- Add perry-stdlib FFI bridge with JSValue marshalling and property access
- Integrate perry/container and perry/compose into HIR and codegen
- Implement OCI isolation for shell capabilities and Sigstore verification
- Add Forgejo orchestration production example and property-based tests

Co-authored-by: yumin-chen <10954839+yumin-chen@users.noreply.github.com>
@yumin-chen yumin-chen force-pushed the feat/container-compose branch 6 times, most recently from 68c5eaf to c74f6d5 Compare April 22, 2026 10:40
- Refactor perry-container-compose into a standalone library and CLI.
- Implement Kahn's algorithm for deterministic service orchestration.
- Add perry-stdlib container module with FFI bridge and OCI isolation.
- Implement Sigstore/cosign image verification for shell capabilities.
- Integrate perry/container and perry/compose into HIR and codegen.
- Add property-based tests for ComposeSpec and orchestration logic.

Co-authored-by: yumin-chen <10954839+yumin-chen@users.noreply.github.com>
@yumin-chen yumin-chen force-pushed the feat/container-compose branch 6 times, most recently from bc32dd6 to 852ad6b Compare April 22, 2026 17:48
@yumin-chen yumin-chen force-pushed the feat/container-compose branch 30 times, most recently from cad71a7 to 448cb36 Compare April 27, 2026 12:00
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