Skip to content

meta/run-workflow: report the graph nodes the child run touched - #137

Merged
Evanfeenstra merged 1 commit into
mainfrom
feature/meta-run-workflow-nodes
Oct 10, 2026
Merged

Evanfeenstra merged 1 commit into
mainfrom
feature/meta-run-workflow-nodes

Conversation

@Evanfeenstra

Copy link
Copy Markdown
Contributor

Why

Hive's run graph (the Graph Trace on a Jamie job) reads the job run's log only. When the job's work agent runs explore through meta/run-workflow, that explore is a separate run with its own log, and the meta_run_workflow call's step.end carried no nodes. In swarm38 job 1791647726727, the trace showed the agent's own Job and Explore Concept reads, but none of the 13 graph calls of the explore run it launched (1791647782933).

What

  • meta/run-workflow (authoring.runWorkflow) reads the child's events once it settles and folds every step.end.nodes onto its own result with withAccessedNodes, whatever status the child ended with:
    • deduplicated by ref_id, keeping the latest type and name;
    • a ref the child got from a peer keeps its peer tag;
    • if the child's log can't be read, the result goes back without nodes.
  • That's what strut/run-workflow already does over a peer's tail. The fold is now one helper, foldAccessedNodes in core.ts, used by both. strut/run-workflow's behavior is unchanged.
  • Nesting is covered automatically: a grandchild's nodes are already on the child's meta/run-workflow step.end.

Effects

  • Hive's Graph Trace shows a local child run's nodes with no hive change. They come in on the one meta_run_workflow call, so the per-call detail (which tool, which query) stays in the child's log.
  • Strut's run flyout (Nodes section) lists them too.
  • The graph projector writes ACCESSED edges from the launching tool call to those nodes, alongside the child run's own edges.
  • Peer nodes still arrive tagged, and hive still skips them. Showing those is the hive half (ids qualified by workspace, loaded from the peer's swarm).

Tests

authoring.test.ts: a child with two steps reporting overlapping nodes, one of them peer-tagged, shows up on the parent's meta/run-workflow step.end deduplicated with the tag kept. The marker never reaches the output JSON. A child that touched nothing reports nothing. npm test: 1417/1417, tsc clean.

A job turn that ran explore through meta/run-workflow showed only its own
Concept reads in hive's run graph: the explore run's 13 graph calls were in
the child's log, and the meta_run_workflow step.end carried no nodes
(swarm38 job 1791647726727 → explore 1791647782933). The step now folds the
child log's step.end.nodes (deduplicated, peer tags kept) onto its own
output marker, as strut/run-workflow already does over a peer's tail. The
fold is one shared helper, foldAccessedNodes, in core.ts.
@Evanfeenstra
Evanfeenstra merged commit d9eaec4 into main Oct 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant