.NET: Implement same approval process for LocalCodeAct as is used by Hyperlight - #8289
Conversation
There was a problem hiding this comment.
🟢 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.
There was a problem hiding this comment.
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.
Motivation & Context
Bring consistency to the different CodeAct implementations as to how approvals are processed.
Description & Review Guide
Related Issue
Fixes #
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.