feat: publish structured workflow node results #337
Labels
No labels
backend
bug
chore
duplication
effort:complex
effort:medium
effort:trivial
enhancement
frontend
fullstack
priority:high
ready-for-agent
refactor
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dries/ocman#337
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem Statement
Workflow node types currently expose incompatible outputs: commands use string collectors, agents use raw JSON collectors, approvals expose no result, and map/join nodes expose partial status data. Dependent nodes cannot consistently consume prior results in command arguments, environment values, or agent prompts.
Solution
Every workflow node publishes one canonical Node Result envelope:
{id, name, started, ended, status, output}. Ocman owns execution metadata; each node supplies a JSONoutputmatching its node-type schema. Dependent nodes explicitly interpolate results from declared transitive dependencies.User Stories
output, so that recovery branches can inspect failures.Implementation Decisions
id,name,started,ended,status, andoutput.startedandendedare RFC 3339 UTC strings when known and null otherwise.output.Your previous response was not valid JSON. Reply once with only a valid JSON value for the workflow result.A second invalid result fails the node.nodes.<node-id>result namespace and may target nested fields.error.{approved, approvedBy, approvedAt}.approvedByis null until user identity exists.{items:[{key,index,status,output}]}where output is the mapped child workflow final result.{policy,success,failed,total,items:[{key,index,status,output}]}.Testing Decisions
Out of Scope
approvedBy.Further Notes
The canonical domain terms are Node Result, Output, and Interpolation. Existing workflow definitions using collectors require migration or explicit compatibility handling during implementation.
Resolved by merged PR #338 through #339-#343: every runtime node now publishes the canonical Node Result, interpolation consumes it, and collectors are retired.