Repository navigation
Retain actionable public enclave result failures and audit evidence - #11277
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Helper-backed setup failures can block storage cleanup because missing-file error codes are lost, and pre-invocation regression failures incorrectly trigger audit checks that produce spurious secondary failures.
2 open issues
What changed in this PR
Extends AWF’s existing public enclave diagnostic contract to retain actionable result failures and audit evidence across Docker and Cloud Hypervisor.
Changes:
- Adds bounded result classifications and identity-checked terminal executor outcomes.
- Inspects failed-result audits and retains Docker setup and guest entrypoint evidence.
- Adds coverage across Copilot, Codex, Claude, and both backends, and documents the contract.
| File | Description |
|---|---|
src/enclave/public-debug-events.ts |
Projects bounded entrypoint failures and preserves their priority. |
src/enclave/public-debug-events.test.ts |
Tests fallback evidence, redaction, limits, and file safety. |
src/enclave/public-debug-conformance.test-utils.ts |
Validates entrypoint operation metadata. |
src/enclave/public-debug-artifacts.ts |
Avoids implying capture when session data is unavailable. |
src/enclave/docker-host-executor.ts |
Retains setup diagnostics and protects recoverable sources. |
src/enclave/docker-host-executor.test.ts |
Covers setup, retention, custody, and cleanup failures. |
src/cloud-hypervisor/host-enclave-executor.ts |
Integrates session metadata and stderr fallback evidence. |
src/cloud-hypervisor/host-enclave-executor.test.ts |
Tests fallback failures with missing session transcripts. |
src/cloud-hypervisor/enclave-session-diagnostics.ts |
Exposes the shared session-operation allowlist. |
scripts/ci/run-enclave-agent-regression.js |
Classifies result failures and observes failure-path audits. |
scripts/ci/enclave-agent-regression.test.ts |
Exercises result and audit classifications across engines and backends. |
scripts/ci/collect-enclave-smoke-debug.test.ts |
Tests bounded metadata export and unsafe-evidence rejection. |
scripts/ci/collect-enclave-smoke-debug.cjs |
Validates and exports result, audit, and retention-unavailable evidence. |
scripts/ci/cloud-hypervisor-enclave-live-smoke.js |
Exposes bounded protocol failure reasons. |
docs/cloud-hypervisor-foundation.md |
Documents classifications, fallback evidence, and success requirements. |
containers/enclave/agent-executor/session-diagnostics.js |
Exports operation names for shared diagnostic validation. |
Review effort: Max (auto)
| if ((error as NodeJS.ErrnoException).code === 'ENOENT') continue; | ||
| throw error; |
|
@copilot address review feedback |
Addressed both review findings and pushed commit |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit dcf5faf |
|
@copilot merge main and resolve conflicts |
…-enclave-failure-evidence # Conflicts: # scripts/ci/collect-enclave-smoke-debug.test.ts # scripts/ci/enclave-agent-regression.test.ts # src/enclave/docker-host-executor.test.ts
Merged |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (5 files)
Coverage comparison generated by |


Post-readiness enclave failures collapsed to
result/unknown, skipped audit inspection, and obscured Docker setup failures and guest session-log errors. This PR extends the existing public diagnostic contract without changing backend execution.unknown.preflight-session-logwhen the transcript is missing.Example bounded result classification:
{ "resultFailure": { "category": "parser-protocol", "code": "invalid-json", "executorOutcome": "unknown" } }