Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 3, 2026, 12:52 AM ET / 04:52 UTC. ClawSweeper reviewWhat this changesThe branch makes Piper voice extraction await tar process exit and redirected output under one timeout, with bounded cleanup on cancellation or timeout. Merge readiness⛔ Blocked before merge - 3 items remain Keep open. The branch removes the unbounded wait, but its cancellation path returns after a post-exit descendant survives, allowing Piper cleanup to race an extractor that is still running. Priority: P2 Review scores
Verification
How this fits togetherVoice Settings downloads and hash-validates a Piper voice archive, then invokes the operating system tar extractor into the local voice directory. Extraction completion controls whether the UI reports success, cancellation, or a retryable failure and cleanup. flowchart LR
A[Voice Settings download] --> B[Hash-verified Piper archive]
B --> C[Tar extraction process]
C --> D[Bounded exit and pipe wait]
D --> E{Completed or cancelled}
E -->|Completed| F[Verify voice files]
E -->|Cancelled or timed out| G[Stop extraction and clean partial files]
F --> H[Voice ready]
G --> I[Retryable failure]
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Make extraction own the complete child-process lifecycle, such as a Windows kill-on-close job assigned immediately after tar starts, and prove the post-exit descendant is gone before partial-voice cleanup proceeds. Do we have a high-confidence way to reproduce the issue? Yes. The introduced inherited-handle fixture creates a parent that exits while a child retains the redirected pipes, and the source shows the helper returns without terminating that child. Is this the best way to solve the issue? No. Sharing a deadline fixes the blocked wait, but the cleanup deliberately cannot terminate a descendant after the parent exits; lifecycle ownership must persist until every descendant is stopped. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bd7702c5149a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Maintainer repair is now in #1294 because this PR's contributor-fork head is not writable. Replacement head: 36e6994. It merges current origin/main, unifies the extraction deadline across exit and both drains, bounds cleanup, adds deterministic lifecycle coverage, and includes native Windows ar.exe proof. Neither PR was merged. |
Voice Settings Piper download extract called WaitForExit() with stderr redirected and no timeout. A hung tar child or a full stderr pipe blocked the UI until the process exited. Wait for exit and both redirected drains on one deadline. Kill the process tree, close local readers, and bound cleanup on timeout or cancel so a descendant-held pipe cannot stall Settings. Signed-off-by: Sebastien Tardif <[email protected]>
40f3502 to
cf75bc6
Compare
|
@clawsweeper re-review Claw P2 on |
This PR is still the first F003 extract-timeout fix (opened 2026-08-29). The fork head is writable by the author and is now replayed onto current |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Superseded on current main. #1294 landed |
|
Superseded by #1294 on main. |
What Problem This Solves
Fixes an issue where users downloading a Piper voice from Voice Settings would freeze the Settings window when
tar -xjfhung or filled its redirected stderr pipe. Extract used unboundedWaitForExit()after the download finished, so the 2 secondtar --versionprobe did not protect this path. Settings then sat on the extract step until the child exited or the operator killed the app.A first-round bound still left cancellation waiting on a post-exit stderr drain if a descendant kept the pipe open. Voice Settings cancels the prior Piper request before starting a new download, so that drain could still stall the UI.
Why This Change Was Made
Piper extract now waits for process exit plus complete stdout and stderr drain on one linked caller and timeout deadline. Timeout or cancel starts process-tree termination, closes local readers that inherited handles can hold, and bounds cleanup to one second. A timed-out extract fails closed and the existing download cleanup still deletes the partial voice directory. This does not change the SHA-256 check, the catalog, or the
tar --versionpreflight.User Impact
Operators can download a Piper voice without Voice Settings hanging when the OS
tarchild sticks. A timeout surfaces as a failed extract so they can retry. Cancel still stops the child instead of leavingtarrunning, including when a descendant still holds redirected pipes.Evidence
Current-head
BoundedProcessWait.WaitAsyncagainst the inherit-handles fixture: the parent exits, a child keeps both redirected pipes, then cancel returns in 3ms instead of waiting the 120s extract budget.Piper extract now calls
BoundedProcessWait.WaitAsyncfromExtractTarBz2Asyncinstead of unboundedWaitForExit()plus blockingStandardError.ReadToEnd().Change Type
Scope
Required proof pools
none: the hang is the Voice Settings Pipertarextract wait. A hung child plus the current-head helper is enough. No installer, WSL, or interactive WinUI host is required.Validation
dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --filter FullyQualifiedName~BoundedProcessWaitTests|FullyQualifiedName~PiperVoiceExtractionTeststar.exeextract case returns on non-Windows)elapsed_ms=3dotnet formaton the changed helper, Piper extract, TestHost fixture, and tests./build.ps1were not run on this macOS hostReal behavior proof
Behavior or issue addressed: Voice Settings Piper download extract blocked forever on unbounded
WaitForExit()with stderr redirected. After the first bound, cancel could still wait on a descendant-held drain.Real environment tested: macOS 26.6.2, Darwin, .NET 10.0.400, branch
fix/f003-piper-tar-timeoutreplayed ontoorigin/main09bc834, invoked withdotnet runfrom/tmp/wn-1268-head-proofagainst current-headBoundedProcessWait.Exact steps or command run after this patch:
cd /tmp/wn-1268-head-proof dotnet runEvidence after fix: terminal output from the current-head helper:
Observed result after fix: After the fixture parent exited,
WaitAsyncwas still pending on inherited pipes. Cancel returned in 3ms and did not consume the 120s extract budget.What was not tested: Interactive Voice Settings download on a Windows host against a real hung
tar.exe.Security Impact
No)No)No)No)No)Extract still launches the same OS
tar -xjfcommand on the already hashed tarball. Only the wait, stream drain, and kill-on-timeout behavior changed.Compatibility and Migration
Yes)No)No)Review Conversations
Related