Skip to content

Craft Anything: understand how any software works, and craft your own.

Rust

Compare remote query test paths canonically on macOS (#949)

Tomáš Doubekfb546998b084
diff --git a/crates/ai/src/cli_agents/models.rs b/crates/ai/src/cli_agents/models.rs
index 68243bee..4163680a 100644
--- a/crates/ai/src/cli_agents/models.rs
+++ b/crates/ai/src/cli_agents/models.rs
@@ -306,6 +306,8 @@ mod tests {
let options = BackendOptions { command: Some(program.display().to_string()), ..Default::default() };
let (_, args) = query_command(&cfg, &options, Some(Path::new("/local/ignored"))).unwrap();
let output = Process::new("sh").arg("-c").arg(args.last().unwrap()).cwd(&remote).timeout(Duration::from_secs(2)).run_checked().unwrap();
+ // The shell resolves aliases in its working directory (macOS /var points to /private/var).
+ let remote = remote.canonicalize().unwrap();
assert_eq!(output.stdout_text().lines().collect::<Vec<_>>(), ["api", "model.list", "--param", &format!("location[directory]={}", remote.display())]);
}
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
index 85444d01..ab95581e 100644
--- a/docs/ROADMAP.md
+++ b/docs/ROADMAP.md
@@ -174,9 +174,10 @@ only when it's green and a maintainer has fully reviewed it, code as well as wor
- [ ] `a_helper_is_judged_by_whether_it_runs` (ai crate) sometimes fails when several crates'
tests run at once and passes alone: it writes a script and runs it straight away, which a
busy machine can refuse while another test's child still holds the file open
-- [ ] `a_remote_query_expands_only_the_remote_working_directory` (ai crate) fails on a Mac: the
- temp folder is `/var/…`, a link to `/private/var/…`, and the shell's `$PWD` gives the second.
- Compare with the folder's canonical path
+- [x] `a_remote_query_expands_only_the_remote_working_directory` compares the shell's `$PWD`
+ with the fixture's canonical path, so macOS's `/var` → `/private/var` alias does not fail
+ the test. Remote expansion and special-character quoting checks are retained — PR #949
+ — claimed: Codex, branch test/r5.2-macos-remote-query-path
- [ ] Revisit the two advisory exceptions in `deny.toml`: `rsa` (no fix; we only verify with public
keys) when rsa 0.10 lands, and unmaintained `zbus_names`/`zvariant` (Linux-only via keyring
and accesskit) when those move on. `deny.toml`'s comments say this is tracked in R0.3: point