Repository navigation
fix(test): observe ONNX worker boundaries without filesystem notifications - #157104
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 3:27 AM ET / 07:27 UTC (Revision 2). ClawSweeper reviewWhat this changesThe ONNX worker-client test fixture repeatedly reads its child process event log until the expected boundary appears, while retaining its ten-second deadline. Merge readiness✅ Ready for maintainer review Current main still has the notification-only waiter, and no merged fix was identified. The PR addresses a credible missed-event failure in the test fixture, with no actionable patch defect found. Priority: P3 Review scores
Verification
How this fits togetherThe ONNX plugin runs local classification in a child process. Its worker-client tests send real IPC requests and read child-written events before checking queueing, cancellation, and process cleanup. flowchart LR
A[Test request] --> B[ONNX worker client]
B --> C[Child process]
C --> D[Event log]
D --> E[Boundary waiter]
E --> F[Lifecycle assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -6. Total -6 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the real-child integration cases as the owner of worker lifecycle assertions, with reliable boundary observation and measured test cost. Do we have a high-confidence way to reproduce the issue? Yes. Current main's waiter can miss an event after its initial read, and the PR reports a controlled case where the real child wrote the event but the waiter timed out. I did not execute that control in this read-only review. Is this the best way to solve the issue? Yes. The bounded waiter uses the fixture's existing event log and preserves the real-process lifecycle assertions; the child-process boundary explains the narrow use of a real-time wait. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 23f5c6763362. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…tions (openclaw#157104) Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
The ONNX worker-client fixture could time out waiting for a child boundary already recorded in its event log if a directory-change notification was missed.
User Impact
No production behavior changes. Tests observe actual child progress without requiring a filesystem notification to trigger the next read.
Why This Change Was Made
Use the existing
vi.waitForhelper over the same append-only event log. Keep the 10-second deadline, real child processes, IPC messages, cancellation and queue assertions unchanged. The helper uses its default 50 ms polling interval. This removes six net test-support lines and the parent waiter's watcher/timer cleanup.Evidence
The unchanged local file passed all 11 cases.
A narrow control suppressed only the original parent waiter's notification callback and retained its initial read. The selected case failed at its existing 10-second boundary. A follow-up control recorded both
initandclassify/blockfrom the same real child at that timeout, confirming that the event was present but unobserved. Cleanup joined the child; the secondary early-exit async assertion diagnostic is retained.After restoring original bytes and applying the correction, all 11 candidate cases passed. All case bodies and the generated child fixture remain unchanged.
Revalidated the unchanged patch on current main after a normal frozen dependency update: all 11 cases passed again. The complete command took 21.442 seconds; this is a single cost observation, not a speedup comparison. Current mapped checks and fresh independent Codex P2 review passed.
Exact-head CI passed, including all 11 worker-client cases in the changed-extension job. That Vitest invocation took 29.88 seconds, mostly transformation; it is not a matched speedup comparison.
Failures from a separate macOS full-suite run on Node 24.21 were not reproduced by the unchanged local Node 24.19 run. This demonstrates robustness against notification loss, not a proven cause or fix for those historical failures. No speedup is claimed. The generated child's separate release-file watcher is unchanged.
Related: #139428