Problem
BundleOrchestrator::generate_requirements scans every import item in every sorted module and classifies it as third-party. It does not consume tree-shaking liveness and explicitly ignores the is_type_checking_only metadata already produced by ImportDiscoveryVisitor.
Consequently, imports under if TYPE_CHECKING: and imports referenced only by removed code are emitted into requirements.txt even though the bundle does not require them at runtime.
Impact
Generated requirements overstate runtime dependencies and can force installation of optional, platform-specific, or type-checker-only packages. The same behavior would make the planned dependency analyzer report false positives.
Import-name to distribution-name mapping is a separate concern already tracked by #141.
Problem
BundleOrchestrator::generate_requirementsscans every import item in every sorted module and classifies it as third-party. It does not consume tree-shaking liveness and explicitly ignores theis_type_checking_onlymetadata already produced byImportDiscoveryVisitor.Consequently, imports under
if TYPE_CHECKING:and imports referenced only by removed code are emitted intorequirements.txteven though the bundle does not require them at runtime.Impact
Generated requirements overstate runtime dependencies and can force installation of optional, platform-specific, or type-checker-only packages. The same behavior would make the planned dependency analyzer report false positives.
Import-name to distribution-name mapping is a separate concern already tracked by #141.