You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ai): skip private submodules and __main__ during package introspection #84
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
When running devops ai ingest library <package> on packages with executable __main__.py entrypoints (such as typer), _discover_submodules() uses pkgutil.iter_modules() and unconditionally imports every discovered submodule, including <package>.__main__. Importing __main__.py executes CLI entrypoints against current sys.argv, causing subprocess crash (Could not import as Python module: ai).
Steps to Reproduce
devops ai ingest library typer
Root Cause Analysis
_discover_submodules() in src/devops_cli/ai/library/introspector.py does not filter out private submodules or __main__ before calling importlib.import_module(sub_name).
Proposed Solution
Filter out any submodule where the leaf module name starts with _ (including __main__, _vendor, _internal). Add regression test in tests/test_library_vector_tier.py or dedicated introspector test.
Resolved in commit 841fd80 on branch release/v0.2.14. Private submodules and __main__ modules are now safely skipped during discovery in _discover_submodules(), preventing CLI execution hazards during package introspection.
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/aiAI review pipeline, personas, prompts, LLM client, or RAGtype/bugType bug: the code does not do what it must
Activity
feat(ai): add ast prompt grounding and fastmcp library intelligence t…
dan-petty commentedon Sep 9, 2026
Resolved in commit 841fd80 on branch release/v0.2.14. Private submodules and
__main__modules are now safely skipped during discovery in_discover_submodules(), preventing CLI execution hazards during package introspection.feat(release): v0.2.14 (#86)