Skip to content

fix(memory): prevent index test plugin discovery timeout - #118641

Merged
steipete merged 1 commit into
mainfrom
codex/qa-92-memory-lancedb-module-state
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa-92-memory-lancedb-module-state

Conversation

@steipete

@steipete steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Closes #118640

What Problem This Solves

Fixes an issue where maintainers running the memory-core index unit suite would hit a 240-second focused-test timeout because the suite loaded the full runtime plugin registry even though it supplies mocked embedding providers.

Why This Change Was Made

The suite's createCfg() now uses the existing isolateMemoryManagerTestConfig() boundary already used by sibling manager tests. That keeps mocked manager tests out of cold plugin discovery while preserving any explicitly configured plugin enablement.

User Impact

There is no production runtime behavior change. Focused memory-index proof completes in normal unit-test time, and the full memory suite no longer pays minutes of unrelated plugin-loading work for this file.

AI-assisted: yes. The root cause, diff, and proof were reviewed directly.

Evidence

  • Reproduced on base db7c48478f80c7c492e351c939883ac058173562:
    • node scripts/test-projects.mjs extensions/memory-core/src/memory/index.test.ts -- -t 'does not prepare vector deletes'
    • failed at the 240-second timeout; test body 254.187s, total Vitest duration 259.46s.
  • Identical focused command after the fix:
    • 1/1 passed; test body 203ms, total Vitest duration 3.47s.
  • Focused stress: 10/10 fresh-process runs passed; test durations 199–215ms.
  • Full changed file: 110/110 passed locally in 39.53s.
  • Blacksmith Testbox tbx_01kz3myagvh0d8dypcyp56nq46: run 30808306622
    • full memory project: 134/134 files and 1,936/1,936 tests passed;
    • changed file: 110/110 passed in 28.174s;
    • repo-native changed gate passed, including extension-test typecheck and focused lint.
  • git diff --check and targeted oxfmt check passed.
  • Fresh autoreview: clean, no accepted/actionable findings.
  • Diff: one test file, +3/-2; production LOC delta 0.

No external live-product boundary applies to this test-isolation change; the exact focused failure and full hosted memory workflow are the relevant behavior proof.

@openclaw-barnacle openclaw-barnacle Bot added the extensions: memory-core Extension: memory-core label Aug 3, 2026
@steipete
steipete marked this pull request as ready for review August 3, 2026 11:22
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 3, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 7:27 AM ET / 11:27 UTC.

ClawSweeper review

What this changes

The PR wraps the memory-index test configuration with the shared isolation helper so mocked index tests avoid unnecessary runtime plugin discovery.

Merge readiness

✅ Ready for maintainer review

The PR is still necessary: current main does not include the index-test isolation change, and the branch applies the existing memory test boundary to the one configuration that still bypasses it. The patch is test-only, source-aligned, and supported by repeatable focused and hosted-suite evidence; keep it open for normal maintainer review and landing.

Priority: P2
Reviewed head: b9b458d8ed76a95a94f5095823610485cf3fad45

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, source-aligned test repair with detailed reproducible timeout and hosted-suite evidence.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body includes before/after focused-command output, a fresh-process stress result, full memory-suite results, and a linked Testbox run; this test-only repair has no separate live-product boundary.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body includes before/after focused-command output, a fresh-process stress result, full memory-suite results, and a linked Testbox run; this test-only repair has no separate live-product boundary.
Evidence reviewed 6 items Current main lacks the repair: The index test file is unchanged between the PR base and current main, so current main still returns the unisolated test configuration.
Focused patch: The proposed commit imports the existing helper and wraps only createCfg() in the index test; no production runtime code changes.
Shared-helper contract: The helper preserves an explicit plugins.enabled setting and otherwise sets it to false, isolating implicit discovery without preventing a test from deliberately enabling plugins.
Findings None None.
Security None None.

How this fits together

Memory Core’s index tests build a configuration that flows through memory-search and embedding-provider resolution before exercising SQLite/vector indexing. The shared test helper disables implicit plugin discovery for mocked manager tests while preserving an explicitly configured plugin enablement value.

