Repository navigation
Split enclave executor handler into focused modules - #11790
Merged
Merged
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
lpcox
marked this pull request as ready for review
November 18, 2026 19:03
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-module shared state and callbacks couple cancellation, queue shutdown, identity revocation, and disclosure-budget enforcement, requiring human review of the interacting lifecycle guarantees.
No open issues 🎉
What changed in this PR
Refactors AWF’s enclave executor into focused modules while preserving the public handler API, execution ordering, and shared per-run ledger and admission lane.
Changes:
- Extracts invocation processing, telemetry, and settlement/cancellation into separate helpers.
- Reduces the handler to defaults, dependency wiring, queue management, and API handling.
- Adds helper regression tests and extends image-layout module-loading coverage.
| File | Description |
|---|---|
src/enclave/image-layout.test.ts |
Adds loading checks for the three extracted modules. |
src/enclave/executor-modules.test.ts |
Tests telemetry, settlement, cancellation, and workspace cleanup. |
containers/enclave/script-executor/executor-telemetry.js |
Isolates timing diagnostics and outcome mapping. |
containers/enclave/script-executor/executor-settlement.js |
Encapsulates settlement, cancellation tracking, and teardown. |
containers/enclave/script-executor/executor-invocation.js |
Contains validation, admission, budget debit, execution, and response handling. |
containers/enclave/script-executor/executor-handler.js |
Wires helpers together and retains queue and public API management. |
Review effort: Max (adaptive)
Contributor
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
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.
createExecutorHandlermixed invocation processing, telemetry, and settlement/cancellation bookkeeping in a 568-line security-critical module. This refactor separates those concerns while preserving the public API and execution ordering.executor-invocation.js.executor-telemetry.js.executor-settlement.js.