Issue: cli-smoke test — store mock missing count() method
Problem
The cli-smoke.mjs test defines a mock store object in the brokenContext block (around line 301):
store: {
async patchMetadata() {},
},
This mock is missing an async count() { return 1; } method. When the code under test calls store.count(), it receives undefined instead of a number, causing the assertion at line 316 to fail:
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
undefined !== 1
When it fails
The failure manifests in CI when the test code path calls recallResult.details.count. This is a pre-existing issue introduced by commit 6e5f569 ("feat: Implement lifecycle-aware memory decay...").
Root cause
The store.count() method was added to the real store interface but the test mock was never updated to include it.
Suggested fix
Add count() to the mock store in test/cli-smoke.mjs:
store: {
async patchMetadata() {},
async count() { return 1; },
},
Linked PR
Related to PR #516 — the CLI smoke test failure was observed during CI runs for PR #516, but it is NOT caused by PR #516's changes.
Issue: cli-smoke test — store mock missing
count()methodProblem
The
cli-smoke.mjstest defines a mockstoreobject in thebrokenContextblock (around line 301):This mock is missing an
async count() { return 1; }method. When the code under test callsstore.count(), it receivesundefinedinstead of a number, causing the assertion at line 316 to fail:When it fails
The failure manifests in CI when the test code path calls
recallResult.details.count. This is a pre-existing issue introduced by commit6e5f569("feat: Implement lifecycle-aware memory decay...").Root cause
The
store.count()method was added to the real store interface but the test mock was never updated to include it.Suggested fix
Add
count()to the mock store intest/cli-smoke.mjs:Linked PR
Related to PR #516 — the CLI smoke test failure was observed during CI runs for PR #516, but it is NOT caused by PR #516's changes.