.NET: Canonicalize Hyperlight sandbox fingerprints - #8295
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: b9da797e-a9ff-492f-b5c1-8e9c7af1d8dc
There was a problem hiding this comment.
🟢 Approval recommended
The implementation consistently captures build inputs, canonicalizes unordered configuration, and includes focused regression coverage.
Pull request overview
Canonicalizes Hyperlight sandbox fingerprints to ensure correct sandbox reuse and rebuilding.
Changes:
- Captures immutable run configuration snapshots.
- Generates order-stable SHA-256 fingerprints from structured JSON.
- Adds regression coverage for mutations, ordering, and collision-prone values.
File summaries
| File | Description |
|---|---|
SandboxExecutorTests.cs |
Tests fingerprint canonicalization and snapshot ownership. |
ProvideAIContextTests.cs |
Tests fingerprints across provider mutations. |
SandboxExecutor.cs |
Implements immutable snapshots and SHA-256 fingerprints. |
HyperlightExecuteCodeFunction.cs |
Supplies complete options to snapshots. |
HyperlightCodeActProvider.cs |
Captures current options per invocation. |
Review details
- Files reviewed: 5/5 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)): ea1c1ea81e93
Model: gpt-5.6-sol-fast
Overview
The change captures sandbox build inputs in run-scoped snapshots and derives reuse identity from canonical structured JSON hashed with SHA-256. Snapshot copying, ordinal ordering, serialized rebuilds, deterministic collision tests, and provider mutation tests provide strong coverage for the intended behavior. No Critical, High, or Medium issue remains after reconciling the implementation, callers, lifecycle, and tests.
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
Ensure Hyperlight sandbox reuse decisions account for the complete captured capability and runtime configuration.
Description & Review Guide
net8.0,net9.0, andnet10.0; all 49 unit tests pass onnet10.0.Related Issue
None.
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.