test(e2e): Add a node-flue end-to-end application - #24377
Open
RulaKhaled wants to merge 3 commits into
Open
Conversation
RulaKhaled
added this pull request to stack #24376
September 14, 2026 14:05
Contributor
size-limit report 📦
|
RulaKhaled
force-pushed
the
feat/flue-e2e-app
branch
from
September 14, 2026 14:27
8f35f04 to
c9a3c7b
Compare
RulaKhaled
marked this pull request as ready for review
September 14, 2026 15:04
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cd8dd44. Configure here.
The node-integration-test suite drives Flue from a hand-written scenario that calls `__flueBindAgentModule` itself, standing in for what `@flue/vite` does at build time. It cannot show whether a scaffolded app works. This app is what `flue init` produces — plain vite, `'use agent'`, `createAgentRouter` — built and served the way a user runs it, against a real provider. Covers: AI spans, errors captured as issues, a manual span nesting inside a tool, an orchestrion-instrumented `dataloader` span landing in the agent's trace, and both dev and prod. Also asserts the provider's HTTP call nests inside `chat`, which nothing else covers. The loader is called from inside a tool rather than a route, so its span shares the agent's trace instead of sitting in one of its own. No build externals are needed, unlike node-eve: a Flue node build leaves dependencies as bare specifiers, so `dataloader` stays a real module for the transform to hook. The `@flue/*` versions are pinned because the internal registry proxy 403s on releases it has not scanned, and a caret range drifts onto them; the `(latest)` variant is where new versions get exercised. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two lines over the width limit; I formatted the server-utils sources but not the test application. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`runAgentTurn` returned on the `202` and dropped the `streamUrl`, so a turn kept running while the next test started waiting for spans — a leftover trace could satisfy the wrong assertion. It now reads the conversation back until it reports a settlement. Scoping the waits by `gen_ai.conversation.id` would not have worked: Flue generates that id (`conv_01M2G81…`), so it is not the path segment the test chose and the test cannot know it up front. Also names `count_items` in the agent instructions — an earlier edit missed, so the dataloader test was relying on the tool description alone — and drops the `loaders.ts` comment describing the route-based setup that no longer exists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
RulaKhaled
requested review from
JPeer264 and
mydea
and removed request for
a team
September 14, 2026 20:04
RulaKhaled
force-pushed
the
feat/flue-e2e-app
branch
from
September 14, 2026 20:04
6232570 to
be1be03
Compare
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.

Stacked on #24266 — review that first, this is the e2e app only.
The node-integration-test calls
__flueBindAgentModuleby hand, standing in for what@flue/vitedoes from the'use agent'directive, so it can't show whether a scaffolded app actually works. This isflue initoutput, built and served the way a user runs it, against a real provider.Covered, in both dev and prod and in both the base and orchestrion variants:
invoke_agent/chat/execute_toolwith usage and costexecute_tooldataloaderspan landing in the agent's tracehttp.clientcall nesting insidechatThe loader runs inside a tool rather than a route so its span shares the agent's trace. No build externals are needed unlike
node-eve— a Flue node build leaves dependencies as bare specifiers, sodataloaderstays a real module for the transform to hook.@flue/*is pinned because the internal registry proxy 403s on releases it hasn't scanned.Found: a thrown tool error produced an errored span and no issue at all, since Flue catches the throw and hands it back to the model as a tool result. Fixed in #24265.