Skip to content

refactor(memory): consolidate host process fixtures - #118160

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-memory-host-fixture-wave19-2d45
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-memory-host-fixture-wave19-2d45

Conversation

@steipete

@steipete steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The memory-host embedding and QMD process tests repeated large option bags and hand-built worker child-process fixtures, making lifecycle and subprocess coverage harder to audit and maintain.

Why This Change Was Made

Consolidates the repeated local-provider options, worker child behavior, failed-kill behavior, and QMD command defaults at the owning memory-host test boundary. Specialized event ordering, vector dimensions, abort/cleanup paths, POSIX/Windows termination behavior, timeouts, stream errors, and output caps remain explicit in each case.

No production code, public exports, configuration, schema, or i18n surface changes.

User Impact

No user-visible behavior change. The same memory-host contracts are covered with 267 fewer test lines and a single canonical fixture shape.

Evidence

  • Diff: 3 test files, +194/-461 (net -267); production LOC 0.
  • Parity: exact test names/order preserved; 59 declarations / 60 expanded cases and all 175 expect calls retained.
  • Focused exact-head proof: 60/60 passed across embedding provider, worker lifecycle, and QMD process tests.
  • Blacksmith Testbox exact-head proof: full packages/memory-host-sdk suite 136/136 passed, including real QMD subprocess coverage; pnpm check:changed passed; pnpm build passed.
  • Remote proof: https://github.com/openclaw/openclaw/actions/runs/30763942412
  • Dependency contracts inspected against node-llama-cpp v3.19.1 source and current QMD source.

@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Aug 2, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 3:57 PM ET / 19:57 UTC.

ClawSweeper review

What this changes

The PR replaces repeated local-embedding options, mocked worker-child setup, and QMD command inputs with shared helpers in three memory-host SDK test files.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for normal maintainer handling: the inspected patch is a focused, production-neutral test-fixture consolidation with no discrete correctness or security defect found, but it carries the protected maintainer label and the exact-head check rollup is still incomplete.

Priority: P3
Reviewed head: 87559a9f10bead2b599808dc900cb23448dd3bfd
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-supported test refactor with no concrete defect found; final merge readiness depends on completion of the current exact-head checks.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The PR provides exact-head focused and full-suite proof, including real QMD subprocess coverage, and the supplied check context records successful real-behavior proof; no private runtime data is needed for this test-only refactor.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The PR provides exact-head focused and full-suite proof, including real QMD subprocess coverage, and the supplied check context records successful real-behavior proof; no private runtime data is needed for this test-only refactor.
Evidence reviewed 7 items Focused patch scope: The submitted commit changes exactly three colocated memory-host test files, with 194 additions and 461 deletions; no production, dependency, workflow, config, schema, or public API file is changed.
Worker fixture preserves explicit lifecycle cases: The new worker fixture supplies the prior default asynchronous reply and close behavior while keeping the queued-abort, failed-kill, initialization-failure, and specialized message ordering cases explicit at their call sites.
QMD helper retains the production command contract: The shared QMD helper preserves the command summary, executable, argv, environment, working directory, and 10,000-character default cap; individual tests still override timeout or output-cap inputs where that distinction is under test.
Findings None None.
Security None None.

How this fits together

The memory-host SDK starts local embedding workers and QMD subprocesses for memory operations. Its tests simulate child-process messages, termination, and command output so lifecycle and error behavior remain covered as implementation details are refactored.

flowchart LR
  A[Memory-host tests] --> B[Shared fixture helpers]
  B --> C[Worker and QMD mocks]
  C --> D[Embedding and process runtime]
  D --> E[Lifecycle and error assertions]
Loading

Decision needed

Question Recommendation
Should this protected maintainer-labeled test refactor be accepted once the remaining exact-head checks finish? Complete checks, then merge: Confirm the remaining exact-head checks finish successfully and merge the focused test-only cleanup.

