Skip to content

fix: keep SQLite worker tests on fork hosts - #146991

Merged
steipete merged 3 commits into
mainfrom
codex/kv-worker-test-routing-current-main
Sep 13, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/kv-worker-test-routing-current-main

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Related: #146557, #146547, #147028.

What Problem This Solves

The async plugin-state cutover needs existing SQLite consumers to run in host processes. Their current routing includes thread hosts, and the reusable routing changes were coupled to unrelated transcript work.

User Impact

No OpenClaw runtime behavior changes. Developers retain the same test inventory, worker limits, focused selections, and watch discovery, including files added while watching.

Why This Change Was Made

Moves 23 existing core consumers to the existing infra fork owner and removes their former memberships. Session-binding stays with its existing 13-file channel-session contract project, which now uses forks; E2E tests also use fork hosts. Existing setup, runners, and worker limits remain unchanged.

Focused and watch routing reuse existing owners, including whole-config selections and inherited include filters. Keeping session-binding with the contract owner preserves the public channel-contract command and dedicated CI coverage without cross-suite expansion. This PR contains no KV or transcript production changes and no unlanded consumer tests.

Evidence

  • The public-command regression reads the actual package script and resolves its Vitest configuration. It reproduces the earlier unfiltered and binding-only omissions; all four repaired filter cases and the contract host/setup/limit assertions pass.
  • All 49 selected routing, CI-planner, full-inventory, and watch cases pass. Scripts and root test types, scoped typed lint, formatting, and fresh independent P2 review pass.
  • Full-suite discovery retains 14,019 test files with no duplicates. The watch graph retains the same 14,010 paths and existing duplicate set; all 254 E2E paths and worker limits are unchanged.
  • Ordinary and compact CI, together with the dedicated channel matrix, assign all 24 relevant consumers exactly once. Changed CI leaves session-binding to its actual dedicated coverage.
  • Actual wrapper and resolved-config discovery preserve five watch selections, including whole plugin and SDK suites. Each newly added synthetic matching file appears exactly once, with no files lost. Discovery fixtures are not executed.
  • The branch includes the separately landed reclamation-fixture repair fix(sessions): align the reclamation-memory test with the archive session owner #147028. The previous hosted run on f93e206e failed an unrelated hooks CLI process-exit assertion; it was not replayed or weakened locally. The new published head must pass the normal exact-head CI and native gates before landing.

@clawsweeper

clawsweeper Bot commented Sep 13, 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 13, 2026 11:46
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: L maintainer Maintainer-authored PR labels Sep 13, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 10:44 AM ET / 14:44 UTC (Revision 4).

ClawSweeper review

What this changes

Routes SQLite-consuming tests through forked processes and adjusts focused selection, watch discovery, and CI allocation while retaining channel-session contract coverage.

Merge readiness

✅ Ready for maintainer review

The latest commit resolves the previously reported channel-contract coverage blocker. The routing change remains useful and is not implemented on the inspected main; no remaining actionable patch defect was found.

Priority: P2
Reviewed head: 3e5d7bcdb064f63b7ca4287ec031795416935341

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused infrastructure repair with meaningful command-level coverage and the previous blocker resolved.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate is exempt under the supplied MEMBER classification; reported wrapper and resolved-config discovery checks address the changed test-routing behavior, and no production authority change triggers additional proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate is exempt under the supplied MEMBER classification; reported wrapper and resolved-config discovery checks address the changed test-routing behavior, and no production authority change triggers additional proof.
Evidence reviewed 8 items Previous blocker resolved: The exact-head GitHub commit patch removes session-binding from the relocated inventory, removes the contract exclusion, and selects forks for its existing channel-session owner. This resolves the previous finding without requiring explicit contract selections to expand into infra.
Public-command regression: The added regression reads test:contracts:channels from package.json, resolves its actual Vitest configurations, and compares discovery with the channel-contract inventory under four cases: unfiltered, binding-only, another contract, and an unrelated test. It also checks uniqueness and the binding test's fork host and worker limit.
Host-process requirement: The SQLite store entry points reject calls from worker threads without a host broker connection. The patch changes test ownership and process pools rather than weakening that production boundary.
Findings None None.
Security None None.

How this fits together

OpenClaw’s test wrapper and CI planner translate file selections into Vitest projects. Those projects choose the process environment needed by tests that use the host-owned SQLite broker.

