Conversation
Greptile SummaryThis PR hardens Apple Container bootstrap and exec commands by ensuring Key changes:
Concern: Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[provision_packages / exec call] --> B{container_exec_shell_args\ncli, container_name, shell_command}
B -- "cfg(macos|test)\ncli == 'container'" --> C[apple_container_exec_args]
B -- "otherwise\ne.g. docker / podman" --> D[Docker-style exec vec\nexec, name, sh, -c, cmd]
C --> E[apple_container_wrap_shell_command\nmkdir -p /home/sandbox && cmd]
E --> F[Return:\nexec --workdir /tmp name sh -c\nmkdir -p /home/sandbox && cmd]
D --> G[Return:\nexec name sh -c cmd]
H[apple_container_exec / probes] --> C
I[apple_container_bootstrap_command] --> E
|
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c5f498e06
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #[test] | ||
| fn test_should_restart_after_readiness_error() { |
There was a problem hiding this comment.
Re-add macOS gating for restart-readiness test
This test now executes on every target, but it calls should_restart_after_readiness_error and ContainerState, which remain behind #[cfg(target_os = "macos")] in this file, so non-macOS test runs fail at compile time before any tests execute (I reproduced this with cargo test -p moltis-tools container_exec_shell_args -- --nocapture). Please gate this test with the same macOS cfg (or make the referenced symbols available under test) so Linux CI can compile the test target.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
* fix(tools): harden apple container bootstrap execs * test(tools): make create_sandbox_off deterministic
* fix(tools): harden apple container bootstrap execs * test(tools): make create_sandbox_off deterministic
Fixes #159.
Summary
/tmpand re-creates/home/sandboxbefore shell commands runcontainer execshapetest_create_sandbox_offdeterministic so it does not depend on a real backend being healthy on macOS hostsValidation
Completed
cargo test -p moltis-tools test_create_sandbox_off -- --nocapturecargo test -p moltis-tools apple_container -- --nocapturecargo test -p moltis-tools container_exec_shell_args -- --nocapturejust formatcargo +nightly-2025-11-30 clippy -Z unstable-options --workspace --all-targets --timings -- -D warningsRemaining
/home/sandboxjust linton a machine with CUDA /nvccavailable for the workspace--all-featurespathManual QA