Repository navigation
fix(test): stop native SQLite worker teardown crashes - #114567
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 27, 2026, 8:27 AM ET / 12:27 UTC. ClawSweeper reviewWhat this changesThe PR routes OpenClaw’s runtime/config Vitest lane through forked workers to isolate native SQLite teardown and adds a regression assertion that preserves that worker-pool choice. Merge readinessThis is a focused test-infrastructure reliability fix with credible repeated Testbox evidence and a regression assertion for the selected worker pool. It remains an active, protected Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s scoped Vitest configurations choose execution settings for grouped test lanes. The runtime/config lane exercises SQLite-backed Gateway, session, and model tests; its worker pool controls how native database handles are isolated and torn down. flowchart LR
A[Runtime and config tests] --> B[Scoped Vitest configuration]
B --> C{Worker pool}
C -->|forks| D[Disposable child processes]
D --> E[Native SQLite teardown]
E --> F[Stable test and CI result]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +7. Total +7 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the narrow fork-pool selection and regression assertion once the branch is refreshed against current Do we have a high-confidence way to reproduce the issue? Unclear: the PR gives a concrete repeated remote Testbox reproduction and after-fix stress path, but this read-only review did not independently rerun the intermittent Node/V8 teardown failure on current main. Is this the best way to solve the issue? Yes: the existing scoped Vitest configuration is the narrow ownership boundary, and explicitly selecting forks with a regression assertion addresses worker lifetime without changing production SQLite behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against dd77dd9acf5e. 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
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where maintainers and CI running SQLite-backed session/model regression tests on supported Node 24 could intermittently hit
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocaland abort with exit 134 even after all test assertions passed. Reproduced on two fresh Blacksmith Testbox machines during repeated live Gateway/model stress testing.Why This Change Was Made
Keep native SQLite database lifetimes inside disposable forked processes by selecting the existing Vitest
forkspool only for the runtime/config lane. Add a scoped-config regression assertion that prevents the lane from silently returning to threaded workers. No production behavior, database schema, migrations, provider configuration, or JSON state changes.User Impact
Reliable SQLite-backed session, dynamic-model, and Gateway regression coverage without sporadic Node/V8 test-worker crashes. Production runtime and stored user data are unchanged.
Evidence
openai/gpt-5.6,anthropic/claude-sonnet-4-6,anthropic/claude-haiku-4-5, andgoogle/gemini-3.1-pro-preview; zero skipped models.pnpm check:changed -- test/vitest/vitest.runtime-config.config.ts test/vitest-scoped-config.test.ts: passed, including formatting, lint, script declarations, dependency guards, and test-root typecheck..agents/skills/autoreview/scripts/autoreview --mode uncommitted: clean; no accepted/actionable findings.