refactor(#2285): drop coordinator 1:1 path accessors, callers use paths:: directly

This commit is contained in:
damocles 2026-07-10 20:18:27 +02:00 committed by mara
commit cfb84b420a
13 changed files with 38 additions and 56 deletions

View file

@ -110,7 +110,7 @@ pub(super) fn gc_orphans(coord: &Coordinator, approvals: Vec<Approval>) -> Vec<A
/// dashboard event (instead of forcing the dashboard to wait a
/// `/api/state` cycle to see the diff for newly-queued approvals).
pub(crate) async fn approval_diff(agent: &str, approval_id: i64) -> String {
let applied = Coordinator::agent_applied_dir(agent);
let applied = crate::paths::applied_dir(agent);
if !applied.join(".git").exists() {
return format!("(no applied git repo at {})", applied.display());
}
@ -190,7 +190,7 @@ pub(super) async fn get_approval_diff(
if !matches!(approval.kind, hive_sh4re::ApprovalKind::ApplyCommit) {
return Err(error_problem("spawn approvals carry no commit to diff"));
}
let applied = Coordinator::agent_applied_dir(&approval.agent);
let applied = crate::paths::applied_dir(&approval.agent);
if !applied.join(".git").exists() {
return Ok(plain_text(format!(
"(no applied git repo at {})",