Preserve executor paths in read command actions (#36223)

## Why

Read command actions were omitted when a selected environment used a path
convention foreign to the app-server host. Clients need these actions to refer
to files in the executor's filesystem, not paths interpreted on the host.

## What changed

- Resolve read paths against the executor's `PathUri` and serialize them using
  the executor's native POSIX, Windows drive, or UNC convention.
- Accept same-drive Windows-relative paths while continuing to reject paths
  that require another drive's executor-local current directory.
- Document the path convention used by `commandExecution` notifications.

## Testing

Cover native and cross-platform path serialization, Windows drive-relative
joins, and selected-environment `item/started` and `item/completed`
notifications.

GitOrigin-RevId: 3c5a9bb1caafd35e04a0a0cceab91fee590372b9
This commit is contained in:
iceweasel-oai authored and copyberry committed 2026-07-30 21:12:41 +00:00
1 parent 745603a5a1
commit a01a2d9146
29 files changed
+259 -92

No files matched your search

+16 -1
View File
@@ -915,7 +915,22 @@ fn join_windows_root_relative_path_preserves_drive_or_share() {
}
#[test]
fn join_rejects_windows_drive_relative_path() {
fn join_resolves_windows_same_drive_relative_path() {
for (base, path, expected) in [
("file:///C:/base", r"C:tmp", "file:///C:/base/tmp"),
("file:///C:/base", r"c:tmp", "file:///C:/base/tmp"),
("file:///C:/base/dir", r"C:..\tmp", "file:///C:/base/tmp"),
("file:///C:/base", "C:", "file:///C:/base"),
] {
let base = PathUri::parse(base).expect("valid base URI");
let expected = PathUri::parse(expected).expect("valid expected URI");
assert_eq!(base.join(path), Ok(expected), "joining {path}");
}
}
#[test]
fn join_rejects_windows_other_drive_relative_path() {
let base = PathUri::parse("file:///C:/base").expect("valid base URI");
assert_eq!(