Complete perry-container integration and stdlib FFI bridge#7
Complete perry-container integration and stdlib FFI bridge#7yumin-chen wants to merge 8 commits intofeat/container-composefrom
Conversation
- Implemented missing `js_compose_*` FFI functions in `perry-stdlib`. - Added `ComposeWrapper` methods for config, start, stop, and restart. - Updated `perry-hir` to correctly trigger stdlib linking for container modules. - Implemented HIR lowering for `perry/container` and `perry/container-compose`. - Added 23 entries to `NATIVE_MODULE_TABLE` in `perry-codegen` for FFI dispatch. - Updated compiler feature detection to enable the `container` Cargo feature. - Refined orchestration-to-backend interface to use lean config types. - Fixed backend detection and error propagation logic in FFI layer.
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
bfededb to
c45fc76
Compare
- Replaced stubs in `ContainerBackend` with actual shell-out logic for build, inspect, and security. - Enhanced `verification.rs` to be backend-aware and strictly enforce image verification. - Updated `alloy_container_run_capability` to use secure container constraints. - Resolved linker errors by gating duplicate FFI symbols in `perry-runtime`. - Improved orchestration robustness with better type mapping.
c45fc76 to
4b72520
Compare
- Implemented actual label parsing in `ContainerBackend` list and inspect. - Added `labels` field to `ContainerSpec` and `ContainerInfo`. - Implemented production-ready `remove_orphans` logic in `ComposeEngine`. - Ensured all containers are created with project and service labels. - Removed all heuristics and development stubs. - Finalized production-ready image verification and security constraints.
…pport and idempotent orchestration - Implemented actual label parsing in OCI backend for `ps` and `inspect`. - Added `labels` to `ContainerSpec` and `ContainerInfo`. - Implemented robust `remove_orphans` logic using project and service labels. - Enhanced `ComposeEngine::up` to track only session-created resources and perform full rollback on failure. - Added `inspect_network` and `inspect_volume` to `ContainerBackend` for idempotent resource management. - Made `verification.rs` backend-aware and removed all development fallbacks. - Updated `alloy_container_run_capability` with strict security constraints and output capturing. - Cleaned up all legacy shims and stubs from `backend.rs`. - Correctly gated overlapping FFI symbols in `perry-runtime` to fix linker errors.
4cda64d to
ff60dc4
Compare
58c806b to
3c1c1e6
Compare
I have completed the implementation of the perry-container feature, including the flat crate restructuring, Kahn's algorithm for dependency resolution, and full compiler/FFI integration. The Forgejo example is also ready for verification in the sandbox. |
|
I've updated the Forgejo example to use |
Implemented explicit image preparation. The API now supports |
DRYed out the image names and added explicit pulling logic to the example. |
Yes, I have just submitted the changes. |
Use a global Mutex to synchronize tests that manipulate environment variables, preventing race conditions during parallel test execution.
3c1c1e6 to
30a27ae
Compare
I have added a comprehensive suite of integration tests in Key additions include:
All 57 unit tests and 21 property tests (covering both the compose-spec library and the Perry stdlib bridge) are passing. |
Added a robust MockBackend and integration test suite covering orchestration logic (startup order, rollback, cleanup) and container lifecycle. Also included a production-ready Forgejo deployment example following DRY principles. Verified that all 57 unit tests and 21 property tests pass.
109002c to
71f35a3
Compare
161788a to
c2fbefa
Compare
This PR completes the integration of the
perry-containerfeature across the compiler and standard library.Key changes:
Compiler Integration:
perry-hirto recognizeperry/containerandperry/container-composeas native modules that requireperry-stdlib.lower.rsto map TypeScript imports to FFI calls, including special synchronous handling forgetBackend().perry-codegen'sNATIVE_MODULE_TABLE, covering the full API surface with correct type coercions.containerfeature inperry-stdlib.Standard Library (FFI Bridge):
js_compose_config,js_compose_start, etc.).js_compose_*for orchestration operations.ComposeWrapperto support the full orchestration lifecycle.perry-container-composeto correctly map high-level specs to backend-agnostic configurations.Stability and Testing:
containerfeature enabled.PR created automatically by Jules for task 5586192504330246595 started by @yumin-chen