fix: recover detached boxes after stdin shim config#492
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7901f252e1
ℹ️ 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".
| @@ -1,598 +0,0 @@ | |||
| //! Process validation utilities for PID checking and verification. | |||
There was a problem hiding this comment.
Keep
util::process module available to the crate
Deleting this file breaks compilation because src/boxlite/src/util/mod.rs still declares pub mod process;, so Rust will emit E0583 (module file not found) as soon as this commit is checked out. Either keep process.rs (or move its contents) and update module wiring in the same commit.
Useful? React with 👍 / 👎.
| @@ -1,293 +0,0 @@ | |||
| //! Subprocess spawning for boxlite-shim binary. | |||
There was a problem hiding this comment.
Keep
controller::spawn module available to the crate
Removing this file also introduces a hard compile failure: src/boxlite/src/vmm/controller/mod.rs still contains mod spawn;, so the module resolver cannot find spawn.rs. This commit must include corresponding module rewiring or retain the file to keep the crate buildable.
Useful? React with 👍 / 👎.
2b4bc54 to
df9ff08
Compare
|
Status update: the PR is still mergeable and the relevant CI is green. Rust formatting, Rust tests across darwin/linux targets, Clippy, config checks, and codecov patch have all passed. The diff remains scoped to shim process tagging and detached box recovery validation. |
|
Hi @zxyasfas. Could you check why there are lots of irrelevant diff? |
df9ff08 to
cedc836
Compare
|
Thanks for catching this. I rebuilt the branch on top of the current The PR diff is back to the intended files only:
Current compare is 1 commit ahead / 0 behind, with the diff limited to the shim env marker and PID recovery validation changes. CI is re-running on the cleaned branch. |
|
two things look off to me:
direction is right though, just want these two covered with tests before we merge. |
|
Thanks, pushed a follow-up for both cases in b0f3ca2.
|
|
Fixed the export/format follow-up in 35c4648. CI is green now. |
|
looked at this more closely and the Unknown + live pid model has issues across the lifecycle, not just
small thing separate from the above: 1/2/3 share a root: |
|
Addressed the lifecycle issues from the latest review in 88b30dc.
CI is green across formatting, Clippy, Rust tests, and codecov patch. |
|
@zxyasfas could you add several test cases? |
|
Really appreciate the iteration here. The env-marker, 3-state 1. Identity check: cross-platform alignmentLinux side is solid. macOS is weaker: Since macOS is a first-class platform, we'd like to align both sides on Landing plan:
2. Graceful shutdown: use the existing ShimHandlerThe new
Both spots become: let mut h = ShimHandler::from_pid(pid, self.config.id.clone());
h.stop()?;
Also: 3. TestsLining up with @nieyy, we'd like the test cases to follow: A possible follow-up we're kicking around (not for this PR): could Push back on anything that looks off. |
|
Hi @zxyasfas. I have make some refinement on this PR. If you think it's fine, I will push the commits in this PR |
|
Closed for new PR #590 |
Summary
BOXLITE_BOX_IDso recovery can validate the owning box without putting the InstanceSpec back in argvboxlite-shimprocess with the matching env marker instead of checking for the box id in/proc/<pid>/cmdlineFixes #434.
Testing
git diff --checkcargo fmt --check/cargo test -p boxlite util::processbecausecargois not installed in this Windows environment and WSL commands timed out before reaching the repo.