Skip to content

fix: preserve enclave audit and expose finalization failures - #11194

Merged
lpcox merged 4 commits into
mainfrom
copilot/expose-fix-copilot-docker-failure
Nov 6, 2026
Merged

lpcox merged 4 commits into
mainfrom
copilot/expose-fix-copilot-docker-failure

Conversation

Copilot AI commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Audit lifecycle: Retain audit outside workDir; reject missing or invalid audit, extra invocations, failure records, and incomplete cleanup.
  • Diagnostics: Emit AWF_ENCLAVE_REGRESSION_FINALIZATION and retain bounded finalization.json, separating primary and secondary stop, exit, audit, and cleanup failures. Export independently of startup/invocation evidence, without raw exception text or audit payloads.
  • Boundary coverage: Add production-contract success fixtures and post-result failure cases. Preserve ownership, mode, link, no-follow, and identity checks; document the diagnostics contract.

Copilot AI changed the title [WIP] Expose and fix Copilot Docker enclave failure after invocation fix: preserve enclave audit and expose finalization failures Nov 6, 2026
Copilot AI requested a review from lpcox November 6, 2026 15:22
@lpcox
lpcox marked this pull request as ready for review November 6, 2026 15:24
Copilot AI adaptive review requested due to automatic review settings November 6, 2026 15:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 workDir and 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'),
@lpcox

lpcox commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

@copilot merge main, resolve conflicts, and address all review feedback

Copilot AI commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@copilot merge main, resolve conflicts, and address all review feedback

Merged main as a two-parent commit and addressed all three review findings in 9f93d52. Added regression coverage; Jest could not run because the npm registry was unreachable.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@copilot Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-11194 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit 1d4ce45

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🔌 Smoke Services is testing service connectivity for this pull request...

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Claude passed

Generated by Smoke Claude for #11194

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🔑 Smoke Copilot BYOK is testing direct BYOK mode on this pull request...

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Build Test Suite completed successfully!

Build Test Suite

Outcome: reported_no_action

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.

Generated from Build Test Suite · sonnet55 · ~18 AIC · ⊞ 5.7K · ◷

Generated by Build Test Suite for #11194

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

💎 Smoke Gemini is crystallizing results on this pull request...

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

Smoke Codex

Outcome: reported_no_action

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.

Generated from Smoke Codex · gpt54 · ~11 AIC · ⊞ 22.7K · ◷

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

OTEL smoke test

  • ✅ S1 Module loading: otel.js loads; exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, routerCallTracing, shutdown, isEnabled
  • ✅ S2 Tests: 3 suites, 75/75 passed
  • ✅ S3 Env forwarding: trace ID/parent span ID in env-passthrough.ts; OTEL_* vars in api-proxy-env-config.ts
  • ✅ S4 Token tracker: onUsage hook present in token-tracker-http.js
  • ✅ S5 Diagnostics: otel.jsonl has 1 record (no exporter errors observed)

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Cloud Hypervisor + Copilot smoke test

  1. Merged PR lookup: PASS
  2. github.com connectivity: PASS (HTTP 200)
  3. File write/read: PASS
  4. example.com blocked: PASS (HTTP 000)

Overall: PASS

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Chroot Version Comparison

Runtime Host Version Chroot Version Match?
Python Python 3.12.16 Python 3.12.16 ✅ YES
Node.js v24.22.2 v2.98.0 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Result: Not all tests passed (Node.js mismatch), so the smoke-chroot label was not added.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

chore: refresh canonical model sources
docs: sync schemas and specs with source changes
✅ GitHub MCP connectivity
✅ GitHub.com connectivity
✅ File write/read
✅ BYOK inference

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

@Copilot @lpcox

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

EGRESS_RESULT allow=pass deny=pass

  • ✅ Allowed domain (api.github.com): 200
  • ✅ Blocked domain (example.com): blocked

Overall: PASS — @Copilot

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions github-actions Bot added the smoke-copilot-network-isolation Copilot network-isolation egress smoke test label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

chore: refresh canonical model sources
docs: sync schemas and specs with source changes
✅ MCP connectivity
✅ GitHub.com connectivity
✅ File write/read test
✅ BYOK inference
Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) authenticated via Microsoft Entra
Overall: PASS
@Copilot @lpcox

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia ✅ 1/1 passed ✅ PASS
Bun hono ✅ 1/1 passed ✅ PASS
C++ fmt ✅ N/A ✅ PASS
C++ json ✅ N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world ✅* N/A ✅ PASS*
.NET json-parse ✅* N/A ✅ PASS*
Go color ✅ all passed ✅ PASS
Go env ✅ all passed ✅ PASS
Go uuid ✅ all passed ✅ PASS
Java gson ❌ 0/0 ❌ FAIL
Java caffeine ❌ 0/0 ❌ FAIL
Node.js clsx ✅ passed ✅ PASS
Node.js execa ✅ passed ✅ PASS
Node.js p-limit ✅ passed ✅ PASS
Rust fd ✅ 0/0 (no tests defined) ✅ PASS
Rust zoxide ✅ 0/0 (no tests defined) ✅ PASS

Overall: 7/8 ecosystems passed — FAIL

Failure details

  • Java: Maven could not resolve plugins from Maven Central (maven-resources-plugin:pom:3.4.0 ... Could not transfer artifact ... (internal_error)). The default ~/.m2 repository was also not writable at first, so I retried with -Dmaven.repo.local. Maven is configured to use the squid-proxy:3128 proxy, which appears unreachable from this environment.
  • *.NET: the first run failed on a NuGet first-run mutex (/run/user/1001 missing). It passed when I set DOTNET_CLI_HOME and XDG_RUNTIME_DIR to writable paths. This is a runner environment quirk, not a firewall issue.

The build-test label was not added because of the Java failures.

Generated by Build Test Suite for #11194 · copilot · auto · ~18 AIC · ⊞ 5.7K · ◷
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

  • API status: ✅ PASS
  • GitHub check: ✅ PASS
  • File status: ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #11194 · claude · haiku45 · ~14 AIC · ⊞ 6.1K · ◷
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot: PR "feat(router)!: update the bundled routing tables to schema version 2"

  • ✅ GitHub MCP
  • ✅ GitHub.com (200)
  • ✅ File write/read

PASS — @Copilot @lpcox

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Smoke Test

  • Last merged PRs: chore: refresh canonical model sources, docs: sync schemas and specs with source changes ✅
  • PR detail lookup: #11198 feat(router)!: update the bundled routing tables to schema version 2 / #11196 feat: make the AI-credit hard cap operator-configurable ✅
  • Playwright GitHub title check ❌
  • Temp file write/read ✅
  • npm ci && npm run build ✅
  • Overall status: FAIL

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@lpcox
lpcox enabled auto-merge (squash) November 6, 2026 18:51
@lpcox
lpcox merged commit 887324c into main Nov 6, 2026
153 of 160 checks passed
@lpcox
lpcox deleted the copilot/expose-fix-copilot-docker-failure branch November 6, 2026 19:07

This branch was previously deployed

1 inactive deployment
aoai-model — 9f93d52b Deployed Nov 6, 2026 by lpcox via conclusion #2275
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose and fix Copilot Docker enclave failure after a successful invocation

3 participants