[AAASM-3176] ✅ (python-sdk): Raise test coverage toward 95%#143
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🤖 Claude Code — PR ReviewDisclosure: Authored by a sub-agent I orchestrated under the AAASM-3176 fan-out (Epic AAASM-3174, coverage 90–95%). Reviewing critically. 1. CI verdict14 green / 4 skipped, 0 failures. SonarCloud quality gate OK (all 5 new-code conditions pass). 2. Scope vs AAASM-3176 — target metpython-sdk was already past 90%; the goal was 95%.
Tests-only change (953 additions, 0 deletions, 9 files), 10 granular commits. 3. Quality observations
4. Verdict🟢 APPROVED. Hit the 95% target with meaningful error-path coverage of the public SDK surface; gate green, no production code touched, deferrals are legitimately un-unit-testable in this environment. Generated by Claude Code (Opus 4.8, 1M ctx) · scope: CI triage + AAASM-3176 AC verification + test-meaningfulness review |



Description
Raises Python SDK test coverage toward the 95% target with behaviour-asserting
unit tests for previously-uncovered pure-Python modules. Test-only change — no
production code was modified.
Coverage (Sonar config: excludes
agent_assembly/proto/**andagent_assembly/types.py):Modules brought to (or near) full coverage:
models/agent.py+models/__init__.py—AgentConfig/AgentState/PolicyEvaluation(0% -> 100%)client/emitter.py—EdgeEmitterfire-and-forget edge reporting incl. the swallowed-exception path (0% -> 100%)crewai,langchain,langgraph,openai_agents,google_adk,mcp,pydantic_ai) — register/unregister lifecycle, metadata,process_agent_id, andis_availableimport-error branches (65-67% -> 100%)client/gateway.py—check_policy_compliance,report_edge, bearer auth header, andregister_agentHTTP-error branchruntime.py—is_running,start_runtime, andinit_assemblyspawn-when-down path (76% -> 100%)types.py—AuditEvent.to_wire_bytes/from_wire_bytesnative-_core-absentImportErrorbranchescore/__init__.py— lazy__getattr__re-exports + unknown-symbol guardadapters/base.py— empty-versions / blank-range validation andset_process_agent_idadapters/registry.py— replace-active eviction, error-onlylist_active, malformed entry-point handling, activation-failure path, priority orderingType of Change
Breaking Changes
Related Issues
Testing
How to verify:
Local validation results:
pytest test/: 572 passed, 13 skipped (skips require the native_corebuild / uninstalled frameworks).mypy agent_assembly: 4 pre-existing baseline errors only (native_corenot built + missinggrpcstubs); test-only change does not touch the package.ruff checkon changed files: only the 7 pre-existing baselineARG002findings intest_base.pyremain; zero new findings introduced.Checklist
🤖 Generated with Claude Code