Skip to content

fix(onnx): prevent worker fixture hangs after release - #158146

Merged
steipete merged 1 commit into
mainfrom
codex/test-onnx-release-marker
Sep 25, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-onnx-release-marker

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #157104

What Problem This Solves

Fixes the ONNX worker queue fixture hanging until its test deadline when the release file exists but its filesystem notification is not delivered.

User Impact

No user-visible product change. The existing ONNX FIFO and cancellation test can finish without depending on directory-change notifications.

Why This Change Was Made

Observe the same release marker directly, yielding asynchronously while it is absent. Real worker IPC, queue capacity, cancellation, process identity, and cleanup assertions remain unchanged. The earlier event-log waiter repair left this separate child release latch untouched.

Evidence

  • Original and uninstrumented candidate: all 11 cases pass with identical ordered identities and statuses on Node 24.19.0 / pnpm 12.4.2.
  • Deterministic notification-loss control: both arms wait for the first real absent-marker check before writing the marker. The original then reaches its unchanged 120-second timeout; the candidate passes the existing FIFO and same-process assertions. Each control selects one case and filters ten.
  • Native cleanup verified after every arm, with empty temporary namespaces and no remaining checkout or fixture holders.
  • Formatting, mapped checks, and fresh managed P2 review pass; no actionable review findings.

Observed full single-worker command times were 20.420s originally and 7.927s for the candidate; compiler preparation differed, so these are execution costs, not a speedup comparison.

The recorded full-suite timeout is a historical symptom, not proof that notification loss caused that particular failure. No full-suite runtime or speedup claim is made.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 25, 2026 14:10
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed September 25, 2026, 10:16 AM ET / 14:16 UTC.

ClawSweeper review

What this changes

The ONNX worker test fixture checks its release file every 50 ms so a child process can resume when a filesystem notification is missed.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep this PR open. Current main still has the release-file watcher; the related merged PR repaired a different event-log wait. The proposed fix addresses that remaining hang, but its new timed polling loop conflicts with OpenClaw’s test guidance.

Priority: P3
Reviewed head: 09e703c6d2768ad531c47e319f4c84c3d8ce9d55

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused real-process control supports the fix, but the new fixture synchronization conflicts with the repository’s timing policy.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The PR body reports a before/after notification-loss control through the real worker-client spawn and IPC path: the original timed out, while the candidate completed the existing FIFO and same-process assertions on Node 24.19.0. No stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body reports a before/after notification-loss control through the real worker-client spawn and IPC path: the original timed out, while the candidate completed the existing FIFO and same-process assertions on Node 24.19.0. No stored-data contract changes.
Evidence reviewed 6 items Introduced fixture change: The pinned PR delta replaces the child fixture’s filesystem watcher with a 50 ms timer and repeated release-file checks.
Current-main behavior: The fetched main revision still waits for the release file through fs.watch, so the PR’s distinct fix is not already present.
Existing boundary assertions: The test still checks queue capacity, cancellation, same-process results, and FIFO order through the real worker client.
Findings 1 actionable finding [P2] Replace the timed poll with a deterministic release signal
Security None None.

How this fits together

The ONNX plugin sends classification requests to a child process and queues work while it waits for replies. This PR changes how the test child is released so the existing queue and cancellation assertions can finish.

flowchart LR
A[Test requests] --> B[Worker client queue]
B --> C[Child test worker]
C --> D{Release file exists?}
D -- No --> D
D -- Yes --> E[Result messages]
E --> F[Queue assertions]
Loading

Before merge

  • Replace the timed poll with a deterministic release signal (P2) - The introduced setTimeout(50) loop polls the release file in a changed test fixture. Root AGENTS.md and the writing-tests guide direct tests away from real timers and polling. Use a test-owned cross-process release signal while keeping the existing real-worker FIFO assertions.
  • Complete next step (P2) - Replace the 50 ms timer poll with deterministic child release synchronization before merge.

Findings

  • [P2] Replace the timed poll with a deterministic release signal — extensions/onnx/src/worker-client.test.ts:49-50
Agent review details

Security

None.

PR surface

Tests -2. Total -2 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 4 6 -2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 6 -2

Review metrics

None.

Technical review

Best possible solution:

Release the real test child through a deterministic test-owned signal while retaining the queue, cancellation, and process-identity assertions.

Do we have a high-confidence way to reproduce the issue?

Yes. The current watcher can remain unresolved after a missed notification, and the PR describes a focused notification-loss control; this read-only review did not run it.

Is this the best way to solve the issue?

No. Checking the durable release marker addresses notification loss, but the new real-time poll conflicts with the repository’s test timing rule; a deterministic release signal would preserve the same coverage.

Full review comments:

  • [P2] Replace the timed poll with a deterministic release signal — extensions/onnx/src/worker-client.test.ts:49-50
    The introduced setTimeout(50) loop polls the release file in a changed test fixture. Root AGENTS.md and the writing-tests guide direct tests away from real timers and polling. Use a test-owned cross-process release signal while keeping the existing real-worker FIFO assertions.
    Confidence: 0.94

Overall correctness: patch is incorrect
Overall confidence: 0.87

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 83a1e807fa66.

Labels

Label changes:

  • add P3: This repairs an internal test fixture and has no stated user-visible product change.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body reports a before/after notification-loss control through the real worker-client spawn and IPC path: the original timed out, while the candidate completed the existing FIFO and same-process assertions on Node 24.19.0. No stored-data contract changes.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The PR body reports a before/after notification-loss control through the real worker-client spawn and IPC path: the original timed out, while the candidate completed the existing FIFO and same-process assertions on Node 24.19.0. No stored-data contract changes.

