Spread AbsolutePathBuf (#17792)

Mechanical change to promote absolute paths through code.
This commit is contained in:
pakrym-oai authored and GitHub committed 2026-04-14 14:26:10 -07:00
1 parent dae56994da
commit dd1321d11b
166 files changed
+1638 -1214

No files matched your search

+7 -5
View File
@@ -1,7 +1,5 @@
use std::collections::BTreeMap;
use std::collections::HashMap;
use std::path::Path;
use std::path::PathBuf;
use std::sync::Arc;
use std::sync::Mutex;
use std::sync::RwLock;
@@ -18,6 +16,7 @@ use codex_git_utils::get_head_commit_hash;
use codex_protocol::config_types::WindowsSandboxLevel;
use codex_protocol::protocol::SandboxPolicy;
use codex_protocol::protocol::SessionSource;
use codex_utils_absolute_path::AbsolutePathBuf;
#[derive(Clone, Debug, Default)]
struct WorkspaceGitMetadata {
@@ -112,7 +111,10 @@ fn build_turn_metadata_bag(
}
}
pub async fn build_turn_metadata_header(cwd: &Path, sandbox: Option<&str>) -> Option<String> {
pub async fn build_turn_metadata_header(
cwd: &AbsolutePathBuf,
sandbox: Option<&str>,
) -> Option<String> {
let repo_root = get_git_repo_root(cwd).map(|root| root.to_string_lossy().into_owned());
let (head_commit_hash, associated_remote_urls, has_changes) = tokio::join!(
@@ -146,7 +148,7 @@ pub async fn build_turn_metadata_header(cwd: &Path, sandbox: Option<&str>) -> Op
#[derive(Clone, Debug)]
pub(crate) struct TurnMetadataState {
cwd: PathBuf,
cwd: AbsolutePathBuf,
repo_root: Option<String>,
base_metadata: TurnMetadataBag,
base_header: String,
@@ -160,7 +162,7 @@ impl TurnMetadataState {
session_id: String,
session_source: &SessionSource,
turn_id: String,
cwd: PathBuf,
cwd: AbsolutePathBuf,
sandbox_policy: &SandboxPolicy,
windows_sandbox_level: WindowsSandboxLevel,
) -> Self {