fmt: apply cargo fmt to topology_worker.rs
ci / gates (push) Successful in 5s
ci / frontend (push) Successful in 27s
ci / rust (push) Successful in 4m3s
ci / e2e (push) Skipped
ci / publish (push) Successful in 2m40s

This commit is contained in:
Omar Sobh
2026-07-19 07:02:08 -07:00
parent 2a99bba6c1
commit 68d84bf1ad
+29 -27
View File
@@ -191,21 +191,20 @@ async fn run_job(
// doesn't bind /workspace/repo, so coding agents would spend their
// turns narrating without touching files — a much worse failure
// mode than a red run with a clear error.
let per_topic_url = match try_team_gateway_url(pool, id, WorkspaceId::from(job.workspace_id))
.await
{
Ok(url) => url,
Err(e) => {
eprintln!("topology_worker: team gateway resolution failed for run {id}: {e}");
let _ = cm_db::repo::topology_runs::fail(
pool,
id,
&format!("team container unavailable — {e}"),
)
.await;
return;
}
};
let per_topic_url =
match try_team_gateway_url(pool, id, WorkspaceId::from(job.workspace_id)).await {
Ok(url) => url,
Err(e) => {
eprintln!("topology_worker: team gateway resolution failed for run {id}: {e}");
let _ = cm_db::repo::topology_runs::fail(
pool,
id,
&format!("team container unavailable — {e}"),
)
.await;
return;
}
};
let per_topic_url = if per_topic_url.is_some() {
per_topic_url
} else {
@@ -697,18 +696,21 @@ async fn try_team_gateway_url(
}
Err(e) => return Err(format!("source_research_context({loop_id}): {e}")),
};
let source_topic =
match cm_db::repo::research_topics::get(pool, source_topic_id, workspace_id.as_uuid())
.await
{
Ok(Some(t)) => t,
Ok(None) => {
return Err(format!(
"source research topic {source_topic_id} not found in workspace"
));
}
Err(e) => return Err(format!("research_topics::get({source_topic_id}): {e}")),
};
let source_topic = match cm_db::repo::research_topics::get(
pool,
source_topic_id,
workspace_id.as_uuid(),
)
.await
{
Ok(Some(t)) => t,
Ok(None) => {
return Err(format!(
"source research topic {source_topic_id} not found in workspace"
));
}
Err(e) => return Err(format!("research_topics::get({source_topic_id}): {e}")),
};
let Some(repo_path) = source_topic.repo_workspace_path.clone() else {
return Err(format!(
"source research topic {source_topic_id} has no repo_workspace_path; \