Skip to content

fix(lazy-deps): detect active features by primary package - #58652

Closed
tianma-if wants to merge 1 commit into
NousResearch:mainfrom
tianma-if:codex/fix-lazy-deps-active-features
Closed

fix(lazy-deps): detect active features by primary package#58652
tianma-if wants to merge 1 commit into
NousResearch:mainfrom
tianma-if:codex/fix-lazy-deps-active-features

Conversation

@tianma-if

Copy link
Copy Markdown
Contributor

Summary

  • treat a lazy feature as active only when its first, backend-identifying package is installed
  • prevent shared transitive pins such as aiohttp from marking Slack, Matrix, Discord, or Teams active
  • update active feature regression coverage for the primary-package contract

Fixes #58458.

Tests

  • .venv/bin/python -m pytest tests/tools/test_lazy_deps.py -q
  • .venv/bin/python -m ruff check tools/lazy_deps.py tests/tools/test_lazy_deps.py

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows duplicate This issue or pull request already exists labels Jul 5, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #54178 — same code site (active_features in tools/lazy_deps.py) and same mechanism: gate activation on the primary/signature package rather than any declared spec, so a shared transitive pin (e.g. aiohttp) no longer false-activates never-enabled backends. #54178 is the earliest open canonical fix; the closed #58488 was the same fix. Relates to issue #58458.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused regression fix. The premise remains live on current main: tools/lazy_deps.py:870 still activates a feature when any declared spec is present, while platform.matrix retains secondary aiohttp==3.14.1 at tools/lazy_deps.py:175-184. The proposed primary-package condition prevents that shared pin from falsely activating Matrix and the other covered backends.

The change is isolated to the update-refresh detection heuristic and its regression coverage. The related marker-package implementation in ac4a9c681bd7fc85d2b1f211ad7a8caf42d2ddbf is not on current main; it does not supersede this PR.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 15, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Fixed on main by #72361 — primary/anchor-package activation, same approach as this PR. #27878 by @paralegalia was the earliest submission (May 18) so it got the salvage credit. Thanks @tianma-if.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lazy_deps: shared aiohttp pin marks never-enabled backends active; matrix refresh then fails on Windows (python-olm needs make)

3 participants