Skip to content

fix: preserve mounted hosts inode during enclave gateway setup - #11472

Merged
lpcox merged 3 commits into
mainfrom
copilot/awf-regression-job-investigate-enclave-failure
Nov 11, 2026
Merged

lpcox merged 3 commits into
mainfrom
copilot/awf-regression-job-investigate-enclave-failure

Conversation

Copilot AI commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

All six enclave jobs—Copilot, Codex, and Claude on Docker and Cloud Hypervisor—stop at gateway attachment in daily regression run 42974312039. The shared sed -i operation attempts to rename over Docker’s bind-mounted /etc/hosts; this patch rewrites the existing inode instead.

  • Gateway wiring: Read and filter hosts entries before rewriting the existing inode, avoiding rename while preserving unrelated entries. Use portable POSIX sed expressions for exact alias boundaries.
  • Regression coverage: Execute the production-generated shell across all six configurations; verify inode preservation, alias replacement (including space/tab-delimited aliases), and repeat-update idempotency.
  • Isolation: Retain gateway identity checks, exact network membership, readiness gates, and disconnect-on-failure cleanup.

Local validation and remaining gates

At head 59ca87e65, root build and lint pass, and all 67 tests in src/enclave/gateway.test.ts pass. The original new regression cases failed on macOS because GNU-only sed alternation retained stale aliases; the portability follow-up fixes those failures without weakening assertions.

The full root npm test -- --runInBand was attempted but interrupted before a final summary. It exposed failures in unchanged tests, including Unix-socket lifecycle setup (ENOENT on executor.sock, independently reproduced), Linux /proc/sys/kernel/random/boot_id assumptions, and evidence directory ancestry checks. The full suite is not green and needs validation on the supported Linux CI runner.

No existing reviews or review threads required action. Prior PR workflow runs require human approval and have no job logs; the only completed check observed was License compliance. CI on the latest head and the live daily six-job Docker/Cloud Hypervisor matrix remain unverified. A maintainer must authorize/re-trigger CI and review results before merge. No CI dispatch, approval, or merge was performed. PR remains draft pending these gates.

Copilot AI changed the title [WIP] Investigate enclave real-agent step failure across engines fix: preserve mounted hosts inode during enclave gateway setup Nov 11, 2026
Copilot AI requested a review from lpcox November 11, 2026 17:07
Use POSIX sed expressions for alias boundaries while preserving the mounted hosts inode. Cover stale aliases followed by spaces and tabs.

Co-authored-by: Copilot App <[email protected]>
@lpcox
lpcox marked this pull request as ready for review November 11, 2026 18:10
Copilot AI adaptive review requested due to automatic review settings November 11, 2026 18:10

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.

🔵 Needs a closer look

Supported-Linux CI and the six-job enclave matrix remain unverified, while the local hard-link test does not validate Docker bind-mount behavior or end-to-end gateway startup.

No open issues 🎉

What changed in this PR

Addresses the shared enclave gateway attachment failure in #11458 by updating Docker’s bind-mounted /etc/hosts without replacing its inode.

Changes:

  • Replaces sed -i with portable alias filtering followed by rewriting the existing file.
  • Adds generated-shell regression coverage for inode preservation, alias replacement, and repeat-update idempotency across six engine/runtime configurations.
File Description
src/​enclave/​gateway.ts Rewrites hosts contents without renaming the mounted file.
src/​enclave/​gateway.test.ts Updates shell expectations and adds inode, alias, and idempotency checks.

Review effort: Max (auto)

@lpcox
lpcox merged commit 443dcae into main Nov 11, 2026
47 of 48 checks passed
@lpcox
lpcox deleted the copilot/awf-regression-job-investigate-enclave-failure branch November 11, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[runtime-regression] Enclave real-agent step fails for all engines on Docker and Cloud Hypervisor in daily runtime regression: diagnostics unavailabl

3 participants