Repository navigation
fix(ci): avoid premature database verifier test timeouts - #158171
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 25, 2026, 10:53 AM ET / 14:53 UTC. ClawSweeper reviewWhat this changesThe branch changes database-verifier process tests to observe child exit and IPC disconnect events instead of polling child state with Vitest’s one-second default. Merge readiness✅ Ready for maintainer review Keep open. Current main still contains the one-second waits implicated in the reported CI failure, and this focused PR preserves the verifier’s lifecycle assertions. I found no actionable introduced defect. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway runs database integrity checks in a child process to protect its SQLite locks. Verification and shutdown complete after that child exits and its IPC channel disconnects. flowchart LR
A[Gateway integrity check] --> B[Verifier child process]
B --> C[SQLite check results]
B --> D[Native exit event]
B --> E[IPC disconnect event]
D --> F[Lifecycle completion]
E --> F
F --> G[Verification and Stop finish]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +20. Total +20 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the event-driven process tests at the verifier lifecycle boundary and let the exact-head CI run confirm they remain reliable on hosted runners. Do we have a high-confidence way to reproduce the issue? No high-confidence replay of the intermittent timeout was established in this read-only review. Current-main source shows the one-second polling mechanism, and the PR links an original CI failure. Is this the best way to solve the issue? Yes. Waiting on events emitted by the real child process addresses the test timeout at its observation boundary while retaining exit and disconnect assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 09388042b047. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash auto-merge.
|
* 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) ...
* 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) ...
* 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]>
) * 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]>
* 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]>
* 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]>
What Problem This Solves
Fixes intermittent database-verifier test failures when a real child process takes more than one second to exit on a busy CI runner.
User Impact
No user-visible or production behavior changes. The lifecycle tests still require native process exit and IPC disconnection before verification and Stop finish.
Why This Change Was Made
Three tests polled child state with Vitest's one-second default before reaching their intended lifecycle assertions. They now subscribe to the child's exit event before it can fire. The held-disconnect test also observes that notification directly, gives premature promise completion an event-loop turn to surface, and releases and joins its child in
finally. Spawn-failure coverage still uses the separate close-only contract.Evidence
openclaw-database-verify.process.test.ts:278; the child had not exited beforevi.waitForexpired, so the pending-disconnect assertion was never reached.pnpm test src/state/openclaw-database-verify.process.test.ts --maxWorkers=1wall time 22.087 seconds (Vitest 19.82 seconds). The three repaired cases took 7, 135, and 125 milliseconds locally.