refactor(deps): isolate optional dependency environments - #336
Conversation
Update Python and frontend dependency locks to patched compatible versions while preserving the CrewAI and DSPy example integrations. Repair the unsatisfiable DSPy optional dependency range and document the remaining upstream advisories in the pull request.
Stop bundling CrewAI while every available ChromaDB release remains affected by critical and high vulnerabilities. Upgrade DSPy to its patched 3.x line, select fixed JSON Repair, and raise the LangChain Core minimum. The CrewAI gallery source remains available for explicit framework installs.
Keep published ASSERT metadata focused on runtime product features. Move framework examples and optional script tools into adjacent requirements files, split local embeddings from lightweight analysis, and update setup documentation and CI to use the new ownership boundaries.
Keep fresh pip installs on the 0.3 ACS Generator API used by ASSERT. Version 0.4 removes GenerationEngine and breaks ACS test collection.
Keep the pip dev extra and uv development group equivalent while removing the Phoenix server stack from general regression tests. Install tracing explicitly in the travel-planner devcontainer and science gate, whose clean-environment imports and focused tests pass.
Explain that the travel planner owns LangGraph, LangChain Core, and its model adapter, while ASSERT owns the tracing extra. This preserves the existing golden path without presenting agent frameworks as ASSERT package features.
Drop the unused langchain-azure-ai hosting extra from Bank Manager and document the direct prerelease declaration required for uv resolution. Keep hosting only in the Foundry-hosted example.
Jake Present (jakepresent)
left a comment
There was a problem hiding this comment.
Two blockers on exact head ed539e3:
-
The documented Bank Manager install leaves an incompatible environment. I ran the README sequence in a clean Python 3.11 venv:
python -m pip install -e ".[acs,otel]" python -m pip install -r examples/bank_manager_agent_control/requirements.txt python -m pip checkBoth install commands exit successfully, but
pip checkfails becauselangchain-azure-ai>=1.2.4pullsazure-ai-projects 2.5.0, which requiresopenai>=3.0.0, while the installedlitellm 1.98.0requiresopenai>=2.20.0,<3.0.0. The resulting environment hasopenai 3.5.0and is inconsistent. This contradicts the PR's requirements-resolution claim and can fail after an apparently successful setup. Please use a compatible version set or isolate that provider path, and add a required clean-venv test of the documented two-step install followed bypip check. -
The package silently removes existing public extras without a compatibility or release migration. The built wheel no longer provides
langgraph,dspy,examples, orregression, and it changes the meaning ofall, whileCHANGELOG.mdhas no Unreleased entry. A cleanpip install -e ".[langgraph]"exits 0 withWARNING: assert-ai 0.2.0 does not provide the extra 'langgraph', then leaveslanggraphuninstalled. Existing setup automation can therefore report a successful install and fail later at import time. Please either preserve safe compatibility aliases for a transition or make this an explicit breaking release change with the appropriate version/migration and changelog treatment. The vulnerable all-framework bundle does not need to be restored merely for compatibility.
Two smaller consistency issues:
- The new OpenAI auto-trace quickstart (
.[otel]plusexamples/phoenix_auto_trace/requirements.txt) emitsDependencyConflict: requested: "langchain_core >= 0.1.0" but found: "None"because theotelextra still installs the LangChain instrumentor after LangChain moved to target-owned requirements. The framework instrumentor should move with the framework dependency or otherwise stop producing a conflict on the default OpenAI path. scripts/render_trade_off.py:25-26still says Matplotlib is a baseassert-aidependency, although this PR moves it toscripts/requirements.txt.
Other verification on this head was healthy: the full suite passed (1454 passed, 22 skipped, 840 subtests); viewer and website audits/builds passed with zero known npm vulnerabilities; pip-audit found no known vulnerabilities in the root and isolated requirement environments; the wheel and sdist passed twine check; the Travel Planner, Azure Doc QA, OpenAI auto-trace, scripts, and standalone Foundry-host requirements installed and imported; lockfiles use the public npm registry with SHA-512 integrity; and uv lock --check plus diff checks passed.
Replace implementation-oriented extras with phoenix and azure-auth, keep embeddings isolated, and make direct endpoint and Prompt Agent tracing dependencies explicit. Update runtime install hints and assert the public extra composition; the package version remains 0.2.0 until the dedicated 0.3.0 release PR.
Use LangChain OpenAI for both Azure OpenAI and OpenAI-compatible Azure AI Inference routes so LiteLLM retains its OpenAI <3 constraint. Preserve the non-GPT model field behavior, add constructor tests, and verify the documented two-step install with pip check.
Build the wheel once, install each documented ASSERT/example environment in parallel, run pip check, and import each target without network calls. Exercise Bank Manager routing and the standalone Foundry host on its Python 3.13 minimum.
Treat zero captured spans as invalid trace metadata and emit actionable guidance once per session. Clarify that auto_trace activates installed instrumentors, and move LangChain instrumentation into the LangChain example environments that own it.
Update canonical setup, examples, and assistant guidance for phoenix and azure-auth. Explain target-owned instrumentors, keep embeddings concise and isolated, correct script dependency ownership, and record the breaking 0.2-to-0.3 migration under Unreleased without changing the package version.
Copy trace validation into the final interaction event so zero-span guidance survives inference_set.jsonl serialization. Cover both the session payload and the written artifact; no change for traces that already contain spans.
|
Jake Present (@jakepresent) Ready for re-review at The commits after your
All current-head checks are green, and an independent exact-head review found no remaining blocker. It also verified that Please re-review the current head. We need #336’s dependency boundary merged before applying the approved article-faithful reset to #313. |
Summary
Updates vulnerable frontend and Python dependencies, then narrows published ASSERT dependency metadata to runtime product features. Framework examples and optional scripts now own their dependencies through adjacent requirements files instead of one combined installation environment.
Motivation / linked issue
Reduce dependency vulnerability exposure, remove cross-framework resolver coupling, and make optional dependency ownership explicit.
Changes
file-entry-cache.langgraph,dspy, andexamplesextras from published ASSERT metadata.regressionextra and script-only packages from base andanalysis.assert-ai[embeddings].GenerationEngineAPI.alllimited to product features: tracing, analysis, embeddings, Azure identity, and ACS.The multi-framework auto-trace gallery keeps its alternate framework modules as explicit opt-ins: install the framework and matching OpenInference instrumentor named in the gallery table. CrewAI is not committed to a requirements manifest while its ChromaDB dependency has no patched release.
Testing
uv lock --checknpm audit,npm ci,npm run check,npm run buildnpm audit,npm ci,npm run buildpython -m build,twine check dist/*Checklist