Skip to content

fix(integrations): restore public re-exports on deprecated stub __init__ - #2970

Merged
Imran Siddique (imran-siddique) merged 1 commit into
mainfrom
fix/integration-tests-stub-reexports
Jun 11, 2026
Merged

Imran Siddique (imran-siddique) merged 1 commit into
mainfrom
fix/integration-tests-stub-reexports

Conversation

@imran-siddique

Copy link
Copy Markdown
Collaborator

Problem

The test-integrations CI legs for crewai-agentmesh, langchain-agentmesh, and openai-agents-agentmesh fail at pytest collection on every PR (including PR #2868), with:

  • ImportError: cannot import name 'AgentProfile' from 'crewai_agentmesh'
  • ImportError: cannot import name 'AgentDirectory' from 'langchain_agentmesh'
  • ImportError: cannot import name 'AgentTrustContext' from 'openai_agents_agentmesh'

This is pre-existing breakage on main (confirmed: the same three jobs fail on the latest completed main CI run), independent of any PR branch.

Root cause

The stub conversion in #2794 replaced the top-level __init__.py of these three packages with a bare DeprecationWarning, dropping the re-exports of the public trust-layer symbols. The implementation modules (trust.py, identity.py, tools.py, callbacks.py) were left in place and are still shipped (packages = ["<pkg>"]), but the symbols were no longer importable from the package root.

Each package's test suite — and any downstream code doing from <pkg> import AgentProfile / AgentDirectory / AgentTrustContext — therefore fails to import.

Fix

Restore the original re-export blocks (keeping the new DeprecationWarning at the top of each file). No behavior change beyond re-exposing the existing, already-shipped symbols. The stale __version__ = "3.2.2" from the old langchain __init__ is intentionally not restored (the package is now 4.x).

Verification

Local pytest passes for all three packages:

  • crewai-agentmesh: 34 passed
  • openai-agents-agentmesh: 23 passed
  • langchain-agentmesh: 51 passed

Out of scope

The haystack-agentmesh integration job also fails, but for an unrelated reason (AttributeError: '_Component' object has no attribute 'input_types' — governance.py uses a @component.input_types(...) decorator that haystack-ai never exposed). That requires a source-code change, not a re-export, and is filed separately.

🤖 Generated with Claude Code

The stub conversion in #2794 replaced the top-level __init__.py of the
crewai-agentmesh, agentmesh-langchain, and openai-agents-agentmesh
packages with a bare DeprecationWarning, dropping the re-exports of the
public trust-layer symbols. The implementation modules (trust.py,
identity.py, tools.py, callbacks.py) were left in place and still
shipped, but the symbols were no longer importable from the package
root.

Each package's test suite (and any downstream code) still does
`from <pkg> import AgentProfile / AgentDirectory / AgentTrustContext`,
so the test-integrations CI legs failed at collection with
ImportError on every PR (pre-existing on main, independent of base.py).

Restore the original re-export blocks (keeping the new
DeprecationWarning at the top) so the package root again exposes the
public API. No behavior change beyond re-exposing the existing symbols.

Verified locally: pytest passes for all three packages
(crewai 34, openai-agents 23, langchain 51).

Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions github-actions Bot added the size/M Medium PR (< 200 lines) label Jun 11, 2026
@imran-siddique
Imran Siddique (imran-siddique) merged commit 3401453 into main Jun 11, 2026
102 of 106 checks passed
@imran-siddique
Imran Siddique (imran-siddique) deleted the fix/integration-tests-stub-reexports branch June 11, 2026 19:10
@github-actions

Copy link
Copy Markdown

PR Review Summary

Check Status Details
🔍 Code Review ⚠️ Missing No current-run comment
🛡️ Security Scan ⚠️ Missing No current-run comment
🔄 Breaking Changes ⚠️ Missing No current-run comment
📝 Docs Sync ⚠️ Missing No current-run comment
🧪 Test Coverage ⚠️ Missing No current-run comment

Verdict: ⚠️ AI review incomplete; ready for human review

AI review comments are untrusted advisory output. The summary reports workflow-generated completion status only, not model-authored pass/fail claims.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant