Skip to content

test: measure packages introduced by isolated imports - #7470

Closed
astrogilda wants to merge 1 commit into
google:mainfrom
astrogilda:codex/import-startup-fix-20261009
Closed

astrogilda wants to merge 1 commit into
google:mainfrom
astrogilda:codex/import-startup-fix-20261009

Conversation

@astrogilda

Copy link
Copy Markdown
Contributor

The isolated import checks include modules loaded by Python before the requested import. On Ubuntu's Python 3.12, that attributes sitecustomize to ADK and fails both entry-point allowlist checks.

Capture the full module-name baseline before the statement and measure only names introduced afterward. The controls preload a startup package, then confirm that a new package and a new submodule of that package are still counted. The existing allowlist and absolute unloaded-module checks stay in force.

Validation: 26 import checks pass on Python 3.12 and 3.14. The changed measurement helper has 100% statement coverage against the existing 80% per-file gate. Pyink, isort and compliance checks pass.

copybara-service Bot pushed a commit that referenced this pull request Oct 9, 2026
@adk-bot

adk-bot commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Thank you @astrogilda for your contribution! 🎉

Your changes have been successfully imported and merged via Copybara in commit a4422cd.

Closing this PR as the changes are now in the main branch.

@adk-bot adk-bot added the merged [Status] This PR is merged label Oct 9, 2026
@adk-bot adk-bot closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged [Status] This PR is merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants