Conversation
…/WorkflowConfig Closes #140 A user nesting parallel: or for_each: inside an agents: item used to have the misnested field silently dropped, leaving a no-prompt/no-model wrapper agent that failed obscurely at the provider with "Model 'gpt-4o' is not available". Add model_config = ConfigDict(extra="forbid") to AgentDef, ParallelGroup, ForEachDef, and WorkflowConfig so misnesting and field typos are rejected at parse time with a Pydantic extra_forbidden error pointing at the offending location (e.g. agents.0.parallel). Also: - Show Parallel Groups and For-each Groups counts in the conductor validate summary so the absence of an expected group is visible (issue #140 suggestion c). - Fix examples/for-each-simple.yaml: its top-level input: block was silently being dropped (it should be nested under workflow:). With extra=forbid this now hard-fails, so move it under workflow: where every other example has it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extends the extra="forbid" coverage from PR review feedback. These models are equally user-authored in YAML and exhibit the same silent-typo footgun that #140 reports. - RouteDef: a typo like `whn:` instead of `when:` was silently dropped, leaving `route.when = None` and turning a conditional route into an unconditional one — a workflow-semantics bug that is nearly impossible to debug. - WorkflowDef: typos like `entery_point:` or `limts:` in the `workflow:` block were silently ignored, falling back to defaults instead of the user's intent. Adds two regression tests covering both cases. `make validate-examples` still passes — no in-repo example was relying on these silent drops. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merged
jrob5756
added a commit
that referenced
this pull request
May 6, 2026
- conductor resume flag parity with run (#158) - reasoning effort displayed in dashboard (#160) - iteration_limit_reached/resolved events for dashboard (#162) - registry latest now means default branch HEAD, not newest tag (#157) - forbid extra fields on Agent/Parallel/ForEach/Workflow schemas (#159) - pretty-print tool args/results in dashboard events (#161) - capture uv stdout+stderr on Windows install failure (#156) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Closes #140
Problem
A user nesting
parallel:orfor_each:inside anagents:item used to have the misnested field silently dropped by Pydantic's defaultextra="ignore". The wrapper became a regulartype: agentwith nomodeland noprompt, fell through to the Copilot provider's hard-codedgpt-4odefault, and failed at runtime with:The error pointed at the provider model — three layers downstream of the actual schema mistake.
Fix
(a)
extra="forbid"on key workflow modelsAdd
model_config = ConfigDict(extra="forbid")to:AgentDef(primary culprit)ParallelGroupForEachDefWorkflowConfigThe misnested YAML now fails at parse time with a clear Pydantic error pointing at the offending location:
This also catches field typos (e.g.
prmpt:instead ofprompt:,agnts:at top level instead ofagents:).(c) Show parallel/for-each counts in
conductor validatesummaryAdds "Parallel Groups" and "For-each Groups" rows to the validate summary table when present. Their absence is now a visible signal that something the user thought they declared isn't being parsed as such.
Bonus: fix
examples/for-each-simple.yamlThis example was itself relying on the silent-drop behavior — it had a top-level
input:block (every other example correctly nests it underworkflow:). Withextra="forbid"this would have failed, so this PR also movesinput:underworkflow:where it belongs. The example was previously not actually receiving the documenteditemsworkflow input.Skipped from issue
promptnormodel— (a) already catches the reported failure shape.gpt-4odefault — separate concern.Risk
Adding
extra="forbid"is a breaking change for any user YAML that has typos that "happen to work." In-repo examples were audited (make validate-examples) and onlyfor-each-simple.yamlwas affected (and that case was a real bug, fixed in this PR).Tests
TestExtraFieldsForbiddentest class with 5 regression tests covering misnestedparallel:/for_each:on AgentDef, typo'd field on AgentDef, extra field on ParallelGroup, and extra top-level field on WorkflowConfig.test_copilot_large_write— real Copilot SDK session timeout).make lint✓make validate-examples✓Verification
The original repro from #140:
Before:
Validation Successfulthen a runtimegpt-4omodel error.After: clear schema error pointing at
agents.0.parallel.