Skip to content

Fix finish_child Err arm to fall through to teardown - #399

Merged
Finesssee merged 1 commit into
mainfrom
fix/finish-child-err-fallthrough
Aug 29, 2026
Merged

Fix finish_child Err arm to fall through to teardown#399
Finesssee merged 1 commit into
mainfrom
fix/finish-child-err-fallthrough

Conversation

@Finesssee

@Finesssee Finesssee commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #398. The Err arm in finish_child's poll loop early-returned None before the teardown block, so a transient try_wait error (e.g. ECHILD) skipped kill+wait - leaving the child unreaped (zombie on Unix) and reporting a false discovery failure. Now falls through to the same kill+wait+recover teardown as grace expiry. Closes the last error-path gap from the #396 review.

Summary by CodeRabbit

  • Bug Fixes
    • Improved command cleanup when checking a process’s exit status encounters a temporary error.
    • Ensured teardown proceeds reliably instead of ending without an exit code.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fe76ace6-2cd8-4e6e-a5e0-8a0424bbd29b

📥 Commits

Reviewing files that changed from the base of the PR and between 1f6f524 and cb9b701.

📒 Files selected for processing (1)
  • rust/src/host/command_runner.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

finish_child now proceeds with process teardown when try_wait returns an error. The teardown comments document transient wait errors, including ECHILD and handle races.

Changes

Process teardown handling

Layer / File(s) Summary
Wait error teardown behavior
rust/src/host/command_runner.rs
finish_child exits the grace loop on try_wait errors and proceeds with process teardown. The comments document transient wait errors as teardown triggers.

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk: ⚪ Minimal · up to cb9b7

This narrowly changes error handling so child teardown runs instead of returning early; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making the finish_child error path fall through to teardown.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/finish-child-err-fallthrough

Comment @coderabbitai help to get the list of available commands.

@Finesssee
Finesssee merged commit a84ffb5 into main Aug 29, 2026
2 of 3 checks passed
@Finesssee
Finesssee deleted the fix/finish-child-err-fallthrough branch August 29, 2026 09:39
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