Skip to content

.NET: Implement same approval process for LocalCodeAct as is used by Hyperlight - #8289

Merged
westey (westey-m) merged 1 commit into
microsoft:mainfrom
westey-m:dotnet-localcodeact-approval
Sep 11, 2026
Merged

.NET: Implement same approval process for LocalCodeAct as is used by Hyperlight#8289
westey (westey-m) merged 1 commit into
microsoft:mainfrom
westey-m:dotnet-localcodeact-approval

Conversation

@westey-m

Copy link
Copy Markdown
Contributor

Motivation & Context

Bring consistency to the different CodeAct implementations as to how approvals are processed.

Description & Review Guide

  • What are the major changes?
  • What is the impact of these changes?
  • What do you want reviewers to focus on?

Related Issue

Fixes #

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Copilot AI balanced review requested due to automatic review settings September 11, 2026 09:58
@agent-framework-automation agent-framework-automation Bot added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net labels Sep 11, 2026
@github-actions github-actions Bot changed the title Implement same approval process for LocalCodeAct as is used by Hyperlight .NET: Implement same approval process for LocalCodeAct as is used by Hyperlight Sep 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The implementation consistently mirrors Hyperlight behavior and includes focused documentation and test coverage.

Pull request overview

Adds Hyperlight-style approval propagation to LocalCodeAct.

Changes:

  • Propagates tool approval requirements to execute_code.
  • Adds configurable approval modes and documentation.
  • Adds regression coverage for provider and standalone function behavior.
File summaries
File Description
ApprovalPropagationTests.cs Tests approval propagation scenarios.
README.md Documents bundled tool approval.
LocalExecuteCodeFunction.cs Exposes approval metadata.
LocalCodeActProviderOptions.cs Adds approval configuration.
LocalCodeActProvider.cs Wraps execute_code when approval is required.
LocalCodeActApprovalMode.cs Defines approval modes.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAF Automated Review — Iteration 1

Result: No findings
Scope: full PR (1 commit(s)): 2c17c4dcb095
Model: gpt-5.6-sol-fast

Overview

The PR brings LocalCodeAct approval propagation in line with the established Hyperlight contract by deriving approval from the exact per-invocation tool snapshot and wrapping the model-facing execute_code function when required. The new tests cover both approval modes, gated and ungated tools, tools added after provider construction, standalone service discovery, and keyed service lookups. No PR-introduced Critical, High, or Medium defect remains after reconciliation.

Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants