Skip to content

V0.2.0/container isolation - #3

Merged
gimlichael merged 18 commits into
mainfrom
v0.2.0/container-isolation
Nov 15, 2026
Merged

gimlichael merged 18 commits into
mainfrom
v0.2.0/container-isolation

Conversation

@gimlichael

Copy link
Copy Markdown
Member

This pull request introduces optional disposable Linux container execution for csrun, so a manifest piped to Docker runs the same engine inside a container with the selected .NET SDKs preinstalled. It also adds a self-contained module for building, testing, and deliberately publishing exact SDK environment images.

Container image:

  • Manifests from stdin execute the bundled engine in an unprivileged Linux container, with the image pinned to the latest released engine asset and verified by checksum
  • Generated code and build artifacts stay in container-owned storage, and no host mounts, credentials, or Docker socket are passed by default

SDK environment publishing:

  • Exact SDK inputs resolve to deterministic environment tags, with duplicate and unsupported channels rejected before Docker runs
  • Publication requires a clean checkout and a successful container suite on each requested architecture before pushing

Validation coverage:

  • Docker integration tests cover SDK and runtime inventories, console and xUnit execution, exit-code behavior, and hardened read-only execution
  • Publishing contract tests verify tag planning and error propagation without Docker or network access

Continuous integration:

  • A shared container workflow validates each SDK environment on Ubuntu AMD64 and ARM64 for pull requests and release tags
  • The draft release job waits for container validation before creating the draft

Documentation:

  • The README documents container usage, isolation limits, and the SDK environment publishing flow
  • The container validation record lists local checks, measured image sizes, and open limits, including unverified ARM64 execution

Repository hygiene:

  • Local release artifacts under artifacts/ are ignored

csrun previously ran only natively on Windows PowerShell. This adds a Dockerfile and a stdin entry point so a manifest piped to docker run executes the bundled engine inside a Linux container with the selected .NET SDKs preinstalled.
Publishing SDK environment tags needs repeatable, checked Docker operations. The BuildAndPublish module resolves exact SDK inputs to environment tags, builds the image from the latest released engine, runs the container suite, and only publishes when explicitly requested.
The container image must prove its SDK inventories, stdin execution, xUnit discovery, exit codes, and hardened runtime behavior. These Docker tests execute the packaged engine rather than relying on the native Windows suite.
Image publication metadata and other local build outputs are written under artifacts/, which should not be committed accidentally.
Container images must be validated before release, alongside the native Windows tests. The shared container workflow runs on Ubuntu AMD64 and ARM64 for each SDK environment, and the release job waits for it before creating a draft.
The container image changes how csrun is run and published, so the README documents disposable container execution, isolation limits, and the SDK environment publishing flow. The validation document records the local checks and their limits.
The 0.2.0 release adds optional container execution and SDK environment publishing while keeping the standalone engine and manifest schema unchanged. The changelog records that release scope for users.
@gimlichael gimlichael self-assigned this Nov 15, 2026
@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The latest changes appear safe to merge; both previous findings are addressed.

Summary

Adds disposable Linux container execution and a build, test, and publishing flow for exact SDK environments.

  • Docker can run csrun manifests in a disposable Linux container.
  • Exact SDK versions produce predictable image tags for building and publishing.
  • Pull requests and releases check container images on native AMD64 and ARM64 runners.
  • Published releases carry tested SDK images through to Docker Hub without rebuilding.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Candidate[Candidate engine] --> Native[Native AMD64 and ARM64 tests]
  Native --> OCI[Tested OCI content]
  OCI --> Draft[Draft GitHub Release]
  Draft --> Approval[Approved publication]
  Approval --> Verify[Check released engine and saved results]
  Verify --> Hub[Promote unchanged content to Docker Hub]
Loading

Reviews (3) · Last reviewed commit: "📝 document native skopeo requirement fo..." · Reviewed by Greptile

aicia-bot and others added 8 commits November 15, 2026 22:19
Local and CI image builds now export one OCI archive per platform with SBOM and maximum provenance, then load that exact artifact for native container tests. The module refuses foreign CPUs instead of emulating, supports independent Docker contexts and builders, and pins the engine URL through a build argument so forks can package their own reviewed engine.
The container workflow now builds and tests each SDK variant natively on fixed Ubuntu 26.04 AMD64 and ARM64 runners. Actionlint is told these are GitHub-hosted labels, and a quality job fails when either architecture or any SDK variant does not succeed.
Pull request validation moves from the floating windows-latest label to windows-2025 and uses the published upload-artifact tag. A final quality job requires the Windows and container results to succeed, so skipped or cancelled dependencies cannot pass the gate.
Release preparation now assembles the natively tested OCI archives into a checksummed draft release. A separate deployment workflow resolves the published latest engine once, verifies it matches the tested image, and promotes the existing content to Docker Hub without rebuilding.
Repository policy now requires fixed Ubuntu 26.04 AMD64 and ARM64 labels for every Linux job, forbids floating or older Ubuntu labels, and keeps Windows validation on windows-2025 until a runner upgrade is reviewed.
The README and container validation record now describe the export-once native test flow, the draft-release and deployment stages, manual multi-context builds, and the remaining limits that require an approved push to verify.
Comment thread tools/release-images.py Resolved
Comment thread BuildAndPublish.psm1 Resolved
Remote utility Docker daemons cannot bind-mount client archives or registry credentials, so builds that need the Skopeo utility container failed late. Check the transport before any metadata download or build and reject SSH and TCP daemons unless Skopeo is installed locally.
The release restore looked up the workflow run by its latest run id, which can differ from the attempt that produced the saved release. Query the recorded attempt so recovery validates the run that actually published the artifact.
The README now states that remote Docker daemons over SSH or TCP need Skopeo installed on the client, since the utility container cannot use client archives or credentials.
@gimlichael
gimlichael merged commit f6c99a7 into main Nov 15, 2026
10 checks passed
@gimlichael
gimlichael deleted the v0.2.0/container-isolation branch November 15, 2026 23:00
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