Why: The code review found no mechanical defect, but repository policy requires explicit maintainer handling for protected-label work and the current check rollup is not final.

Before merge

  • Resolve merge risk (P1) - The supplied exact-head check rollup is still incomplete, so a maintainer should wait for the pending checks and confirm the final status before merging.
Agent review details

Security

None.

PR surface

Tests -267. Total -267 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 194 461 -267
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 194 461 -267

Review metrics

None.

Stored data model

Persistent data-model change detected: unknown-data-model-change: packages/memory-host-sdk/src/host/embeddings-worker.lifecycle.test.ts, unknown-data-model-change: packages/memory-host-sdk/src/host/embeddings.test.ts, unknown-data-model-change: packages/memory-host-sdk/src/host/qmd-process.test.ts, vector/embedding metadata: packages/memory-host-sdk/src/host/embeddings-worker.lifecycle.test.ts, vector/embedding metadata: packages/memory-host-sdk/src/host/qmd-process.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the local fixture helpers and preserve the explicit per-test lifecycle, platform, timeout, stream-error, and output-cap overrides; merge only after the current exact-head check rollup completes cleanly.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the local fixture helpers and preserve the explicit per-test lifecycle, platform, timeout, stream-error, and output-cap overrides; merge only after the current exact-head check rollup completes cleanly.

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

Not applicable: this PR refactors test setup rather than addressing a reported product failure. The relevant behavioral contracts are represented by the existing memory-host worker and QMD test cases.

Is this the best way to solve the issue?

Yes: extracting repeated defaults at each owning test boundary reduces duplication while preserving specialized behavior as explicit per-test overrides; no production abstraction or parallel fixture layer is introduced.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 254ab826f1e3.

Labels

Label changes:

  • add P3: This is a production-neutral test-maintenance cleanup with no reported user-facing regression.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR provides exact-head focused and full-suite proof, including real QMD subprocess coverage, and the supplied check context records successful real-behavior proof; no private runtime data is needed for this test-only refactor.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR provides exact-head focused and full-suite proof, including real QMD subprocess coverage, and the supplied check context records successful real-behavior proof; no private runtime data is needed for this test-only refactor.

Label justifications:

  • P3: This is a production-neutral test-maintenance cleanup with no reported user-facing regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR provides exact-head focused and full-suite proof, including real QMD subprocess coverage, and the supplied check context records successful real-behavior proof; no private runtime data is needed for this test-only refactor.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR provides exact-head focused and full-suite proof, including real QMD subprocess coverage, and the supplied check context records successful real-behavior proof; no private runtime data is needed for this test-only refactor.

Evidence

What I checked:

Likely related people:

  • Shakker: Current history attributes the initial memory-host worker, embedding, QMD process implementations, and their test suites to the same commit. (role: feature introducer and recent area contributor; confidence: high; commits: 040e0f5a6eff; files: packages/memory-host-sdk/src/host/embeddings-worker.ts, packages/memory-host-sdk/src/host/embeddings.ts, packages/memory-host-sdk/src/host/qmd-process.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let the pending exact-head checks finish and confirm their final status before merging.

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 2, 2026

Copy link
Copy Markdown
Contributor Author

ClawSweeper rank-up move completed: the exact-head check rollup is now final and openclaw/ci-gate passed on SHA 87559a9f10bead2b599808dc900cb23448dd3bfd (run). The initial SQLite flip-proof failure was reproduced successfully on the exact head in an isolated Testbox and then passed on the hosted retry; no gate was weakened. The stored-data-model note is a path/content heuristic false positive: this PR changes only three test files and has no production schema, migration, config, persistence, or public API delta. Maintainer acceptance remains the intended owner decision.

@steipete
steipete merged commit b695c65 into main Aug 2, 2026
196 of 206 checks passed
@steipete
steipete deleted the codex/goal100k-memory-host-fixture-wave19-2d45 branch August 2, 2026 20:19
@steipete

steipete commented Aug 2, 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

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

1 participant