Files
Ran Shem Tov 927ceb7817 fix(showcase): make the Strands stub modules importable as packages
The instrumentor test serves `strands.*` stubs through a meta-path finder,
but the import machinery reads the parent module's `__path__` BEFORE it
consults any finder, so every submodule import died with "'strands' is not
a package" and the finder never ran. It only ever passed because earlier
test modules left `agents.*` cached in `sys.modules`, which skipped the
`from strands... import` lines entirely.

Adding `build_reasoning_agent()` at agent_server import time broke that
accident: its `from strands.models.openai_responses import ...` sits inside
the function body, so module caching cannot hide it and the whole suite
went red.

Give the three package-like stubs (`strands`, `strands.models`,
`strands.types`) an empty `__path__` so the finder is reached, and drop the
stub entries from `sys.modules` afterwards so the real-package probe later
in the file does not inherit a `strands` whose empty `__path__` hides the
installed submodules.

Suite is now green both as a whole and file by file, which it was not
before on either this branch or main.
2026-09-04 23:37:03 +02:00
..