Skip to content

fix(cli-smoke): add missing count() mock method (Issue #596)#609

Merged
rwmjhb merged 1 commit intoCortexReach:masterfrom
jlin53882:fix/issue-596-cli-smoke-mock-count
Apr 15, 2026
Merged

fix(cli-smoke): add missing count() mock method (Issue #596)#609
rwmjhb merged 1 commit intoCortexReach:masterfrom
jlin53882:fix/issue-596-cli-smoke-mock-count

Conversation

@jlin53882
Copy link
Copy Markdown
Contributor

@jlin53882 jlin53882 commented Apr 14, 2026

Summary

The CLI smoke test (test/cli-smoke.mjs) mock store was missing the async count() method that the real store interface provides. This caused the assertion at line ~316 to fail with undefined !== 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 in test/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

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.
@rwmjhb rwmjhb merged commit 9e552a1 into CortexReach:master Apr 15, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants