Skip to main content

Module merge_loop

Module merge_loop 

Source
Expand description

Supervisor merge loop and topological dependency ordering.

Walks the agent set in topological merge order, merges each branch into the current branch, and runs the supervisor’s configured test command (if any) between merges. The captured per-branch outcomes are returned for crate::summary::write_supervisor_summary to render into the session summary.

Pulled out of main.rs so integration tests can drive the merge loop without spawning the binary or depending on the supervisor CLI.

Structs§

MergeResults
Results of running the merge loop.

Functions§

build_dependency_graph
Builds a dependency graph from broker messages.
run_merge_loop
Production wrapper around run_merge_loop_with_publisher.
run_merge_loop_with_publisher
Walks the agent set in topological order, merging each branch into the current branch, optionally running test_command between merges, and returning the per-branch outcomes.
run_test_command
Runs the configured test command via sh -c and captures stdout.
topological_merge_order
Topological sort of the dependency graph. Returns a merge order where agents with no dependents come first (so agents that are depended upon merge before the agents that depend on them).