Skip to content

fix(process): run verify-execute child under the shared owner (#3803) - #9295

Merged
EffortlessSteven merged 1 commit into
mainfrom
claude/project-thread-zow953
Oct 22, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
claude/project-thread-zow953

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Plan item: #3807 audit, Windows process ownership row
Governing issue or accepted claim: #3803 (own bounded subprocess trees with Job Objects)
Acceptance delta (one sentence): ripr agent verify-execute runs its child under the shared process owner and ends the whole tree on every terminal path before reading output, and the Windows xtask timeout control fails when a pipe-holding descendant survives.

Summary

Before:

  • verify-execute spawned its child with plain std::process::Child. A timeout, cancel or output overflow killed only the direct child, then joined the output readers behind any descendant still holding the pipe.
  • Its public descendant_containment text and docs/OUTPUT_SCHEMA.md said no job-object substrate exists, which OwnedProcess made false.
  • The xtask Windows timeout control passed even with a direct-child-only kill, because the marker is written by the parent.

After:

  • run_process spawns through OwnedProcess and calls terminate_tree() on every terminal path before joining the readers. A failed termination refuses.
  • descendant_containment is job_object on Windows and owned_child_only elsewhere; docs updated.
  • The xtask Windows control also fails if either stream carries the drain-abandoned output truncated diagnostic.

Proof

  • cargo test -p ripr --lib app::verification_execution: 16 passed. cargo test -p ripr --test cli_smoke verify_execute: 9 passed. cargo xtask precommit: exit 0.
  • Not run here: native Windows; the windows-ci lane on this head is the proof. Review of record is in the PR comments.

Claim boundary

Windows containment holds while the owner is alive (the job is not kill-on-close). Non-Windows keeps direct-child termination.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FrVWuPEQjhYo674kxG7wdc

…n Windows timeout control (#3803)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FrVWuPEQjhYo674kxG7wdc
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven EffortlessSteven added the windows-ci Run the advisory Windows lane on a pull request without opting into every full-ci lane. label Oct 21, 2026 — with Claude
@EffortlessSteven EffortlessSteven self-assigned this Oct 21, 2026
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 46 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 91 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 236d1753-2d39-4ad8-a0c9-0efce172c08b
📥 Commits

Reviewing files that changed from the base of the PR and between db2072b and bd624dd.

📒 Files selected for processing: 4
  • changelog.d/3803-verify-execute-owned-process.md
  • crates/ripr/src/app/verification_execution.rs
  • docs/OUTPUT_SCHEMA.md
  • xtask/src/run.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Copy link
Copy Markdown
Member Author

Review of record, head bd624dd. Angles: correctness/edge cases, tests/regressions, spec/contract. Reviewer was an independent agent reading the diff and process_owner.rs; it ran nothing.

Findings: no blocking. Completed exit is unchanged on Unix (terminate_tree sees the exited child, no kill). On Windows a completed exit now also ends leftover descendants, which is the intent. Exit status, dispositions, spawn-failure mapping and descendant_containment consumers are unchanged.

Non-blocking, noted: (1) a failed terminate_tree after a natural exit now refuses instead of being ignored, which is fail-closed and needs try_wait or TerminateJobObject to error; (2) the Unix reader-join hang with a pipe-holding descendant remains a documented limitation; (3) no Windows-only test in verification_execution.rs for the descendant case, and the Windows-only xtask assertion cannot run on Linux, so native proof comes from the windows-ci lane.

Resolution: none required. Local: verification_execution 16 passed, cli_smoke verify_execute 9 passed, cargo xtask precommit exit 0. Bot reviewers (Gemini, CodeRabbit) were rate-limited, so they gave no review.


Generated by Claude Code

@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 21, 2026 22:04
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision

  • Needs verification checks before upstream.

Verification questions

  • Confirm xtask timeout test only asserts the marker file absence and two 'output truncated' strings; it does not assert descendant-side process state, so on Linux it cannot distinguish job-object vs direct-child kill where the harness yields no descendants.
  • Confirm the output truncated drain-abandoned assertion added in xtask/src/run.rs is a sibling-control contract, not a unit test; broader output truncated audit across the workspace is parked.

Refuted

  • A worker/capture thread could detach across the async polling boundary and escape process-tree cleanup.; refuted because: No JavaScript or detachable worker abstraction appears on this route. spawn_capture returns a JoinHandle for each pipe, and run_process refuses when termination fails rather than joining.
  • The new verification_execution tests would pass against the pre-PR code (bare Child::kill), so the diff is a non-behavioral refactor not justified by tests.; refuted because: Diff shows kill_child now calls OwnedProcess::terminate_tree and outputs_from_overflow pulls stdout/stderr from OwnedProcess via stdout_pipe/stderr_pipe; the old Child struct lacks those accessors, so the new overflow test cannot compile against the prior API. terminate_tree on a completed Unix child is a documented no-op, preserving prior exit semantics.
  • Another runtime path already routes through OwnedProcess or a process-group substrate, so this fix is not localised.; refuted because: The diff is the sole OwnedProcess adoption site in the touched files and the non-Windows branch of DESCENDANT_CONTAINMENT explicitly states no substrate is available; xtask still uses std::process::Command::spawn.
  • Termination errors could be ignored and permit unsafe reader joins.; refuted because: kill_child now propagates terminate_tree failure as Refusal, preventing subsequent reader joins.

Parked follow-ups

  • OwnedProcess migration is localised to verification_execution.rs; sibling spawn points (xtask wrappers, any other run_process-shaped helpers) still use plain std::process::Child and remain out of scope for this PR.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.
  • The changed claim that Windows Job Objects own the entire tree is source-consistent, but the packet contains no native Windows receipt for the new path or control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready windows-ci Run the advisory Windows lane on a pull request without opting into every full-ci lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants