Skip to content

test(pipeline): Cover untested workflow node paths + a real-auth Workflow E2E - #146

Merged
hoangsnowy merged 1 commit into
mainfrom
test/workflow-node-coverage
Aug 10, 2026
Merged

test(pipeline): Cover untested workflow node paths + a real-auth Workflow E2E#146
hoangsnowy merged 1 commit into
mainfrom
test/workflow-node-coverage

Conversation

@hoangsnowy

Copy link
Copy Markdown
Owner

Change description

The node-coverage audit found four graph node StepTypes with no direct execution test — Tool, Switch, Transform, ExtractJson — though GraphExecutor.RunnerFor implements all of them. Adds one GraphExecutorTests fact each (Tool through the governed IToolGateway; 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 by RUN_AGENTOS_E2E_REAL.

Type of change

  • New tests

Test plan

  • dotnet test --filter GraphExecutorTests24 passed (20 + 4 new).
  • Full suite: 851 passed / 0 failed.
  • Real-auth E2E verified on the full stack: 1 passed, 10s (login → Workflow → SDLC run → nodes Done).

…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");
@hoangsnowy
hoangsnowy merged commit 47ff025 into main Aug 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants