feat(deno): add langgraph integration - #22472
Conversation
3baf5b4 to
e5f09e6
Compare
e5f09e6 to
72ed9a5
Compare
72ed9a5 to
cc6e9cc
Compare
cc6e9cc to
89b16e2
Compare
89b16e2 to
e5c4c06
Compare
e5c4c06 to
024ddc8
Compare
size-limit report 📦
|
024ddc8 to
88610c2
Compare
88610c2 to
ddc5b93
Compare
ddc5b93 to
3511629
Compare
3511629 to
ac93d90
Compare
6083b76 to
815defb
Compare
72e2787 to
bae2a18
Compare
bae2a18 to
607208b
Compare
|
|
||
| const parent = await withTimeout( | ||
| sink.waitFor(t => t.transaction === 'parent'), | ||
| 5000, |
There was a problem hiding this comment.
Bug: The module-level subscribed flag in langGraphChannelIntegration is not reset between tests, causing subsequent tests in the same file to skip channel subscription and fail.
Severity: MEDIUM
Suggested Fix
The subscribed flag should be reset to allow re-initialization in test environments. This can be achieved by exporting a reset function from the integration module that sets subscribed = false and calling this function within the test's resetGlobals() or a similar teardown/setup utility. This would ensure each test runs in a clean state without interference from previous tests in the same file.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: dev-packages/deno-integration-tests/suites/orchestrion-langgraph/test.ts#L40
Potential issue: The `langGraphChannelIntegration` uses a module-level `subscribed` flag
to ensure its setup logic runs only once. In test environments where `init()` is called
multiple times in the same process (e.g., multiple `Deno.test` calls in a single file),
this flag is not reset. The `resetGlobals()` function only clears Sentry scope state,
not module-level variables. As a result, after the first test sets `subscribed` to
`true`, subsequent tests will skip the channel subscription logic within `setupOnce()`.
This causes test failures because the second test's channel events are incorrectly
processed by handlers registered during the first test, which are bound to the first
test's transaction sink.
Also, abstract out test utils in deno-integration-tests
607208b to
5a3b148
Compare
No description provided.