chore(context) Include guardian approval context (#15366)

## Summary
Include the guardian context in the developer message for approvals

## Testing
- [x] Updated unit tests
This commit is contained in:
Dylan Hurd
2026-03-21 16:31:22 +00:00
committed by GitHub
parent 06e06ab173
commit 0d9bb8ea58
4 changed files with 121 additions and 40 deletions
+1
View File
@@ -3439,6 +3439,7 @@ impl Session {
DeveloperInstructions::from_policy(
turn_context.sandbox_policy.get(),
turn_context.approval_policy.value(),
turn_context.config.approvals_reviewer,
self.services.exec_policy.current().as_ref(),
&turn_context.cwd,
turn_context
@@ -43,6 +43,7 @@ fn build_permissions_update_item(
Some(DeveloperInstructions::from_policy(
next.sandbox_policy.get(),
next.approval_policy.value(),
next.config.approvals_reviewer,
exec_policy,
&next.cwd,
next.features.enabled(Feature::ExecPermissionApprovals),
@@ -493,6 +493,7 @@ async fn permissions_message_includes_writable_roots() -> Result<()> {
let expected = DeveloperInstructions::from_policy(
&sandbox_policy,
AskForApproval::OnRequest,
test.config.approvals_reviewer,
&Policy::empty(),
test.config.cwd.as_path(),
false,