Repository navigation
fix(process): run verify-execute child under the shared owner (#3803) - #9295
Conversation
…n Windows timeout control (#3803) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FrVWuPEQjhYo674kxG7wdc
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
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. View limit details
Comment |
|
Review of record, head bd624dd. Angles: correctness/edge cases, tests/regressions, spec/contract. Reviewer was an independent agent reading the diff and Findings: no blocking. Completed exit is unchanged on Unix ( Non-blocking, noted: (1) a failed Resolution: none required. Local: Generated by Claude Code |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
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 truncateddrain-abandoned assertion added in xtask/src/run.rs is a sibling-control contract, not a unit test; broaderoutput truncatedaudit 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.
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-executeruns 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-executespawned its child with plainstd::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.descendant_containmenttext anddocs/OUTPUT_SCHEMA.mdsaid no job-object substrate exists, whichOwnedProcessmade false.After:
run_processspawns throughOwnedProcessand callsterminate_tree()on every terminal path before joining the readers. A failed termination refuses.descendant_containmentisjob_objecton Windows andowned_child_onlyelsewhere; docs updated.output truncateddiagnostic.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.windows-cilane 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