Label justifications:

  • P3: This repairs an internal test fixture and has no stated user-visible product change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (terminal): The PR body reports a before/after notification-loss control through the real worker-client spawn and IPC path: the original timed out, while the candidate completed the existing FIFO and same-process assertions on Node 24.19.0. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body reports a before/after notification-loss control through the real worker-client spawn and IPC path: the original timed out, while the candidate completed the existing FIFO and same-process assertions on Node 24.19.0. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Replace the 50 ms child poll with a deterministic release signal and rerun the focused fault control.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 0d9119c into main Sep 25, 2026
159 checks passed
@steipete
steipete deleted the codex/test-onnx-release-marker branch September 25, 2026 14:31
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (194 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (175 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* fix(qa-lab): retain tab focus and scroll during polling

* chore(qa-lab): merge main for tab navigation validation

* fix(qa-lab): keep focused tabs visible after layout changes

* fix(qa-lab): reconcile navigation retention with current app

* chore: refresh main for QA Lab navigation validation

* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (194 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
)

* fix(qa-lab): retain tab focus and scroll during polling

* chore(qa-lab): merge main for tab navigation validation

* fix(qa-lab): keep focused tabs visible after layout changes

* fix(qa-lab): reconcile navigation retention with current app

* chore: refresh main for QA Lab navigation validation

* commit '0001f441f53712e44b2ca6edf2a6752b8abd6d1d': (194 commits)
  feat(ui): listen to managed desktop audio in the panel (openclaw#157724)
  fix(ci): resume partially published preparation receipts (openclaw#158174)
  feat(release): one approval per release via an attested parent approval receipt (openclaw#157911)
  feat(desktop): advertise current managed desktop audio (openclaw#157723)
  fix(ui): retain delayed progress scroll gestures (openclaw#158153)
  refactor(ui): share sidebar mutation error feedback (openclaw#158173)
  test: await database verifier process lifecycle events (openclaw#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (openclaw#157722)
  refactor(gateway): split companion prompts and metadata fixtures (openclaw#158050)
  feat(desktop): isolate managed Linux application audio (openclaw#157720)
  fix(test): prepare catalog fixture modules before startup (openclaw#158157)
  fix: keep model pickers usable during provider sign-in (openclaw#158132)
  refactor(test): remove unused prompt scenario metadata (openclaw#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (openclaw#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (openclaw#158020)
  fix: bound stalled browser stream startup (openclaw#156323)
  fix(onnx): prevent worker fixture hangs after release (openclaw#158146)
  fix(models): preserve scoped provider discovery outcomes (openclaw#158139)
  fix(agents): report offline trash failures after agent delete (openclaw#158052)
  ...

Co-authored-by: Vincent Koc <[email protected]>
vincentkoc added a commit that referenced this pull request Oct 17, 2026
* fix(ui): release failed avatar response bodies

* test(ui): cover avatar response cancellation in Chromium

* test(ui): assert retained image after avatar failure

* test(ui): preserve window global type in avatar proof

* test(ui): avoid shadowed avatar proof bindings

* chore: refresh main for avatar lifecycle validation

* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (175 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...

* test(ui): wait for settled avatar fallback

* test(ui): wait for control UI before avatar handoff

* fix(ui): preserve avatar cleanup across retry lifecycle updates

Integrate current main while preserving retry exhaustion, auth restoration, and deferred response cleanup. Keep the real-stream test on real timers and drain loader cleanup before restoring shared test state.

* fix(ui): integrate avatar response cleanup with current main

* test(ui): align avatar cleanup proof with current harness

* test(ui): qualify avatar cleanup harness types and formatting

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
* fix(ui): release failed avatar response bodies

* test(ui): cover avatar response cancellation in Chromium

* test(ui): assert retained image after avatar failure

* test(ui): preserve window global type in avatar proof

* test(ui): avoid shadowed avatar proof bindings

* chore: refresh main for avatar lifecycle validation

* commit '0001f441f53712e44b2ca6edf2a6752b8abd6d1d': (175 commits)
  feat(ui): listen to managed desktop audio in the panel (openclaw#157724)
  fix(ci): resume partially published preparation receipts (openclaw#158174)
  feat(release): one approval per release via an attested parent approval receipt (openclaw#157911)
  feat(desktop): advertise current managed desktop audio (openclaw#157723)
  fix(ui): retain delayed progress scroll gestures (openclaw#158153)
  refactor(ui): share sidebar mutation error feedback (openclaw#158173)
  test: await database verifier process lifecycle events (openclaw#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (openclaw#157722)
  refactor(gateway): split companion prompts and metadata fixtures (openclaw#158050)
  feat(desktop): isolate managed Linux application audio (openclaw#157720)
  fix(test): prepare catalog fixture modules before startup (openclaw#158157)
  fix: keep model pickers usable during provider sign-in (openclaw#158132)
  refactor(test): remove unused prompt scenario metadata (openclaw#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (openclaw#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (openclaw#158020)
  fix: bound stalled browser stream startup (openclaw#156323)
  fix(onnx): prevent worker fixture hangs after release (openclaw#158146)
  fix(models): preserve scoped provider discovery outcomes (openclaw#158139)
  fix(agents): report offline trash failures after agent delete (openclaw#158052)
  ...

* test(ui): wait for settled avatar fallback

* test(ui): wait for control UI before avatar handoff

* fix(ui): preserve avatar cleanup across retry lifecycle updates

Integrate current main while preserving retry exhaustion, auth restoration, and deferred response cleanup. Keep the real-stream test on real timers and drain loader cleanup before restoring shared test state.

* fix(ui): integrate avatar response cleanup with current main

* test(ui): align avatar cleanup proof with current harness

* test(ui): qualify avatar cleanup harness types and formatting

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: onnx proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant