Repository navigation
test(gateway): use in-memory task registry - #118191
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 4:51 PM ET / 20:51 UTC. ClawSweeper reviewWhat this changesThis PR changes the gateway agent-handler test suite to use the canonical in-memory task-registry runtime instead of SQLite fixture persistence, while leaving dedicated SQLite store tests in place. Merge readinessKeep this PR open for maintainer handling. The test-only optimization is not on current main, the PR keeps the task lifecycle exercised through the canonical in-memory store while the SQLite owner suite retains durability coverage, and the protected Priority: P3 Review scores
Verification
How this fits togetherGateway agent-handler tests send simulated RPC requests through the real agent dispatch and task lifecycle. The task registry normally persists tasks to SQLite, while this test suite can use an injected in-memory store to verify same-process lifecycle behavior faster; dedicated task-store tests continue to cover persistence. flowchart LR
A[Gateway agent test inputs] --> B[Agent handler dispatch]
B --> C[Task lifecycle]
C --> D[Injected in-memory task registry]
D --> E[Task and terminal-state assertions]
F[Task-registry store owner tests] --> G[SQLite durability and reopen assertions]
G --> E
Before merge
Agent review detailsSecurityNone. PR surfaceSource +9, Tests +8. Total +17 across 3 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the focused test-runtime refactor after refresh against current main, retaining the in-memory registry for handler semantics and the separate SQLite store suite for durability contracts. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR optimizes test fixture behavior rather than reporting a user-facing defect; the relevant verification is the targeted handler and store-suite evidence described in the PR body. Is this the best way to solve the issue? Yes. Reusing the existing injectable task-registry store preserves real lifecycle semantics in gateway tests while keeping SQLite-specific contracts in their owning suite, avoiding a second task-lifecycle implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b35b8e286df0. 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.
|
* origin/main: feat(gateway): track event-loop degradation persistence and add concurrency benchmark (#118193) fix(config): preserve secret ownership when configuration rows move (#118149) fix(cron): deliver failure alerts after persistence (#118200) chore(lint): clear 172 lint:all baseline violations in five batches (#118098) perf(gateway): remove streaming hot-path rescans (#118192) test(gateway): use in-memory task registry (#118191) test(macos): fix three races in the bounded process suites (#118196) refactor(migrate-hermes): consolidate test fixtures (#118182) test(android): share Wear transport fixtures (#118177) test(ui): deduplicate control UI e2e setup (#118180) fix(plugins): unblock prerelease validation (#118103) test(cli): reduce redundant process launches (#118141) test(gateway): compact terminal observer fixtures (#118179) fix(agents): make requested threads sidebar-visible (#118073) test(plugins): canonicalize native resolver fixtures (#118174) test: deduplicate agent runner fixtures (#118176) refactor(policy): consolidate doctor test fixtures (#118173) fix(plugins): remove disabled channel plugin configuration on uninstall (#118127) refactor(matrix): consolidate monitor test fixtures (#118175)
Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: feat(gateway): track event-loop degradation persistence and add concurrency benchmark (openclaw#118193) fix(config): preserve secret ownership when configuration rows move (openclaw#118149) fix(cron): deliver failure alerts after persistence (openclaw#118200) chore(lint): clear 172 lint:all baseline violations in five batches (openclaw#118098) perf(gateway): remove streaming hot-path rescans (openclaw#118192) test(gateway): use in-memory task registry (openclaw#118191) test(macos): fix three races in the bounded process suites (openclaw#118196) refactor(migrate-hermes): consolidate test fixtures (openclaw#118182) test(android): share Wear transport fixtures (openclaw#118177) test(ui): deduplicate control UI e2e setup (openclaw#118180) fix(plugins): unblock prerelease validation (openclaw#118103) test(cli): reduce redundant process launches (openclaw#118141) test(gateway): compact terminal observer fixtures (openclaw#118179) fix(agents): make requested threads sidebar-visible (openclaw#118073) test(plugins): canonicalize native resolver fixtures (openclaw#118174) test: deduplicate agent runner fixtures (openclaw#118176) refactor(policy): consolidate doctor test fixtures (openclaw#118173) fix(plugins): remove disabled channel plugin configuration on uninstall (openclaw#118127) refactor(matrix): consolidate monitor test fixtures (openclaw#118175)
Summary
No production code, test configuration, worker count, or sharding changes.
Performance
The previous harness opened, wrote, finalized, persisted, and repeatedly closed the SQLite task ledger as fixture plumbing even though this suite asserts same-process handler semantics rather than database durability.
Proof
src/gateway/server-methods/agent.test.ts— 266/266 passedsrc/tasks/task-registry.store.test.ts— 43/43 SQLite owner tests passedoxfmt,oxlint, andgit diff --checkpassedTest-only change; no changelog entry.