Honor environment-resolved workspace roots (#40912)

## What changed

- Add effective workspace roots to `EnvironmentConfig` and use them when
  materializing permission profiles and filesystem context.
- Preserve selection roots for thread-owned configurations while allowing a
  ready environment attachment to supply its resolved roots.
- Propagate resolved roots to child environments and validate both command and
  `apply_patch` writes in owner-provided secondary workspaces.

GitOrigin-RevId: 1832c168ce1fc37fa67efc2a472998ab4f448c70
This commit is contained in:
sayan-oai authored and copyberry committed 2026-08-26 16:28:35 +00:00
1 parent 5b92c2d2f5
commit 7625bd5665
29 files changed
+191 -67

No files matched your search

+2 -2
View File
@@ -104,7 +104,7 @@ impl TurnEnvironment {
}
pub(crate) fn workspace_roots(&self) -> &[PathUri] {
&self.selection.workspace_roots
&self.config().workspace_roots
}
pub(crate) fn permission_profile(&self) -> &PermissionProfile {
@@ -160,7 +160,7 @@ impl std::fmt::Debug for TurnEnvironment {
.field("environment_id", &self.selection.environment_id)
.field("environment", &self.environment)
.field("cwd", &self.selection.cwd)
.field("workspace_roots", &self.selection.workspace_roots)
.field("workspace_roots", &self.config().workspace_roots)
.field("temporary_directories", &self.temporary_directories)
.field("shell", &self.shell)
.field("config", self.config())