Experimental hybrid ACA sandbox tool execution through APIM - #200
Draft
Laveesh Rohra (larohra) wants to merge 39 commits into
Draft
Experimental hybrid ACA sandbox tool execution through APIM#200Laveesh Rohra (larohra) wants to merge 39 commits into
Laveesh Rohra (larohra) wants to merge 39 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ac548213-70cf-425e-a43f-5665e93d2dd5
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ac548213-70cf-425e-a43f-5665e93d2dd5
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ac548213-70cf-425e-a43f-5665e93d2dd5
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ac548213-70cf-425e-a43f-5665e93d2dd5
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dc895b41-586d-4824-97b1-6761d99a35de
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… into larohra/hybrid-sandbox-apim-spike
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use a non-login shell so run_shell inherits the ACA disk PATH, including the Python interpreter installed by the selected sandbox disk. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Capture final debug-off c1/c10 benchmarks, runtime and APIM histograms, token usage, lifecycle qualification, failed experiments, and retained-resource cleanup guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Note removal of the temporary service-wide export while retaining body-free API diagnostics and historical GatewayLogs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep completed output independent of bounded cleanup failures, scope orphan reaping by stable app identity, complete model and tool-failure accounting, and validate streaming benchmark terminal events. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5c8c2c7f-32ac-4e77-994c-c50a075d5f32
Slice each bounded deletion attempt from the remaining budget so a hung handle seam still leaves budget for the provider seam, bound completed-run cleanup by the drain window instead of the rollback window, re-check exact owner_kind and app_hash labels before every reaper delete, and count tool calls before deadline rejection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The completed-run deletion budget was derived from the drain window and capped at 5 s, which sliced the first attempt to 1.67 s: below the ACA SDK's 3 s long-running-operation polling interval and below every recorded deletion (clean-window average 3.793 s, maximum 6.929 s; diagnostic p95 14.381 s, maximum 15.280 s; live reaper delete 8.475 s), so routine deletions were cancelled. Size completed-run cleanup from that recorded latency instead: 24 s total across three seam attempts with an 8 s first slice and a 4 s minimum slice floor, while failed-acquire rollback keeps its 90 s window. Attempt slices now divide only the time actually remaining, so a hung seam neither starves the other seam nor extends the deadline, and completed output preservation is unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Laveesh Rohra (larohra)
force-pushed
the
larohra/aca-qualification-sweep
branch
3 times, most recently
from
September 3, 2026 17:36
6124f03 to
87feca2
Compare
Move normal cleanup off the delete LRO critical path, verify packages inside the sandbox, add an explicit bundle boundary, and expose content-free lifecycle progress. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5c8c2c7f-32ac-4e77-994c-c50a075d5f32
Laveesh Rohra (larohra)
force-pushed
the
larohra/aca-qualification-sweep
branch
2 times, most recently
from
September 3, 2026 18:53
3d6c4d5 to
5f30a32
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5c8c2c7f-32ac-4e77-994c-c50a075d5f32
Laveesh Rohra (larohra)
force-pushed
the
larohra/aca-qualification-sweep
branch
from
September 3, 2026 19:59
5f30a32 to
bb296b6
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 84c6007c-8a21-4dca-86d7-36cdf2693dc5
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5c8c2c7f-32ac-4e77-994c-c50a075d5f32
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 84c6007c-8a21-4dca-86d7-36cdf2693dc5
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5c8c2c7f-32ac-4e77-994c-c50a075d5f32
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 84c6007c-8a21-4dca-86d7-36cdf2693dc5
Laveesh Rohra (larohra)
force-pushed
the
larohra/aca-qualification-sweep
branch
from
September 4, 2026 19:06
bb296b6 to
bf5313e
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5c8c2c7f-32ac-4e77-994c-c50a075d5f32
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5c8c2c7f-32ac-4e77-994c-c50a075d5f32
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5c8c2c7f-32ac-4e77-994c-c50a075d5f32
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 5c8c2c7f-32ac-4e77-994c-c50a075d5f32
Laveesh Rohra (larohra)
force-pushed
the
larohra/aca-qualification-sweep
branch
from
September 8, 2026 23:20
df6ec3b to
70113a9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
FunctionMiddlewareover a strict file-journal protocol.larohra/aca-qualification-sweepand is intentionally not production-ready or a public API commitment.Does this introduce a breaking change?
Pull Request Type
How to Test
fd6589e: Ruff passed; mypy checked 106 source files; pytest passed 2,574 tests with 71 skipped and 85 deselected; coverage XML generated.What to Check
AZURE_FUNCTIONS_AGENTS_EXPERIMENTAL_HYBRID_TOOL_BUNDLE_ROOTis contained and fail-closed; absence preserves full app-root capture, while the sample owns its tools undersandbox_bundle/.app.zipback. The executor validates SHA-256 and publishes only bounded startup failure metadata before readiness/manifest.auto_suspend=Nonebefore package/model/tool work. Normal close drains, marks shutdown, and applies Disk 300/600 lifecycle before delete initiation.handle.request_delete()at five seconds and never awaits its LRO. A pre-acceptance timeout/exception goes directly to one exact-IDprovider.delete_sandbox()attempt under the existing 24-second completed-run budget, without retrying the stalled handle seam.SandboxNotFoundErroris successful cleanup. Dual failure preserves completed output and leaves terminal lifecycle/reaper backstops armed.sandbox_delete_fallbacksrecords fallback use; overall terminal cleanup failure remainssandbox_delete_failures. Confirmed deletion/duration metrics are emitted when the provider fallback completes.Independent Review Resolution
4bc61dc.fd6589e; an independent review found no blocking correctness, lifecycle, timeout, cancellation, telemetry, or output-preservation issue.fd6589ewithbcdd366without cherry-picking. Both implement the same bounded safety seam; this PR retainsfd6589ebecausesandbox_delete_fallbackshas unambiguous pre-acceptance semantics whilesandbox_delete_failuresremains the overall failure signal.Latest authoritative live qualification
fd6589eb0df88be39c8777caa807946fc513d8d2through the proven Flex remote-build ZIP path with build IDpr200-fd6589e-final. Wheel SHA-256:b3cc3b2089759cd43a9ce530b5e274e2179b17230158156517cd24cd9ac43a13; upload ZIP SHA-256:bc820818ed771f0fe68c735e0ace8841290042fd29c5727f9b2f58c1f686607a.038a89a9be84c3940cb40fa224db0728cb85fd6c242c778ef2079c99da63fb4amatched the changedfd6589eruntime source after Windows CRLF normalization. The fd fallback metric was present and the bcdd-only metric absent.2026-09-05T01:22:21.3350812Z. A 300.775-second attribution boundary then observed zero agent-chat requests and zero fd/bcdd fallback rows before load.customer-probe-alpha-repeat-3; exactly 21 requests, all HTTP 200, zero client errors, no extra request/c25/c30/duplicate stage.77ef399baseline: cold 27,705.7 ms; c1 p50 19,720.69 ms at 0.047903 req/s; c10 p50 27,559.73 ms at 0.307089 req/s.Runtime, cleanup, APIM, and token evidence
AzureDiagnosticscontained no row for the clean window or preceding day after the final read-only poll at2026-09-05T01:47:06.9293196Z. Backend/gateway-only percentiles and gateway cache count are therefore unavailable and are not inferred from client spans. APIM policies, diagnostics, identity, egress, and capacity were unchanged.2026-09-05T01:42:17.603235Z. No operator cleanup occurred.Diagnostic history preserved, excluded from current claims
bcdd366during c1 and c10 ran after that boundary. The bcdd-only metric proved mixed provenance, so the complete artifact is diagnostic only and none of its latency values is used.Other Information
Running/Normal, six functions, bundle rootsandbox_bundle, no debug/worker OTel/always-ready, Sandbox Group max 100/Succeeded/timeout 1800, final typed inventory zero. No teardown or unrelated resource change occurred.docs/demo/hybrid-sandbox-leadership/include the storyboard, narration, schema-v3 manifest, recording helpers, eleven redacted 1920x1080 stills, and the refreshed six-slide PowerPoint. The deck now carries the 2026-09-05 35.50% result, updated lifecycle/fallback data, speaker notes, and zero external relationships.docs/decisions/0009-hybrid-sandbox-tool-execution-spike.mdanddocs/decisions/0009-hybrid-sandbox-tool-execution-results.json.larohra-test-adc-tools-hosted-skill; cleanup commands are documented. No teardown was performed.