test(context): add fidelity provider wiring assertions in apply_session_config#5038
Merged
Conversation
…on_config Adds `apply_session_config_wires_fidelity_providers` to the builder test suite. Covers three branches of the wiring path (builder.rs:2240-2254): - Non-empty provider names → `fidelity_semantic_provider` and `fidelity_compress_provider` are both `Some` after `apply_session_config`. - Empty provider names → both fields are `None`. - Absent `fidelity_config` → both fields are `None`. Both fields are asserted independently so a partial regression (one field unwired) is caught immediately. Closes #5035
bug-ops
enabled auto-merge (squash)
June 7, 2026 17:54
bug-ops
added a commit
that referenced
this pull request
Jun 7, 2026
- Remove redundant apply_session_config_fidelity_providers_none_when_not_configured (exact duplicate of the absent-config sub-case already covered in the pre-existing apply_session_config_wires_fidelity_providers test from PR #5038) - Add fidelity_compress_provider fallback assertion in the unregistered-name branch of apply_session_config_wires_fidelity_providers_registry_lookup for symmetric coverage of both provider fields
3 tasks
bug-ops
added a commit
that referenced
this pull request
Jun 7, 2026
…5042) * test(core): add fidelity provider wiring tests for #5037 and #5039 Add three tests to agent::builder::tests covering apply_session_config fidelity provider wiring: - apply_session_config_wires_fidelity_providers: asserts both fidelity_semantic_provider and fidelity_compress_provider are Some for non-empty names, None for empty names, and None when fidelity_config is absent. - apply_session_config_fidelity_providers_none_when_not_configured: explicit standalone coverage for the fidelity_config: None path. - apply_session_config_wires_fidelity_providers_registry_lookup: verifies resolve_background_provider performs a registry lookup — registers an Ollama entry "named-test" in provider_pool, asserts the resolved provider is name()=="ollama" with the expected model, and confirms an unregistered name falls back to the Mock primary. Closes #5037, closes #5039 * test(context): apply review fixes to fidelity provider tests - Remove redundant apply_session_config_fidelity_providers_none_when_not_configured (exact duplicate of the absent-config sub-case already covered in the pre-existing apply_session_config_wires_fidelity_providers test from PR #5038) - Add fidelity_compress_provider fallback assertion in the unregistered-name branch of apply_session_config_wires_fidelity_providers_registry_lookup for symmetric coverage of both provider fields
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
Closes #5035
Adds
apply_session_config_wires_fidelity_providersto thezeph-corebuilder test suite. The test covers all three control-flow branches of the fidelity provider wiring path (builder.rs:2240-2254):FidelityConfig::semantic_scoring_provider/compress_providernames →compaction.fidelity_semantic_providerandcompaction.fidelity_compress_providerare bothSomeafterapply_session_config.None.FidelityConfig→ both fields areNone.Both fields are asserted independently so a partial regression (one field unwired while the other is not) is caught immediately.
Coverage scope: this test verifies Option-guard and field-wiring correctness. It does not assert end-to-end provider registry resolution (that path is a follow-up, see below).
Test plan
cargo nextest run -p zeph-core -E 'test(apply_session_config)'— 3/3 passcargo nextest run -p zeph-core— 1547/1547 pass, 0 regressionscargo +nightly fmt --check— cleancargo clippy -p zeph-core -- -D warnings— cleanFollow-up
The impl-critic identified that
resolve_background_provideralways returns a provider (neverNone), soSome(_)confirms the non-empty filter fired but not that the named provider was resolved from the pool. A separate P3 issue will cover end-to-end registry resolution coverage forarise.rs.