You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fafecf7
Browse filesBrowse the repository at this point in the historyBrowse files
fix(workflow): validate declared input and output schemas at publish and run boundaries (issue agentic-ai-java#274)
- WorkflowDefinitionValidator: parse non-blank inputSchema/outputSchema with the
networknt draft 2020-12 registry; blank rejection and no-schema behavior unchanged
- WorkflowAgent: compile declared schemas at construction; validate request inputs
before the first step (no tool or agent side effects); validate the output snapshot
on the shared completion path before delivering COMPLETED; failures carry
AgentResult.OutputValidationIssue and terminate the stream with
WorkflowValidationException
- ExecutionResult.continueWith: keep the suspension-point snapshot so a suspended
outcome can be built (pre-existing NPE, untested path)
- boundaries: resumes do not re-validate inputs; subflow input schemas are a
publish-time contract, not an extra gate inside the parent run
- tests: WorkflowSchemaContractTest, 10 cases (red 5F+2E before, green after)
Copy file name to clipboardExpand all lines: argi-orchestration/argi-workflow-core/src/main/java/io/github/agentic/ai/workflow/WorkflowDefinitionValidator.java
+32-7Lines changed: 32 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,9 @@
15
15
*/
16
16
packageio.github.agentic.ai.workflow;
17
17
18
+
importcom.networknt.schema.SchemaRegistry;
19
+
importcom.networknt.schema.SpecificationVersion;
20
+
18
21
importjava.util.ArrayList;
19
22
importjava.util.HashSet;
20
23
importjava.util.LinkedHashSet;
@@ -23,19 +26,25 @@
23
26
importjava.util.Set;
24
27
importjava.util.function.Function;
25
28
26
-
/** Structural validation performed before a definition can be published. */
29
+
/**
30
+
* Structural validation performed before a definition can be published.
31
+
*
32
+
* <p>
33
+
* Declared input and output schemas are checked for syntax against the supported
34
+
* JSON Schema dialect (draft 2020-12, the same validator the agent layer uses for
35
+
* structured outputs). A definition that declares no schema is unaffected; a blank
0 commit comments