Repository navigation
refactor(memory): consolidate host process fixtures - #118160
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 3:57 PM ET / 19:57 UTC. ClawSweeper reviewWhat this changesThe 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 readinessKeep 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 Priority: P3 Review scores
Verification
How this fits togetherThe 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]
Decision needed
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
Agent review detailsSecurityNone. PR surfaceTests -267. Total -267 across 3 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper rank-up move completed: the exact-head check rollup is now final and |
|
Merged via squash.
|
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
+194/-461(net-267); production LOC0.expectcalls retained.packages/memory-host-sdksuite 136/136 passed, including real QMD subprocess coverage;pnpm check:changedpassed;pnpm buildpassed.node-llama-cppv3.19.1 source and current QMD source.