Repository navigation
fix: preserve enclave audit and expose finalization failures - #11194
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Validation gaps allow malformed invocation IDs and leftover agent-home data to pass checks, while inherited gate names cause invalid evidence to be misclassified as a read failure.
3 open issues
What changed in this PR
This PR addresses post-invocation failures in the enclave agent regression harness by preserving audits through AWF shutdown and exposing which finalization step failed.
Changes:
- Moves retained audits outside
workDirand adds audit and cleanup validation. - Adds bounded, redacted finalization diagnostics with separate primary and secondary failures and independent export.
- Expands success, failure, and file-safety fixtures and documents the diagnostics contract.
| File | Description |
|---|---|
scripts/ci/run-enclave-agent-regression.js |
Preserves audits and classifies finalization failures. |
scripts/ci/enclave-agent-regression.test.ts |
Adds production-contract audit fixtures and post-result failure coverage. |
scripts/ci/collect-enclave-smoke-debug.test.ts |
Tests independent diagnostic export, safety checks, and publication bounds. |
scripts/ci/collect-enclave-smoke-debug.cjs |
Validates and exports finalization records with updated publication limits. |
docs/cloud-hypervisor-foundation.md |
Documents finalization evidence and audit retention behavior. |
Review effort: Max (auto)
| const failure = item => { | ||
| check(object(item) && (item.gate === 'primary' | ||
| ? PRIMARY_STAGES.includes(item.reason) | ||
| : FINALIZATION_REASONS[item.gate]?.includes(item.reason) && item.reason !== 'none'), |
|
@copilot merge main, resolve conflicts, and address all review feedback |
…pilot-docker-failure Co-authored-by: lpcox <[email protected]>
Co-authored-by: lpcox <[email protected]>
Merged |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 1d4ce45 |
|
🔌 Smoke Services is testing service connectivity for this pull request... |
|
✅ Smoke Claude passed
|
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓
|
|
🔑 Smoke Copilot BYOK is testing direct BYOK mode on this pull request... |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
✅ Build Test Suite completed successfully! Build Test SuiteOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 Smoke CodexOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🚀 Security Guard has started processing this pull request |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
OTEL smoke test
|
|
Cloud Hypervisor + Copilot smoke test
Overall: PASS
|
Chroot Version Comparison
Result: Not all tests passed (Node.js mismatch), so the
|
|
chore: refresh canonical model sources Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) Overall status: PASS
|
|
EGRESS_RESULT allow=pass deny=pass
Overall: PASS —
|
|
chore: refresh canonical model sources
|
🏗️ Build Test Suite Results
Overall: 7/8 ecosystems passed — FAIL Failure details
The
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
Smoke Copilot: PR "feat(router)!: update the bundled routing tables to schema version 2"
PASS —
|
Smoke Test
|

A successful Copilot Docker enclave invocation could still fail because shutdown deleted the harness’s nested audit directory before validation. The aggregate error hid which finalization gate failed.
workDir; reject missing or invalid audit, extra invocations, failure records, and incomplete cleanup.AWF_ENCLAVE_REGRESSION_FINALIZATIONand retain boundedfinalization.json, separating primary and secondary stop, exit, audit, and cleanup failures. Export independently of startup/invocation evidence, without raw exception text or audit payloads.