Repository navigation
Integrations: warn on untested versions when wiring instrument() frameworks by hand (#841) - #856
Merged
LoopGlitch26 merged 1 commit intoNov 15, 2026
Conversation
…eworks by hand (Cygnux-Labs#841) Signed-off-by: Mr45401 <185895283+Mr45401@users.noreply.github.com>
Member
|
Thanks again for taking on #841, and for the careful write-up. This is ready to merge from my side. Here's what I checked:
One optional nit:
|
Member
|
Merged, thanks @Mr45401. All seven frameworks that |
This was referenced Nov 15, 2026
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.
Closes #841
Summary
The seven frameworks
tracekit.instrument()wires can also be wired by hand, which is the first setup shown on most of their integration docs pages. Unlike the five hand-wired-only integrations, building those seven by hand did not callversion_check.warn_untested(...), leaving untested framework versions silent until a moved hook or internal API failed downstream.Changes
autowire.FRAMEWORKS(tracekit/integrations/version_check.py): Addedversion_check.framework(dist)to look up(label, req)directly fromautowire.FRAMEWORKSand pick thedist>=...requirement token (extractinglanggraph>=1.2,<1.3from LangGraph's multi-package string and picking up Browser Use'sbrowser-use>=0.13.11,<1.1range directly without copying).tracekit/integrations/): Calledversion_check.warn_untested(*_FRAMEWORK)at the top of all 10 hand-wired entry points across the 7 frameworks:openai_agents.TracekitAgents.__init__langchain.TracekitMiddleware.__init__,tracekit_tool_node,TracekitCheckpointer.__init__claude_agent_sdk.tracekit_hooks,TracekitSessionStore.__init__mcp.TracekitSession.__init__browser_use.trace_toolscrewai.hookspydantic_ai.Tracekit.__init__tracekit.instrument()(tracekit/autowire.py,version_check.py): Addedversion_check.claim(label)/unclaim(label)sharingversion_check._WARNED. Wheninstrument()sees an untested version, it claimslabelbefore callingwire(run)so neither entry points constructed eagerly duringwire(run)(TracekitAgents,TracekitMiddleware,crewai.hooks) nor entry points constructed lazily afterinstrument()returns (tracekit_hooks,TracekitSessionper session,pydantic_ai.Tracekitper agent) warn a second time, andinstrument()emits its own single warning. Ifwire(run)raises,unclaim(label)releaseslabelso falling back to hand-wiring still warns.VersionCheckCasesintests/factories.pywith an overridableentries(integration)hook and addedVersionChecksuites across all 7 integration test files covering all 10 entry points (inside tested range -> no warning; outside range -> one warning).tests/test_version_check.pyandtests/test_instrument.pycoveringversion_check.framework(), single-warning behaviour underinstrument()(both eager and lazy per-session wiring), and hand-wired warning after a failedinstrument()wire.Verification
tracekit up):With distribution metadata reporting
pydantic-ai-slim2.59.0andlanggraph1.9.0(both outside the tested ranges):pydantic_ai.Agent(..., capabilities=[Tracekit(r)])instances and twotracekit_tool_node(...)instances by hand printed oneUserWarningper framework pointing at the caller's line (tracekit: Pydantic AI 2.59.0 is wired but untested...andtracekit: LangGraph 1.9.0 is wired but untested; Tracekit is tested with langgraph>=1.2,<1.3).tracekit.instrument()in a fresh process and then building twopydantic_ai.Agentinstances and aToolNodeprinted onetracekit.instrument(): ...warning per framework at thetracekit.instrument()call and no duplicate warnings when the agents or node were constructed, withtracekit lastverifying the signed records.