Skip to content

feat: Workflow Composition (Sub-Workflows) via type: workflow#87

Merged
jrob5756 merged 6 commits intomainfrom
copilot/feature-workflow-composition
Apr 17, 2026
Merged

feat: Workflow Composition (Sub-Workflows) via type: workflow#87
jrob5756 merged 6 commits intomainfrom
copilot/feature-workflow-composition

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

  • Schema changes: Add type: workflow to AgentDef, add workflow field, depth limit constant
  • Schema validation: Model validator rules for workflow type (require workflow, forbid irrelevant fields including retry)
  • Validator: Reject workflow agents in parallel groups and for-each groups
  • Engine: _execute_subworkflow with depth limit and circular reference detection
  • Tests: 23 schema tests + 9 engine integration tests (32 total)
  • Merge conflict with main resolved (per-agent retry policies PR feat: per-agent retry policies #86)
  • Lint fix: remove unused sub_path variables in test_subworkflow.py
  • Format fix: apply ruff format to 3 files (workflow.py, test_workflow_type_schema.py, test_subworkflow.py)
  • All 32 tests pass, lint and format clean

Copilot AI linked an issue Apr 10, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits April 10, 2026 19:30
Implement workflow composition allowing agents to reference external
workflow YAML files as sub-workflows. Key changes:

- Schema: Add 'workflow' to AgentDef type literal, add 'workflow' field
  for sub-workflow path, add model validation for workflow type
- Engine: Add _execute_subworkflow method with depth limit enforcement,
  circular reference detection, and provider inheritance
- Validator: Reject workflow agents in parallel groups and for-each groups
- Tests: Add schema validation tests and engine integration tests
- Docs: Update workflow-syntax.md and schema references

Agent-Logs-Url: https://github.com/microsoft/conductor/sessions/7dfbaf29-06cd-448f-89f1-f0289a3466a8

Co-authored-by: jrob5756 <7672803+jrob5756@users.noreply.github.com>
Copilot AI changed the title [WIP] Add sub-workflows support via workflow agent type feat: Workflow Composition (Sub-Workflows) via type: workflow Apr 10, 2026
Copilot AI requested a review from jrob5756 April 10, 2026 19:33
@jrob5756
Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts on this PR

Merge origin/main into copilot/feature-workflow-composition.

Resolve conflict in src/conductor/config/schema.py:
- Keep retry validation for script agents (from main)
- Keep workflow type validator (from this branch)
- Add retry validation for workflow agents (new)
- Add test for retry on workflow agents

Co-authored-by: jrob5756 <7672803+jrob5756@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 17, 2026

@copilot resolve the merge conflicts on this PR

Merge conflicts resolved in commit 81fc9ac. The conflict was in src/conductor/config/schema.py between the per-agent retry policies PR (#86) and our workflow type validator. Resolution keeps both the retry check for script agents (from main) and the workflow type validator (from this branch), and also adds retry validation for workflow agents since they are not provider-backed. Added a test for the new check. All 1415 tests pass.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/copilot_internal/user
    • Triggering command: /home/REDACTED/.local/lib/python3.12/site-packages/copilot/bin/copilot /home/REDACTED/.local/lib/python3.12/site-packages/copilot/bin/copilot --headless --no-auto-update --log-level info --stdio (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@jrob5756 jrob5756 marked this pull request as ready for review April 17, 2026 19:02
@jrob5756
Copy link
Copy Markdown
Collaborator

@copilot lint step failed

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 17, 2026

@copilot lint step failed

Fixed in c4abc17. The lint failure was 3 unused sub_path variable assignments in tests/test_engine/test_subworkflow.py (ruff F841). Removed the unnecessary variable assignments while keeping the _write_yaml() calls.

@jrob5756
Copy link
Copy Markdown
Collaborator

@copilot still has lint errors

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 17, 2026

@copilot still has lint errors

Fixed in 71ee10c. The ruff check was passing but ruff format --check was failing — 3 files needed reformatting (workflow.py, test_workflow_type_schema.py, test_subworkflow.py). Applied ruff format to all three.

@jrob5756 jrob5756 merged commit 82ec042 into main Apr 17, 2026
7 checks passed
@jrob5756 jrob5756 deleted the copilot/feature-workflow-composition branch April 17, 2026 19:15
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.

Feature: Workflow Composition (Sub-Workflows)

2 participants