fix: phantom grounding/retrieval exports, headless version/doctor; check all sibling seams#1003
Open
abrichr wants to merge 1 commit into
Open
fix: phantom grounding/retrieval exports, headless version/doctor; check all sibling seams#1003abrichr wants to merge 1 commit into
abrichr wants to merge 1 commit into
Conversation
…eck all sibling seams Extending the #999 guards to every sibling seam the meta-package touches. The extended checks immediately found more live bugs, all fixed here: - openadapt/__init__.py lazy __getattr__ exported Grounder, OmniGrounder, and GeminiGrounder from openadapt-grounding and DemoRetriever/DemoLibrary from openadapt-retrieval. None of these five names exist in those packages; every one always raised. Replaced with the real exports (ElementLocator, OmniParserClient, MultimodalDemoRetriever) and pointed DemoLibrary at openadapt-evals where it actually lives. - `openadapt version` imported each sibling package to read __version__. Importing openadapt-capture takes a screenshot at module scope (recorder.py), which crashes headless environments including CI. Now reads importlib.metadata instead of executing package code. Same fix for `openadapt doctor` (find_spec instead of __import__). - tests/test_import_integrity.py: EXTERNAL_PACKAGES extended from just openadapt_ml to all six sibling packages. - CI installs all six siblings so every seam is checked on every PR. The capture-side import side effect (screenshot at module scope) gets its own fix in openadapt-capture. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the cross-package guards from #1002 to every sibling seam (openadapt-ml, -capture, -evals, -viewer, -grounding, -retrieval). The extended checks immediately found more live bugs, all fixed here:
openadapt/__init__.py:Grounder,OmniGrounder,GeminiGrounder(openadapt-grounding has none of them — its real API isElementLocator/OmniParserClient), andDemoRetriever/DemoLibrary(openadapt-retrieval hasMultimodalDemoRetriever;DemoLibrarylives in openadapt-evals). Every advertised name in__all__always raised. Replaced with the real exports.openadapt versioncrashed in headless environments: it imported each sibling to read__version__, and importing openadapt-capture executes a screenshot at module scope (recorder.py). Now readsimportlib.metadata— no package code executed. Same class of fix fordoctor(find_spec).The capture-side bug (screenshot at import time, which breaks any headless import of openadapt-capture) gets a separate PR in that repo.
Verification: 10/10 tests pass in the clean venv with all siblings installed;
openadapt versionanddoctorverified headless; lazy attrs (DemoLibrary,MultimodalDemoRetriever,ElementLocator,OmniParserClient) all resolve.🤖 Generated with Claude Code