-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Description
The dispatch-workflow safe-output feature is fully implemented with comprehensive validation (203 lines in dispatch_workflow_validation.go) but is completely missing from the JSON schema. This makes the feature undiscoverable via schema validation, IDE autocomplete, and documentation generation.
Evidence from Analysis
Code References: 35 references to DispatchWorkflow across pkg/workflow/*.go
Validation File: pkg/workflow/dispatch_workflow_validation.go (203 lines)
Schema Status: NOT PRESENT in safe-outputs properties (checked all 45 operations)
Features Implemented (Not in Schema)
- ✅ Validates at least one workflow specified (
minItems: 1) - ✅ Prevents self-reference (infinite loop protection)
- ✅ Path traversal prevention (security)
- ✅ Supports
.md,.lock.yml, or.ymlworkflow files - ✅ Validates target workflow has
workflow_dispatchtrigger - ✅ Checks max concurrent dispatches limit
Impact
- Discoverability: Feature is hidden from schema-based tools
- IDE Support: Autocomplete will not suggest
dispatch-workflow - Validation: Schema validation rejects valid configurations
- Documentation: Schema-generated docs don't show this feature
- User Experience: Users must discover feature through code reading
Suggested Schema Addition
"dispatch-workflow": {
"description": "Enable dispatching other workflows from this workflow. Allows workflows to trigger other workflows via workflow_dispatch events. Includes self-reference prevention and path traversal protection.",
"oneOf": [
{
"type": "boolean",
"description": "Enable dispatch-workflow with default settings"
},
{
"type": "object",
"properties": {
"workflows": {
"type": "array",
"minItems": 1,
"items": {"type": "string"},
"description": "List of workflow names to dispatch (without .md extension). Workflows must exist in same directory and support workflow_dispatch trigger. Self-reference not allowed."
},
"max": {
"type": "integer",
"minimum": 1,
"description": "Maximum number of concurrent workflow dispatches"
}
},
"required": ["workflows"],
"additionalProperties": false
}
],
"$comment": "Self-reference prevention: workflow cannot dispatch itself (prevents infinite loops). Path traversal protection: all paths validated with isPathWithinDir(). Validation: pkg/workflow/dispatch_workflow_validation.go"
}Files Affected
pkg/parser/schemas/safe-outputs.json(or equivalent schema file)- Potentially
pkg/workflow/frontmatter_types.goif TypeScript types need updates
Success Criteria
-
dispatch-workflowadded to safe-outputs schema properties - Schema validation accepts valid dispatch-workflow configurations
- IDE autocomplete suggests dispatch-workflow in safe-outputs context
- All validation rules documented in schema (minItems, self-reference, etc.)
-
$commentfield documents security constraints - Schema validation tests pass
-
make buildandmake recompilecomplete successfully - Documentation generation includes dispatch-workflow
Source
Extracted from Schema Consistency & Behavioral Constraints discussion #10924
Priority
High - Feature is production-ready but completely hidden from schema-based tooling and validation. This affects discoverability and creates a poor developer experience.
AI generated by Discussion Task Miner - Code Quality Improvement Agent
- expires on Feb 11, 2026, 1:34 AM UTC