flowchart TD
  A[Developer test selection] --> C[Test routing]
  B[CI test inventory] --> C
  C --> D[SQLite consumer selection]
  D --> E[Infra fork project]
  C --> F[Channel-session and E2E fork projects]
  C --> G[Other existing test projects]
  E --> H[Test execution and results]
  F --> H
  G --> H
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +493, Other +8. Total +501 across 27 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 25 535 42 +493
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 15 7 +8
Total 27 550 49 +501

Review metrics

Metric Value Why it matters
Public-command coverage 4 selection cases The regression checks actual package-command discovery, including the previously omitted binding-only selection.

Technical review

Best possible solution:

Keep SQLite consumers with fork-capable test owners while preserving public contract commands, focused selection, and dynamic watch discovery.

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

Yes at the source boundary: SQLite store admission rejects worker-thread callers, while affected test owners use threads. No failing current-main test was executed in this read-only review.

Is this the best way to solve the issue?

Yes. Reusing the infra fork owner and retaining session-binding in its existing contract project addresses the host requirement without changing production storage behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0a6ead71d14e.

Labels

Label justifications:

  • P2: This is a bounded developer test-routing repair supporting SQLite worker consumers, with no product runtime change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate is exempt under the supplied MEMBER classification; reported wrapper and resolved-config discovery checks address the changed test-routing behavior, and no production authority change triggers additional proof.

Evidence

What I checked:

  • Previous blocker resolved: The exact-head GitHub commit patch removes session-binding from the relocated inventory, removes the contract exclusion, and selects forks for its existing channel-session owner. This resolves the previous finding without requiring explicit contract selections to expand into infra. (test/vitest/vitest.contracts-channel-session.config.ts:13, 3e5d7bcdb064)
  • Public-command regression: The added regression reads test:contracts:channels from package.json, resolves its actual Vitest configurations, and compares discovery with the channel-contract inventory under four cases: unfiltered, binding-only, another contract, and an unrelated test. It also checks uniqueness and the binding test's fork host and worker limit. (test/vitest-projects-config.test.ts:427, 3e5d7bcdb064)
  • Host-process requirement: The SQLite store entry points reject calls from worker threads without a host broker connection. The patch changes test ownership and process pools rather than weakening that production boundary. (src/infra/sqlite-worker-store.ts:95, 3e5d7bcdb064)
  • Current main still lacks the relocation: The inspected main infra configuration includes only src/infra tests, and its E2E configuration does not override the shared thread pool. The new database-consumer inventory is absent from that main tree. (test/vitest/vitest.infra.config.ts:6, 0a6ead71d14e)
  • Latest-release comparison: The v2026.9.4 infra configuration likewise owns only src/infra tests; it does not contain this PR's cross-directory relocation. (test/vitest/vitest.infra.config.ts:6, 3a9d69db306c)
  • Existing owner history: Main history identifies prior infra-isolation work by Peter Steinberger. GitHub's commit patch confirms that this historical change added isolate:true to the existing infra configuration. (test/vitest/vitest.infra.config.ts:11, 4be8a58a7d3c)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-13T11:54:28.278Z sha e4019d2 :: blocked before merge. :: [P2] Preserve relocated tests for explicit contract-suite selections
  • reviewed 2026-09-13T12:24:59.275Z sha 797eb3f391198e58e63405ca67fd4efd26c9ac49 :: blocked before merge. :: [P2] Preserve relocated tests for explicit contract-suite selections
  • reviewed 2026-09-13T13:42:45.950Z sha f93e206 :: blocked before merge. :: [P2] Preserve relocated tests for explicit contract-suite selections

Move 24 existing core consumers to the infra fork owner and keep E2E tests in fork hosts. Preserve test inventories, worker limits, focused routing, and supported watch discovery independently of the pending database production cutovers.
@steipete
steipete force-pushed the codex/kv-worker-test-routing-current-main branch from 797eb3f to f93e206 Compare September 13, 2026 13:35
@vincentkoc vincentkoc self-assigned this Sep 13, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 13, 2026
@steipete
steipete merged commit 3a33369 into main Sep 13, 2026
153 of 154 checks passed
@steipete
steipete deleted the codex/kv-worker-test-routing-current-main branch September 13, 2026 15:04
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
* fix: keep SQLite worker tests on fork hosts

Move 24 existing core consumers to the infra fork owner and keep E2E tests in fork hosts. Preserve test inventories, worker limits, focused routing, and supported watch discovery independently of the pending database production cutovers.

* test: align remaining SQLite worker routing assertions

* fix: retain channel contract coverage on fork hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants