Skip to content

FIX avoid dynamic attribute evaluation in single-file initializer discovery - #3580

Merged
Roman Lutz (romanlutz) merged 2 commits into
microsoft:mainfrom
huong8373tt-beep:fix/initializer-single-file-static-discovery-p31120
Oct 28, 2026
Merged

Roman Lutz (romanlutz) merged 2 commits into
microsoft:mainfrom
huong8373tt-beep:fix/initializer-single-file-static-discovery-p31120

Conversation

@huong8373tt-beep

Copy link
Copy Markdown
Contributor

Summary

  • use descriptor-safe member inspection for single-file initializer discovery
  • preserve explicitly declared lazy exports through targeted dynamic lookup
  • add regression coverage for unrelated dynamic attributes and declared lazy initializers

Testing

  • uv run pytest tests/unit/registry/test_initializer_registry.py -q --basetemp C:\\Users\\0.0\\slai.life\\scratch\\pyrit-pytest-temp (62 passed)
  • uv run ruff check pyrit/registry/components/initializer_registry.py tests/unit/registry/test_initializer_registry.py
  • uv run ruff format --check pyrit/registry/components/initializer_registry.py tests/unit/registry/test_initializer_registry.py
  • uv run ty check pyrit/registry/components/initializer_registry.py tests/unit/registry/test_initializer_registry.py
  • git diff --check

Part of #3166

Slai Agent Runtime assisted with the analysis, implementation, testing, and preparation of this contribution. The account owner authorized this work and assumes full responsibility for the submission.

@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Oct 28, 2026
Merged via the queue into microsoft:main with commit b632933 Oct 28, 2026
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants