Skip to content

fix(tests): subgoal_extraction_tests module missing #[cfg(feature = "context-compression")] gate #2067

@bug-ops

Description

@bug-ops

Problem

Introduced in PR #2066. The test module subgoal_extraction_tests in
crates/zeph-core/src/agent/context/summarization.rs (line 3520) calls
parse_subgoal_extraction_response() which is gated with
#[cfg(feature = "context-compression")] (line 3466).

However, the test module itself has no feature gate, causing a compilation
error when running tests without --features full:

error[E0425]: cannot find function `parse_subgoal_extraction_response` in this scope
   --> crates/zeph-core/src/agent/context/summarization.rs:3527:22

Reproduction

cargo nextest run --config-file .github/nextest.toml --workspace --lib --bins
# Fails with E0425

Expected

Tests should compile cleanly regardless of feature set. The fix is to add
#[cfg(feature = "context-compression")] to the subgoal_extraction_tests module.

Verified broken on

main @ bc1dd9c5 (PR #2066)

Fix

#[cfg(test)]
#[cfg(feature = "context-compression")]
mod subgoal_extraction_tests {
    ...
}

Severity: Medium (CI passes with --features full, but bare cargo test fails)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions