Repository navigation
feat(tracing): thread_id for tracer hooks, GoapGraph.waiting_action (#104, #105) - #106
Merged
Merged
Conversation
…104, #105) - every tracer hook that declares a thread_id keyword receives the run's thread id, injected once in SafeTracerProxy and MultiTracer (#104) - GoapGraph.waiting_action(thread_id) names the wait a thread is paused in (#105) - on_stop is pinned to receive a GoapResult - lock: langgraph 1.2.24, langchain-core 1.8.4 - folded into the unreleased 0.3.1 changelog entry
✅ Code Quality Report
Quality Gates
🎉 All quality gates passed! This PR maintains high code quality standards. 📊 View detailed MFCQI breakdownRun |
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 #104, closes #105.
What changed
thread_idfor tracer hooks (Tracer hooks receive thread_id as an explicit keyword argument #104):SafeTracerProxyandMultiTraceradd the run'sthread_id(Noneoutside a run) to every hook call;supported_kwargsdrops it for hooks that do not declare it, so existing tracers are unaffected. Injection lives in the two dispatch points, not at the ~30 call sites in the nodes.GoapGraph.waiting_action(thread_id)(GoapGraph.waiting_action(thread_id) returns the action name a thread is waiting on #105): the wait action's name, orNonefor a finished/unknown thread or one paused on an approval or form.on_stopreceiving aGoapResultis pinned by a test (it already did).Found while porting the foood demo engine: its tracer called
current_thread_id()8 times and it carried awaiting_at()shim for payload shapes.Test plan
tests/test_tracer_thread_id.py(8): sync, async, replan, sensor, explicit-override, outside-a-run, old-style tracer, MultiTracer children.tests/test_waiting_action.py(6),tests/test_on_stop_result.py(3).make check: 2,270 passed, 1 skipped.