Skip to content

Add Apple Container samples and qualification - #1030

Draft
Richie Gomez (richiemsft) wants to merge 2 commits into
feature/apple-container-clifrom
feature/apple-container-qualification
Draft

Add Apple Container samples and qualification#1030
Richie Gomez (richiemsft) wants to merge 2 commits into
feature/apple-container-clifrom
feature/apple-container-qualification

Conversation

@richiemsft

@richiemsft Richie Gomez (richiemsft) commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

📖 Description

Adds the samples and local qualification layer for the experimental Apple
Container one-shot backend introduced by #972.

  • adds raw allow-network and default-block 0.8.0-alpha configurations;
  • updates the Node SDK example and runtime guidance;
  • expands real-runtime coverage for streams, mounts, timeout cleanup,
    concurrency, network isolation, firewall tamper resistance, and hard-exit
    recovery;
  • adds a local network-boundary harness that reproducibly builds and verifies
    the pinned MXC init image before qualification;
  • hardens mount overlap validation, recovery record creation, and bounded
    cleanup uncovered by the qualification suite.

The Apple Container qualification remains local-only and does not add a CI
workflow.

🔗 References

🔍 Validation

  • Validated 234 example/config files against the dev schema.
  • Built the Node SDK and passed the three targeted Apple Container unit tests.
  • Passed all 25 apple_container_common unit tests.
  • Passed all eight ignored real-runtime Apple Container qualification tests.
  • Passed the local Apple Container network-boundary qualification.
  • Ran both raw sample configurations through mxc-exec-mac.
  • Passed the exact macOS release build/test package matrix and Clippy with
    warnings denied.
  • Passed Rust formatting and diff whitespace checks.

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task

GitHub Actions runs the PR validation build automatically. The ADO pipeline
(MXC-PR-Build) is the Azure version of the PR pipeline, kept in parity with
the GitHub Actions build; it runs on merge to main, and Microsoft reviewers
with write access can trigger it on a PR with /azp run.

Microsoft Reviewers: Open in CodeFlow

Co-authored-by: Copilot <[email protected]>

Copilot-Session: b062729b-d6f3-47f6-9df0-6c1d5c8a1e5c
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: b062729b-d6f3-47f6-9df0-6c1d5c8a1e5c
console.log(
"\nQUALIFICATION PASS: Apple Container networking met the tested MXC boundary.",
);
} finally {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

issue (non-blocking): This finally handles ordinary failures, but Node exits immediately on the default SIGINT/SIGTERM behavior, so Ctrl-C during any awaited container/network operation skips this cleanup and leaves the labeled resources behind. Since this is an interactive, long-running qualification command, could we install signal handlers that run the same cleanup path before exiting (and ideally reconcile resources carrying OWNERSHIP_LABEL on the next run)?

Comment thread sdk/node/README.md
@@ -216,15 +216,26 @@ schema version `0.8.0-alpha`:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

issue (non-blocking): This now documents Apple Container as executable, but docs/schema.md still says the backend is config-only and runtime execution fails closed with unsupported_containment (the apple_container row around line 278). Could we update that canonical schema reference in this PR as well? The two docs currently give contradictory guidance about whether this example can run.

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
SKIP_EXIT=77
INIT_IMAGE="local/mxc-loopback-init:0.2"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

issue (non-blocking): This adds a third independent copy of the trusted init-image tag, alongside src/backends/apple_container/init/build.sh and NETWORK_BLOCK_INIT_IMAGE in cli.rs. The wrapper runs build.sh but ignores the verified image it reports, then exports this separate literal; after a version bump, a missed update here could either fail qualification or silently exercise an older locally-cached image while production trusts the new tag/digest. Could build.sh expose the canonical tag in a sourceable form (or print it for this wrapper to capture) so the qualification and production invariants cannot drift?

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.

2 participants