test(pipeline): Cover untested workflow node paths + a real-auth Workflow E2E - #146
Merged
Conversation
…real-auth Workflow E2E
The node-coverage audit found four graph node StepTypes with no direct execution
test — Tool, Switch, Transform, ExtractJson — even though GraphExecutor.RunnerFor
implements all of them. Add one GraphExecutorTests fact each:
- Tool: parses its {"tool","input"} spec, resolves from IToolRegistry, and invokes
THROUGH IToolGateway (policy + evidence) — asserts the parsed name + explicit
tenant reach the gateway request and the node reports "ok".
- Switch: shares WireRouter/RunDecision with IfElse; the stubbed router LLM steers
the chosen value so only the matching-labelled branch runs.
- Transform: interpolates ${userstory} from run state into the node output/meta.
- ExtractJson: strips surrounding prose; a downstream Print echoes the cleaned JSON.
Extends the N() test helper with desc/input/output and Build() with injectable
IToolRegistry/IToolGateway (both backward-compatible defaults).
Also add WorkflowAppRealAuthTests: the Workflow studio Run path driven over a REAL
Keycloak OIDC session against the full Aspire stack (not dev-auto-login) — login as
operator/operator, open the Workflow app, Run the seeded 5-Agent SDLC pipeline on the
keyless Offline provider, and assert the canvas nodes reach Done + "Workflow complete".
Gated by RUN_AGENTOS_E2E_REAL + AGENTOS_REAL_URL.
Verified: AgentOs.Tests 851 passed / 0 failed (24 in GraphExecutorTests); the new
real-auth E2E passes on the full stack (1 passed, 10s).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| result.Completed.ShouldBeTrue(); | ||
| var printMeta = done.Find(e => e.NodeId == "p")?.Meta; | ||
| printMeta.ShouldNotBeNull(); | ||
| printMeta.ShouldContain("ok"); |
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.
Change description
The node-coverage audit found four graph node StepTypes with no direct execution test — Tool, Switch, Transform, ExtractJson — though
GraphExecutor.RunnerForimplements all of them. Adds oneGraphExecutorTestsfact each (Tool through the governedIToolGateway; Switch route selection; Transform${state}interpolation; ExtractJson prose-stripping via a downstream Print).Also adds
WorkflowAppRealAuthTests: the Workflow studio Run path over a real Keycloak OIDC session against the full Aspire stack (login operator/operator → open Workflow → Run the seeded 5-Agent SDLC pipeline on the keyless Offline provider → assert canvas nodes reach Done + "Workflow complete"). Gated byRUN_AGENTOS_E2E_REAL.Type of change
Test plan
dotnet test --filter GraphExecutorTests→ 24 passed (20 + 4 new).