feat(runtime): gate task execution on input/output artifacts (#510) - #538
Closed
EnmaJim wants to merge 1 commit into
Closed
feat(runtime): gate task execution on input/output artifacts (#510)#538EnmaJim wants to merge 1 commit into
EnmaJim wants to merge 1 commit into
Conversation
3 tasks
Collaborator
|
@EnmaJim this is new feature/design territory and needs its own prioritization pass, so I’ll defer it for now rather than settling the artifact contract model inside this PR. |
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.
Linked issue
Closes #510
Summary of changes
Adds a task input/output artifact contract so a task can no longer be marked
done, nor silently feed a broken context downstream, when a required artifactis absent, empty, or malformed.
Test-DotbotArtifact(src/runtime/Scripts/Invoke-WorkflowProcess.ps1):exists → non-empty → (for .json) parses. Minimal, toolchain-free; Markdown/source bottom out at the non-empty check by design.
Test-TaskOutputnow rejects empty/malformed declared outputs (previously existence-only), satisfying the issue's
"absent, empty, or fails shape validation".
Test-TaskInputvalidates a task's declaredinputsbefore it runs. On failure the task is escalated toneeds-inputwitha specific, actionable message (e.g.
Required input 'briefing/repo-scan.md' is absent)via the existing
Set-WorkflowTaskNeedsInput. The gate runs before anyprovider session, so a blocked task wastes no tokens.
inputstask field threaded through the closed schemas andbuilders (
TaskDefinition,TaskInstance/New-TaskInstance,New-WorkflowTask,_FlattenTask) plus API/MCP parity (HttpServerPOST/PATCH/tasks,task-createMCP tool).needs-inputtaskisn't reselected and its
depends_ondependents stay blocked; answering"retry" requeues it and the gate re-validates — no full workflow restart.
inputs/outputsare unaffected (existing behaviour preserved).Screenshots / recordings
Required input artifacts surfaced in ACTION REQUIRED, with retry/skip:
Resume: after answering "Investigate logs and retry", the task requeues with no error and runs to done:
Testing notes
pwsh tests/Run-Tests.ps1).inputsschema, and gate wiring.Checklist