fix(cli-smoke): add missing count() mock method (Issue #596)#609
Merged
rwmjhb merged 1 commit intoCortexReach:masterfrom Apr 15, 2026
Merged
Conversation
The mock store in cli-smoke.mjs was missing the async count() method that the real store interface provides. This caused the assertion at line ~316 to fail with undefined !== 1 when recallResult.details.count was accessed. This is a pre-existing issue introduced by the lifecycle-aware memory decay commit, not related to PR CortexReach#516.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The CLI smoke test (
test/cli-smoke.mjs) mock store was missing theasync count()method that the real store interface provides. This caused the assertion at line ~316 to fail withundefined !== 1.Root cause
When the lifecycle-aware memory decay feature added
count()to the real store interface (commit 6e5f569), the test mock was never updated.Fix
Add
async count() { return 1; }to the mock store intest/cli-smoke.mjs.Relation to other PRs
This failure was observed during CI for PR #516 but is not caused by PR #516 — it is a pre-existing gap in test coverage.
See also: Issue #596