pub fn spawn_regression_monitor(
bus: Arc<dyn EventBus>,
tracker: Arc<FileModificationTracker>,
) -> JoinHandle<()>Expand description
Spawn a background task that monitors file writes for regressions.
Subscribes to tool.file_written events on the bus. When a conflict
is detected (two agents modifying the same file in the same delegation
tree), publishes a regression.file_conflict event.
Expected tool.file_written event payload (JSON):
{
"file_path": "/path/to/file",
"agent_id": "writer",
"run_id": "run-123",
"correlation_id": "corr-456"
}