Remove redundant legacy permission helpers (#61194)

## What changed

Remove `PermissionProfile::from_legacy_sandbox_policy` and the filesystem helpers for materializing workspace roots and adding legacy writable roots. Keep legacy template conversion self-contained and update round-trip tests to use the conversion that accepts a working directory.

## Testing

Update preset tests to compare converted legacy policies, and move extra-root metadata protection coverage to `FileSystemSandboxPolicy::workspace_write`.

GitOrigin-RevId: d545b329c13b2f09609fd2cbf42f0adbbda5386a
This commit is contained in:
ioanbudea-OAI
2026-11-12 22:14:30 +00:00
committed by copyberry
parent 4490060db6
commit f242b49c8a
4 changed files with 54 additions and 84 deletions
@@ -437,9 +437,6 @@ fn materializing_legacy_home_relative_workspace_denials_removes_all_grants() {
&native_root,
)),
);
materialized.push(policy.with_materialized_project_roots_for_workspace_roots(
std::slice::from_ref(&native_root),
));
}
for policy in materialized {
assert_eq!(policy, FileSystemSandboxPolicy::restricted(Vec::new()));