Skip to content

test: reuse isolated memory tools in recall tracking - #138123

Merged
steipete merged 1 commit into
mainfrom
codex/perf8-memory-recall-ci
Sep 4, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/perf8-memory-recall-ci

Conversation

@steipete

@steipete steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

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 createMemorySearchToolOrThrow factory 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.

@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added extensions: memory-core Extension: memory-core size: XS maintainer Maintainer-authored PR labels Sep 4, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Sep 4, 2026
@clawsweeper

clawsweeper Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed September 4, 2026, 5:27 AM ET / 09:27 UTC.

ClawSweeper review

What this changes

The 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 maintainer label requires explicit maintainer handling rather than automated cleanup.

Priority: P3
Reviewed head: ac2df591f58e799176c5663e298aed0af7a820b0

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, coherent test refactor that reuses the established isolation helper without altering production behavior.
Proof confidence 🌊 off-meta tidepool Not applicable: The PR changes only test fixture construction and is maintainer-authored; its supplied timing and suite evidence is consistent with the source review, while contributor real-behavior proof gating does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The PR changes only test fixture construction and is maintainer-authored; its supplied timing and suite evidence is consistent with the source review, while contributor real-behavior proof gating does not apply.
Evidence reviewed 6 items Current-main helper contract: The shared factory normalizes every supplied configuration through the isolation helper before constructing the memory-search tool, so the introduced calls preserve fixture construction while adding the intended plugin isolation.
Introduced test coverage: All four existing recall-tracking cases now use the shared factory while retaining their existing inputs and assertions.
Production owner is unchanged: The production tool still records enabled recall results off the reply-latency path; the PR changes none of this runtime behavior.
Findings None None.
Security None None.

How this fits together

Memory 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]
Loading

Before merge

  • Complete next step (P2) - Complete protected maintainer handling after the relevant exact-head CI checks finish.
Agent review details

Security

None.

PR surface

Tests -8. Total -8 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 18 26 -8
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 18 26 -8

Review metrics

Metric Value Why it matters
Production versus test LOC production 0; tests -8 net (+18/-26) The change removes a duplicate test factory and adds no runtime, configuration, or persisted-state surface.

Technical review

Best 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.

Labels

Label changes:

  • add P3: This is a small test-reliability cleanup with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR changes only test fixture construction and is maintainer-authored; its supplied timing and suite evidence is consistent with the source review, while contributor real-behavior proof gating does not apply.

Label justifications:

  • P3: This is a small test-reliability cleanup with no production behavior 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 PR changes only test fixture construction and is maintainer-authored; its supplied timing and suite evidence is consistent with the source review, while contributor real-behavior proof gating does not apply.

Evidence

What I checked:

Likely related people:

  • steipete: 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.

@steipete
steipete merged commit 0209921 into main Sep 4, 2026
95 checks passed
@steipete
steipete deleted the codex/perf8-memory-recall-ci branch September 4, 2026 10:31
@steipete

steipete commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 4, 2026
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.
steipete added a commit to steipete/openclaw that referenced this pull request Sep 4, 2026
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.
steipete added a commit that referenced this pull request Sep 4, 2026
* 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.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 5, 2026
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: memory-core Extension: memory-core maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

1 participant