Repository navigation
fix(test): live Gateway validation loses shared state - #150873
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 17, 2026, 9:06 AM ET / 13:06 UTC (Revision 2). ClawSweeper reviewWhat this changesRuns live Gateway tests in one process fork and updates configuration checks so shared-state storage can initialize through its existing host broker. Merge readiness✅ Ready for maintainer review The fix remains necessary: current main still runs live Gateway suites in worker threads despite shared-state admission requiring a host process. No actionable correctness or security defect was found in the introduced patch. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s live-test runner starts Gateway instances and exercises provider workflows. Its worker configuration determines whether those instances can access host-owned shared-state SQLite services. flowchart LR
A[Live test command] --> B[Live test configuration]
B --> C[Single process fork]
C --> D[Gateway instance]
D --> E[Host broker admission]
E --> F[Shared-state SQLite]
F --> G[Live workflow assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +11. Total +11 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep live Gateway hosts in serialized process forks while preserving the production broker’s worker-thread rejection and existing test cleanup. Do we have a high-confidence way to reproduce the issue? Yes, from source: live suites start a Gateway inside Vitest’s inherited thread pool, where shared-state admission explicitly rejects non-main threads. This review did not execute the credentialed failing scenario. Is this the best way to solve the issue? Yes. Selecting the existing process-fork pool repairs the test host’s execution context and follows other Gateway database test lanes without weakening storage admission. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 324208c38245. LabelsLabel 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)
|
* fix(test): host live gateways in process forks * test: align live config contract with process pool
What Problem This Solves
Fixes: live Gateway validation loses shared-state SQLite and automatic USER.md context when Vitest hosts the Gateway in an application worker thread.
User Impact
User impact: release live suites exercise the same main-process shared-state admission boundary as a real Gateway; no runtime behavior changes.
Why This Change Was Made
vitest.live.config.tsinherited the repository thread pool. The live suites start a real Gateway in that worker, so shared-state SQLite correctly rejected it withShared-state admission requires the host broker. That rejection also made Memory Core provenance classification fail closed and excluded USER.md from the CLI-backend prompt report. Process forks preserve the existing one-worker serialization while making the test host a main process.Evidence
pnpm exec vitest run --config test/vitest/vitest.tooling.config.ts test/vitest-projects-config.test.ts— 228 passed.pnpm exec oxfmt --check test/vitest/vitest.live.config.ts test/vitest-projects-config.test.ts— passed.pnpm exec oxlint test/vitest/vitest.live.config.ts test/vitest-projects-config.test.ts— passed.