Skip to content

test(memory): add unit tests for deep_reasoning_query_conditioned flag in retrieve_tier #4724

@bug-ops

Description

@bug-ops

Description

TieredRetrievalConfig::deep_reasoning_query_conditioned (added in #3994) has no unit test coverage. The flag gates whether IntentClass::DeepReasoning routes through recall_graph_hela (HELA spreading activation) instead of recall_routed. The code path exists in tiered_retrieval.rs:277 but is never exercised in the test suite.

Reproduction Steps

  1. Search test suite for deep_reasoning_query_conditioned: 0 tests found
  2. The branch at tiered_retrieval.rs:277 (HELA routing for DeepReasoning) is dead code from a testing perspective

Expected Behavior

Two unit tests using mock_semantic_memory():

  • deep_reasoning_query_conditioned_true_falls_back_when_hela_empty — verifies graceful fallback when HELA returns no results (empty in-memory graph)
  • deep_reasoning_query_conditioned_false_skips_hela — verifies direct recall_routed path when flag is false

Both tests were prototyped in CI-944 and confirmed PASS (1447 total zeph-memory tests), but per CI-read-only constraint must be added via a proper PR.

Actual Behavior

0 tests cover deep_reasoning_query_conditioned. HELA routing branch is not exercised.

Environment

  • Version: 0.21.3 (HEAD 07f96ae)
  • Features: default

Logs / Evidence

CI-944 prototype test results (reverted per read-only CI rule):

PASS zeph-memory tiered_retrieval::tests::deep_reasoning_query_conditioned_true_falls_back_when_hela_empty
PASS zeph-memory tiered_retrieval::tests::deep_reasoning_query_conditioned_false_skips_hela
Summary 2 tests run: 2 passed

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Research — medium-high complexitymemoryzeph-memory crate (SQLite)testsTest-related changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions