addressing comments

This commit is contained in:
kevin zhao
2025-11-18 10:15:30 -08:00
parent cda6857fff
commit 9cbe84748e
2 changed files with 10 additions and 6 deletions

View File

@@ -61,12 +61,17 @@ pub(crate) fn exec_policy_for(
}
};
let mut policy_paths: Vec<PathBuf> = Vec::new();
let entries = entries
.map(|entry| {
entry.map_err(|source| ExecPolicyError::ReadDir {
dir: policy_dir.clone(),
source,
})
})
.collect::<Result<Vec<_>, _>>()?;
let mut policy_paths: Vec<PathBuf> = Vec::with_capacity(entries.len());
for entry in entries {
let entry = entry.map_err(|source| ExecPolicyError::ReadDir {
dir: policy_dir.clone(),
source,
})?;
let path = entry.path();
if path
.extension()

View File

@@ -93,7 +93,6 @@ pub(crate) enum ApprovalRequirement {
Forbidden { reason: String },
}
/// Reflects the orchestrator's behavior (pre-refactor):
/// - Never, OnFailure: do not ask
/// - OnRequest: ask unless sandbox policy is DangerFullAccess
/// - UnlessTrusted: always ask