ci: isolation install-check + fix lite-bootstrap[litestar] import#159
Merged
Conversation
Add a CI job installing each extra in isolation and importing lite_bootstrap (the --all-extras suite masks undeclared transitive deps), and fix the litestar bug it found: litestar.plugins.prometheus is imported under is_litestar_installed but needs prometheus_client, so lite-bootstrap[litestar] crashed on import. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lient litestar_bootstrapper imported litestar.plugins.prometheus (which imports prometheus_client) under the is_litestar_installed guard, but the `litestar` extra does not install prometheus-client — only `litestar-metrics` does. So `pip install lite-bootstrap[litestar]` + `import lite_bootstrap` crashed with litestar's MissingDependencyException. Guard the import on prometheus_client too; its only uses are inside the metrics instrument, already gated on that package. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The existing suite only installs --all-extras, so an extra that imports an undeclared package passes CI while breaking a real single-extra install (shipped twice: the bare-core typing_extensions crash and litestar/prometheus). Add a job that, per extra, installs .[extra] into a clean venv and imports lite_bootstrap, failing with the full list of any that break. Python 3.10 (the floor). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
The bare-core
typing_extensionscrash (1.3.1) exposed that CI only ever installs--all-extras— so an extra that imports a package it doesn't declare passes CI while breaking a real single-extra install. A per-extra isolation sweep confirmed a second instance of this class and motivates a systemic guard.Full rationale:
planning/changes/2026-07-19.04-extra-isolation-install-check.md.What changed
lite-bootstrap[litestar]crashing on import.litestar_bootstrapper.pyimportedlitestar.plugins.prometheus(which importsprometheus_client) under theis_litestar_installedguard, but thelitestarextra doesn't install prometheus-client — onlylitestar-metricsdoes. Sopip install lite-bootstrap[litestar]; import lite_bootstrapraised litestar'sMissingDependencyException. The import is now guarded byprometheus_clienttoo (its only uses are inside the metrics instrument, already gated on that package). Ships as 1.3.2.install-isolationCI job. For bare core + each of the 28 extras: clean venv →uv pip install .[extra]→import lite_bootstrap, on Python 3.10 (the floor). Collects all failures and fails listing them (set +eso an inherited errexit can't abort the loop early). A parity check pins the job's extras list topyproject.toml.Testing
sys.moduleseviction so it genuinely reproduces);just test216 passed, 100% coverage;just lint-ciclean.🤖 Generated with Claude Code