Skip to content

WP_Agent_Workflow_Run_Result lacks first-class artifacts/logs fields — consumers smuggle them through metadata #403

Description

@chubes4

Gap

WP_Agent_Workflow_Run_Result has first-class fields for workflow status, inputs, output, step records, errors, timestamps, metadata, evidence refs, and replay metadata, but it does not expose first-class artifacts or logs arrays.

Downstream consumers that need to persist or surface run artifacts/logs currently have to smuggle those values through free-form metadata, which makes the contract harder to discover and forces each recorder/bridge to agree on private metadata keys.

Downstream evidence

Data Machine's workflow bridge currently copies artifacts/logs out of metadata in its recorder layer:

The docs describe this as a workaround for missing first-class contract fields.

Proposed shape

Add optional, additive fields to WP_Agent_Workflow_Run_Result:

  • artifacts: list of normalized artifact descriptors, JSON-serializable and storage-neutral.
  • logs: list of normalized log entries, JSON-serializable and storage-neutral.

Plumb them through construction, from_array(), to_array(), with(), runner options, recorder payloads, and surfaced run-status/result outputs where workflow results are serialized.

metadata remains fully passthrough for existing consumers. Absent fields default to empty arrays for backwards compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions