Add workflow result artifacts/logs fields#405
Merged
Conversation
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.
Summary
Fixes #403.
Adds first-class
artifactsandlogsarrays toWP_Agent_Workflow_Run_Resultso workflow consumers no longer need to smuggle those values through free-formmetadata.Motivation
Downstream Data Machine workflow recording currently copies artifacts and logs out of
metadatabecause the Agents API workflow result contract has no dedicated fields:This PR makes the contract explicit while keeping the persistence model storage-neutral and table-free.
Design
artifactsandlogstoWP_Agent_Workflow_Run_Result.from_array(),to_array(),with(), runner options, and recorder payloads.artifactsinto canonical run result envelopeartifact_refs.logssupport to the canonical run result envelope so logs do not get re-buried in metadata at that boundary.agents/run-workflowinput/output schemas to document and expose the new fields.Back compatibility
This is additive only:
artifactsorlogsdefault both fields to empty arrays.metadatapassthrough remains untouched, including metadata keys namedartifactsorlogs.evidence_refsbehavior remains unchanged.Test evidence
php tests/workflow-runner-smoke.phppassed: 67 passed, 0 failed.php tests/agents-workflow-ability-smoke.phppassed: 27 passed, 0 failed.php tests/run-result-envelope-smoke.phppassed: 23 assertions passed.composer testpassed.composer phpstanpassed: No errors.AI assistance