Skip to content

Remove unconsumed wright-lpp provider-registry surface - #219

Merged
Teakowa merged 1 commit into
mainfrom
cleanup/wright-lpp-dead-registry-api
Aug 22, 2026
Merged

Remove unconsumed wright-lpp provider-registry surface#219
Teakowa merged 1 commit into
mainfrom
cleanup/wright-lpp-dead-registry-api

Conversation

@Teakowa

@Teakowa Teakowa commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Entropy-audit Risk A cut: four wright-lpp registry 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 the LPP_MOCK_PROVIDER variable via string literal and register the mock provider explicitly through register(). The env-populated registry was dead code advertising a configuration path nothing exercises.
  • ProviderRegistry::get — zero external callers; spawn resolves 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 with RegistryError::DuplicateLanguage, spawn success, explicit NotConfigured refusal with no fallback) are untouched.
  • ProviderConfig::with_request_timeout — the only caller set the same 30 s value ProviderConfig::new already defaults to, i.e. a no-op. The pub request_timeout field remains directly settable for embedders needing a non-default timeout.

SessionConfig.providers' doc comment now describes the LPP_MOCK_PROVIDER variable accurately as a test/CI mechanism instead of pointing at the removed registry API.

Evidence

  • Consumers verified by workspace-wide search before the cut (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).
  • wright-lpp is an internal workspace crate (nothing is published to crates.io), and docs/embedding.md does not list any of these APIs in the stable embedding contract — the documented surface (ProviderRegistry, ProviderConfig, register/spawn flow) is unchanged.
  • After the cut: grep for all four names returns zero hits.

Validation

Run on the branch with an isolated CARGO_TARGET_DIR (the shared local target/ is concurrently contaminated by another worktree's binaries; GitHub CI has no such sharing):

  • cargo fmt --all -- --check — clean
  • cargo clippy --locked --workspace --all-targets --all-features -- -D warnings — clean
  • cargo test --locked --workspace --all-targets --all-features591 passed / 0 failed
  • The mock-provider-dependent suites self-skip locally; CI's LPP client integration (#142, #139) job runs them against the pinned lpp-mock-provider build.

Testing-policy notes

  • No expectation changed: the two removed test usages were a redundant key-listing assertion and a no-op builder call; every surviving observable-contract assertion is unmodified.
  • The surviving registry contract (explicit registration, duplicate refusal, no-fallback refusal) keeps both positive and negative coverage.

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.
@Teakowa
Teakowa merged commit 2d19b90 into main Aug 22, 2026
13 checks passed
@Teakowa
Teakowa deleted the cleanup/wright-lpp-dead-registry-api branch August 22, 2026 17:11
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Make Workshop Great Again Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant