Remove unconsumed wright-lpp provider-registry surface - #219
Merged
Conversation
Entropy-audit cut (Risk A): four wright-lpp registry APIs had no production or external consumers. - ProviderRegistry::from_env and the LPP_MOCK_PROVIDER_ENV const: zero callers anywhere. The doc comment called it 'the integration-test/CI hook', but tests and CI read the LPP_MOCK_PROVIDER variable directly and register the mock provider explicitly, so the env-populated registry was dead code advertising a configuration path that nothing uses. - ProviderRegistry::get: zero external callers; spawn resolves configs through the internal map directly. - ProviderRegistry::languages: only wright-lpp's own test asserted it; the registry-lifecycle protections (duplicate refusal, spawn, not-configured refusal) are unchanged. - ProviderConfig::with_request_timeout: the only caller set the same 30s value ProviderConfig::new already defaults to. The pub request_timeout field remains settable for embedders that need a non-default timeout. The registry's remaining surface (new/register/spawn) is exactly what the driver session, ToolService flow, and integration tests consume. SessionConfig's doc comment now describes the env hook accurately as a test/CI mechanism rather than pointing at the removed API.
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
Entropy-audit Risk A cut: four
wright-lppregistry APIs had no production, embedding, or external consumers. This removes them end to end.ProviderRegistry::from_env+LPP_MOCK_PROVIDER_ENV— zero callers anywhere in the workspace. Its doc comment called it "the integration-test/CI hook", but every test suite (wright-lpp/tests/mock_provider.rs,wright-driver/tests/{lpp,provider_edit}.rs) and the CI job read theLPP_MOCK_PROVIDERvariable via string literal and register the mock provider explicitly throughregister(). The env-populated registry was dead code advertising a configuration path nothing exercises.ProviderRegistry::get— zero external callers;spawnresolves through the internal map directly.ProviderRegistry::languages— the only reference was the crate's own test asserting the registered keys; removed with that assertion. The registry-lifecycle protections that matter (duplicate refusal withRegistryError::DuplicateLanguage, spawn success, explicitNotConfiguredrefusal with no fallback) are untouched.ProviderConfig::with_request_timeout— the only caller set the same 30 s valueProviderConfig::newalready defaults to, i.e. a no-op. Thepub request_timeoutfield remains directly settable for embedders needing a non-default timeout.SessionConfig.providers' doc comment now describes theLPP_MOCK_PROVIDERvariable accurately as a test/CI mechanism instead of pointing at the removed registry API.Evidence
from_env,get,languages,with_request_timeout,LPP_MOCK_PROVIDER_ENV: zero references outside their own definitions and the two self-test usages removed here).docs/embedding.mddoes not list any of these APIs in the stable embedding contract — the documented surface (ProviderRegistry,ProviderConfig, register/spawn flow) is unchanged.grepfor all four names returns zero hits.Validation
Run on the branch with an isolated
CARGO_TARGET_DIR(the shared localtarget/is concurrently contaminated by another worktree's binaries; GitHub CI has no such sharing):cargo fmt --all -- --check— cleancargo clippy --locked --workspace --all-targets --all-features -- -D warnings— cleancargo test --locked --workspace --all-targets --all-features— 591 passed / 0 failedLPP client integration (#142, #139)job runs them against the pinnedlpp-mock-providerbuild.Testing-policy notes