Skip to content

Run summary only shows most recent top-level node after completion #12

Description

@MatthewLones

Description

After a run completes and the user clicks "View Summary", the phase timeline only shows the most recent top-level node instead of all completed phases.

Investigation Findings

The server-side computeSummary() (run-manager.ts:667-798) uses a Map<nodeId, phase> to accumulate phases. The RunSummary component renders all summary.phases. The logic appears correct for normal runs.

Possible causes:

  1. Map key collision on retryphaseMap.set(e.nodeId, ...) at line 689 overwrites on duplicate nodeId. If the same node ran twice (e.g., retry from failure), only the last execution shows.

  2. Incomplete events.ndjsongetRunEvents() uses in-memory events for active runs, or loadEventsFromDisk() for completed runs. If the active run is garbage collected before summary is requested, events load from NDJSON on disk. A partial write or truncation would result in missing phases.

  3. Child nodes excluded by designchild_started/child_completed events are NOT captured in phaseMap, only top-level phase_started/phase_completed. If users expect child node phases in the summary, this is a feature gap.

Reproduction Needed

Please share the events.ndjson file from a run where the summary was incomplete:

~/.forgeflow/runs/{runId}/events.ndjson

This will confirm whether all phase events were persisted.

Files Involved

  • packages/server/src/services/run-manager.ts — lines 667-798 (computeSummary, phaseMap)
  • packages/ui/src/components/run-dashboard/RunSummary.tsx — lines 265-283 (phase rendering)
  • packages/server/src/services/run-manager.ts — line 656 (getRunEvents)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingengineEngine/orchestrationuiUI/frontend issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions