GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||
GeezerVison is showing github.com — refactor(harness)!: consolidate the LangGraph harness + remove tracing handler by declan-scale · Pull Request #430 · scaleapi/scale-agentex-python Conversation
|
| Filename | Overview |
|---|---|
| src/agentex/lib/adk/init.py | Re-wires LangGraph imports: stream_langgraph_events now sourced from _langgraph_turn, emit_langgraph_messages from _langgraph_sync; create_langgraph_tracing_handler removed from public surface and __all__. |
| src/agentex/lib/adk/_modules/_langgraph_turn.py | Absorbs stream_langgraph_events from the deleted _langgraph_async.py; implementation is identical — LangGraphTurn + UnifiedEmitter.auto_send_turn with workflow_now_if_in_workflow(). Module-level doc comment cleaned up (ticket refs removed). |
| src/agentex/lib/adk/_modules/_langgraph_sync.py | Absorbs emit_langgraph_messages verbatim from the deleted _langgraph_messages.py; logic is unchanged. Module now owns both the streaming converter and the non-streaming message emitter. |
| src/agentex/lib/adk/_modules/_langgraph_async.py | Deleted — stream_langgraph_events moved to _langgraph_turn.py. |
| src/agentex/lib/adk/_modules/_langgraph_messages.py | Deleted — emit_langgraph_messages moved to _langgraph_sync.py. |
| src/agentex/lib/adk/_modules/_langgraph_tracing.py | Deleted — AgentexLangGraphTracingHandler and create_langgraph_tracing_handler removed as a documented breaking change; no replacement needed since UnifiedEmitter derives spans from the canonical stream. |
| tests/lib/adk/test_langgraph_sync.py | Merges test_langgraph_sync_unified.py (passthrough + span derivation tests) into this file; replaces the deleted TestLangGraphTracingHandlerBackwardCompat. Module-level autouse=True _real_langchain_core fixture correctly covers the new test classes. |
| tests/lib/adk/test_langgraph_sync_unified.py | Deleted — content absorbed into test_langgraph_sync.py. |
| tests/lib/core/harness/_fakes.py | New shared module extracting FakeTracing/FakeSpan from three duplicated test-local implementations; exposes convenience properties started_names, started_pairs, ended_outputs to keep shape-2/shape-3 assertions clean. |
| tests/lib/core/harness/test_harness_langgraph_async.py | Removes local _FakeTracing/_FakeSpan; imports FakeTracing from _fakes. Doc updated to reflect that Full tool events now produce spans (previously asserted they didn't). |
| tests/lib/core/harness/test_harness_langgraph_sync.py | Same _FakeTracing dedup as the async harness test; logic unchanged. |
| tests/lib/core/harness/test_harness_langgraph_temporal.py | Import of stream_langgraph_events updated to its new home in _langgraph_turn; one docstring phrase about "Redis-streaming code" is misleading but harmless. |
| tests/lib/adk/test_langgraph_async.py | Single-line import path update: stream_langgraph_events now from _langgraph_turn instead of the deleted _langgraph_async. |
%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph before["Before (5 files)"]
A1[_langgraph_async.py\nstream_langgraph_events]
A2[_langgraph_messages.py\nemit_langgraph_messages]
A3[_langgraph_tracing.py\ncreate_langgraph_tracing_handler\nAgentexLangGraphTracingHandler]
A4[_langgraph_sync.py\nconvert_langgraph_to_agentex_events]
A5[_langgraph_turn.py\nLangGraphTurn]
end
subgraph after["After (2 files)"]
B1[_langgraph_turn.py\nLangGraphTurn\nstream_langgraph_events]
B2[_langgraph_sync.py\nconvert_langgraph_to_agentex_events\nemit_langgraph_messages]
B3[REMOVED\ncreate_langgraph_tracing_handler]
end
A1 -->|moved to| B1
A5 -->|stays in| B1
A2 -->|moved to| B2
A4 -->|stays in| B2
A3 -->|deleted| B3
B1 & B2 --> C[adk/__init__.py\npublic surface unchanged]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
subgraph before["Before (5 files)"]
A1[_langgraph_async.py\nstream_langgraph_events]
A2[_langgraph_messages.py\nemit_langgraph_messages]
A3[_langgraph_tracing.py\ncreate_langgraph_tracing_handler\nAgentexLangGraphTracingHandler]
A4[_langgraph_sync.py\nconvert_langgraph_to_agentex_events]
A5[_langgraph_turn.py\nLangGraphTurn]
end
subgraph after["After (2 files)"]
B1[_langgraph_turn.py\nLangGraphTurn\nstream_langgraph_events]
B2[_langgraph_sync.py\nconvert_langgraph_to_agentex_events\nemit_langgraph_messages]
B3[REMOVED\ncreate_langgraph_tracing_handler]
end
A1 -->|moved to| B1
A5 -->|stays in| B1
A2 -->|moved to| B2
A4 -->|stays in| B2
A3 -->|deleted| B3
B1 & B2 --> C[adk/__init__.py\npublic surface unchanged]
Reviews (9): Last reviewed commit: "docs(changelog): scope breaking-change t..." | Re-trigger Greptile
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
a6a4a30 to
fb4111f
Compare
4bb6bc7 to
86da19c
Compare
|
@greptile review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@greptile review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@greptile review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
fb4111f to
c9f7ab7
Compare
58aaeb4 to
66cc86b
Compare
c9f7ab7 to
8debccd
Compare
66cc86b to
8dba84c
Compare
8debccd to
758d5f8
Compare
c5c0a3a to
37c7d9d
Compare
8dba84c to
940e00d
Compare
… handler Collapse _langgraph_async / _langgraph_messages / _langgraph_tracing into _langgraph_sync (emit_langgraph_messages, convert helpers) and _langgraph_turn (stream_langgraph_events). Span tracing is now derived from the canonical stream by UnifiedEmitter, so create_langgraph_tracing_handler is removed. Public facade names are unchanged except the removed handler. All in-repo consumers were migrated to the unified surface in the preceding PRs. BREAKING CHANGE: create_langgraph_tracing_handler is removed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Address Greptile review: the breaking-change entry listed create_pydantic_ai_tracing_handler as removed, but that handler is still exported here and is only removed in the following PR. Narrow this entry to the LangGraph handler actually removed in this change. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
940e00d to
c98b52e
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.