flowchart LR
  A[Memory index test] --> B[Test configuration]
  B --> C[Isolation helper]
  C --> D[Mock embedding providers]
  D --> E[Memory index manager]
  E --> F[SQLite and vector assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +1. Total +1 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 3 2 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 3 2 +1

Review metrics

Metric Value Why it matters
Production versus test delta production +0, tests +3/-2 The repair changes only test configuration and reuses an existing isolation boundary.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #118640
Summary: This PR is the concrete candidate fix for the linked memory-index test timeout report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Merge the small test-only repair after the remaining required checks complete; retain the shared helper as the canonical boundary for mocked memory-manager configurations.

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

Yes. The PR provides an exact focused command with before/after timings, and current source confirms the affected configuration is the remaining mocked manager setup not passed through the existing isolation helper; this read-only review did not execute tests.

Is this the best way to solve the issue?

Yes. Reusing the existing helper is the narrowest maintainable fix because it matches sibling manager tests and preserves any explicit plugin enablement needed by a test.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 629bf6f2d317.

Labels

Label changes:

  • add P2: The deterministic timeout blocks focused memory-extension verification and slows the memory test workflow, with limited blast radius.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes before/after focused-command output, a fresh-process stress result, full memory-suite results, and a linked Testbox run; this test-only repair has no separate live-product boundary.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes before/after focused-command output, a fresh-process stress result, full memory-suite results, and a linked Testbox run; this test-only repair has no separate live-product boundary.

Label justifications:

  • P2: The deterministic timeout blocks focused memory-extension verification and slows the memory test workflow, with limited blast radius.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body includes before/after focused-command output, a fresh-process stress result, full memory-suite results, and a linked Testbox run; this test-only repair has no separate live-product boundary.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes before/after focused-command output, a fresh-process stress result, full memory-suite results, and a linked Testbox run; this test-only repair has no separate live-product boundary.

Evidence

What I checked:

Likely related people:

  • steipete: Current blame attributes both the reusable test-isolation helper and the affected index-test configuration to Peter Steinberger; this PR carries the focused follow-up. (role: introduced shared helper and recent memory-test contributor; confidence: high; commits: 820cd7c152f7, b9b458d8ed76; files: extensions/memory-core/src/memory/test-config-helpers.ts, extensions/memory-core/src/memory/index.test.ts)

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 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready at b9b458d8ed76a95a94f5095823610485cf3fad45.

  • Root cause: extensions/memory-core/src/memory/index.test.ts supplies mocked embedding providers but its shared createCfg() left implicit plugin discovery enabled, so focused manager tests cold-loaded the runtime plugin registry.
  • Canonical fix: wrap that synthetic config with the existing isolateMemoryManagerTestConfig() test-owner boundary. Explicit plugin enablement remains preserved.
  • Production LOC delta: 0. Test diff: +3/-2 in one file.
  • Red proof on base db7c48478f80c7c492e351c939883ac058173562:
    • node scripts/test-projects.mjs extensions/memory-core/src/memory/index.test.ts -- -t 'does not prepare vector deletes'
    • failed the 240-second timeout; 254.187-second test body and 259.46-second Vitest duration.
  • Green proof on this head:
    • identical focused command: 1/1 passed, 203ms test body, 3.47-second Vitest duration;
    • 10/10 fresh-process stress runs passed at 199–215ms;
    • full changed file: 110/110 passed locally in 39.53 seconds.
  • Blacksmith Testbox tbx_01kz3myagvh0d8dypcyp56nq46, run 30808306622:
    • full memory project: 134/134 files, 1,936/1,936 tests;
    • changed file: 110/110 in 28.174 seconds;
    • repo-native changed gate passed, including extension-test typecheck and focused lint.
  • Fresh autoreview: clean, no accepted/actionable findings.
  • ClawSweeper: 5/6, no findings, proof sufficient, Before merge: None.
  • Exact-head hosted CI: green in run 30809293693.
  • Proof gaps: no external live-product boundary applies to this test-isolation change; the exact focused failure and full hosted memory workflow cover the affected behavior.

@steipete
steipete merged commit f5cb0f2 into main Aug 3, 2026
152 of 159 checks passed
@steipete
steipete deleted the codex/qa-92-memory-lancedb-module-state branch August 3, 2026 11:36
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor 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.

[Bug]: Memory index unit tests load the runtime plugin registry

1 participant