Repository navigation
test: reuse isolated memory tools in recall tracking - #138123
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs changes before merge. Reviewed September 4, 2026, 5:27 AM ET / 09:27 UTC. ClawSweeper reviewWhat this changesThe PR replaces a local memory-search test factory with the shared isolated factory in all four recall-tracking cases. Merge readiness⛔ Needs changes before merge - 1 item remains Keep open. Current main still has the local test factory, while this narrow test-only change consistently adopts the established isolated factory; source review found no correctness or security defect. The protected Priority: P3 Review scores
Verification
How this fits togetherMemory Core exposes a memory-search tool to agent runs and records eligible recall results asynchronously. The changed tests build that tool with mocked search and persistence dependencies, then verify recall-tracking behavior. flowchart LR
A[Test configuration] --> B[Shared isolated tool factory]
B --> C[Memory search tool]
C --> D[Mocked search and recall storage]
D --> E[Recall tracking assertions]
Before merge
Agent review detailsSecurityNone. PR surfaceTests -8. Total -8 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Use the shared isolated factory as the sole recall-test construction path, preserving the existing four behavioral assertions and mock cleanup. Do we have a high-confidence way to reproduce the issue? No independent run was performed in the read-only checkout. The PR body reports a localized construction-time timeout, and source confirms the previously omitted isolation path. Is this the best way to solve the issue? Yes. The existing helper is the canonical fixture-construction path, applies the needed isolation, and is already used by an equivalent sibling test surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e0c230789b33. 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.
|
Adopt the already-landed canonical fixture repair from #138123 so the Gateway restart forward-port can run its memory CI shard without loading real plugins in the first recall-tracking case. Preserve all assertions, test order, and deadlines. No production changes. Source: 0209921 Validation: all four recall cases in original order; complete changed-file gate including extension test types, lint, and dead-export scans; independent P0-P2 review clean.
Exercise admission, account targeting, catalog replacement, and failed-stop rollback through the real channel manager. Preserve the existing assertions and join monitor cleanup. Reuse the canonical recall fixture cleanup from openclaw#138123 (0209921). Production behavior is unchanged.
* fix(gateway): recover in-flight replies across restart Bind reply and session admission ownership to the Gateway host, including lifetime-wrapped plugin dispatch and queued delivery retries. Mark exact active owners durably, revalidate at commit and cancellation, then abort retiring parents before tool and channel teardown. The unchanged Linux scenario now completes three restarts with three retained recovery policies and one final delivery in 19 seconds. * fix(test): keep Gateway admission on the fixture lifecycle generation Expose the registry generation from the same mutable fixture state used by agent events and lifecycle rotation. Gateway agent-handler admission now reaches the intended behavior assertions after the restart ownership fix. * test: reuse isolated memory tools in recall tracking Adopt the already-landed canonical fixture repair from #138123 so the Gateway restart forward-port can run its memory CI shard without loading real plugins in the first recall-tracking case. Preserve all assertions, test order, and deadlines. No production changes. Source: 0209921 Validation: all four recall cases in original order; complete changed-file gate including extension test types, lint, and dead-export scans; independent P0-P2 review clean. * test(qa): refresh ClawHub release policy docs reference Adopt the canonical fixture correction from #138044 (085641a) after main removed the former publishing page. Scenario behavior stays unchanged. Verified all 58 catalog tests, complete changed-file checks, and independent review.
* fix(gateway): recover in-flight replies across restart Bind reply and session admission ownership to the Gateway host, including lifetime-wrapped plugin dispatch and queued delivery retries. Mark exact active owners durably, revalidate at commit and cancellation, then abort retiring parents before tool and channel teardown. The unchanged Linux scenario now completes three restarts with three retained recovery policies and one final delivery in 19 seconds. * fix(test): keep Gateway admission on the fixture lifecycle generation Expose the registry generation from the same mutable fixture state used by agent events and lifecycle rotation. Gateway agent-handler admission now reaches the intended behavior assertions after the restart ownership fix. * test: reuse isolated memory tools in recall tracking Adopt the already-landed canonical fixture repair from openclaw#138123 so the Gateway restart forward-port can run its memory CI shard without loading real plugins in the first recall-tracking case. Preserve all assertions, test order, and deadlines. No production changes. Source: 2fddacd Validation: all four recall cases in original order; complete changed-file gate including extension test types, lint, and dead-export scans; independent P0-P2 review clean. * test(qa): refresh ClawHub release policy docs reference Adopt the canonical fixture correction from openclaw#138044 (62e4d4d) after main removed the former publishing page. Scenario behavior stays unchanged. Verified all 58 catalog tests, complete changed-file checks, and independent review.
What Problem This Solves
The first memory recall-tracking test could spend its 120-second deadline constructing real embedding-provider plugins, although the test mocks search and recall persistence. It repeatedly timed out in the memory-extension CI shard while its three sibling cases finished immediately.
Why This Change Was Made
Use the existing
createMemorySearchToolOrThrowfactory in all four cases and delete the duplicate local factory. The shared factory already applies the memory test config isolation that the new first case omitted. This keeps one owner for fixture construction while preserving every recall assertion, case order, deadline, and slow-write cleanup. Production changes: 0 lines; tests: +18/-26.User Impact
More reliable memory-extension CI. Product memory, provider, storage, and visibility behavior are unchanged.
Evidence
The untouched file passed locally but took 86.6 seconds in its first case. Observation-only timing localized 86.79 seconds to construction and 2.44 ms to search execution. With the canonical factory, construction took 1.30 ms and execution took 2.91 ms. These are local causal diagnostics, not an isolated throughput or RSS benchmark.
The entire 156-file extension-memory configuration passed: 2,123 cases, with three existing Windows-only skips. Its four recall cases took 8/1/1/1 ms in their original order. The canonical changed-file gate passed, and managed P0–P2 review found no issues. Local proof used Node 26.8.1 on macOS; the saved failing CI used Node 24.19.0 on Linux, so fresh hosted validation remains relevant. The CI log contains one additional later storage-status test beyond the frozen local base; no recall case was removed.