Skip to content

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

Open
Slai.life (huong8373tt-beep) wants to merge 2 commits into
microsoft:mainfrom
huong8373tt-beep:fix/initializer-single-file-static-discovery-p31120
Open

Slai.life (huong8373tt-beep) wants to merge 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.

Comment thread pyrit/registry/components/initializer_registry.py

This branch has not been deployed

No deployments
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