Skip to content

Create windows-runtime.md#107

Open
passcod wants to merge 7 commits into
claude/pr-105-spec-tracey-config-70jsvhfrom
claude/seedling-oci-vhdx-layering-7xh5f0
Open

Create windows-runtime.md#107
passcod wants to merge 7 commits into
claude/pr-105-spec-tracey-config-70jsvhfrom
claude/seedling-oci-vhdx-layering-7xh5f0

Conversation

@passcod

@passcod passcod commented Jul 11, 2026

Copy link
Copy Markdown
Member

No description provided.

Alternative to the process-native Windows runtime draft: run each workload
in a process-isolated Windows container composed just-in-time from a
build-matching Microsoft OS base and the workload's VHDX artifact, obtaining
isolation, addressing, and mount-graph enforcement from the container
boundary (HCS compute system + HNS compartment) rather than reconstructing
them out of host primitives.

- docs/spec/runtime-windows-containers.md: draft spec, `wc[...]` namespace.
  Replaces the process-native infrastructure (Job Objects, per-instance SCM
  services/virtual-account SIDs, loopback aliasing, WFP, supervisor relay)
  with JIT layer composition, per-compartment fabric endpoints, direct-dial
  mounts, and mandatory namespace-boundary enforcement. The supervisor keeps
  exit-policy, log capture, and the stop ladder but carries no data plane.
- docs/plans/windows-runtime-containers.md: companion plan — shared and
  divergent workstreams, open questions, spikes, rollout, cost ledger.
- Registered runtime-windows-containers in .config/tracey/config.styx.

No application is special-cased: a database is an ordinary workload whose
base-image family is an artifact concern; migrating existing field installs
is an operations concern, not runtime behaviour.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D5LfrU3ZM4FJ5fMF91wBKh
@passcod
passcod changed the base branch from main to claude/pr-105-spec-tracey-config-70jsvh July 11, 2026 14:02
@github-code-quality

github-code-quality Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript, Rust

TypeScript / code-coverage/vitest

The overall coverage in the branch remains at 65%, unchanged from the branch.

Show a code coverage summary of the most impacted files.
File e14aa26 2ba7414 +/-
src/routes/Apps.tsx 74% 78% +4%

Rust / code-coverage/rust

The overall coverage remains at 55%, unchanged from the branch.


Updated July 12, 2026 12:36 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

Comment thread docs/spec/runtime-windows-containers.md Outdated
Comment thread docs/spec/runtime-windows-containers.md Outdated
Comment thread docs/spec/runtime-windows-containers.md Outdated
Comment thread docs/spec/runtime-windows-containers.md Outdated
Comment thread docs/spec/runtime-windows-containers.md Outdated
Comment thread docs/spec/runtime-windows-containers.md Outdated
Comment thread docs/spec/runtime-windows-containers.md Outdated
Comment thread docs/spec/runtime-windows-containers.md Outdated
Comment thread docs/spec/runtime-windows-containers.md Outdated
Comment thread docs/spec/runtime-windows-containers.md Outdated
claude added 6 commits July 12, 2026 00:49
Rewrite the spec to describe only what the Windows container runtime does,
delegating unchanged behaviour to the core specs:

- Drop every comparison to the sibling Windows spec and every reference to
  the plan document; state rules positively rather than as absences,
  non-goals, or future/"v1" framing; remove the threat-model/"honesty" and
  backup material that belong elsewhere.
- One runtime-chosen base pulled once per host build, no mirror and no
  per-artifact base; composition happens at image-preparation time, with a
  scratch layer stacked per instance start.
- Lean pod: owns its container's lifetime and restart policy, holds events
  in memory and hands them to seedlingd on reconnect; a gone pod is
  reconciled like any observed exit. Logging and durable records live in
  seedlingd.
- Workloads bind all interfaces inside their compartment (no injected bind
  address); service-address and mount reachability follow the portable
  dataplane rules realised at the compartment boundary.
- Infrastructure services (ingress, resolver) run as runtime-managed
  containers binding the host's configured ports; no hardcoded ports.
- Drop per-instance host accounts and the volume ACL dance; container
  mappings are the isolation. Capabilities lists only Windows-declared values.

Bring the plan into line with these decisions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D5LfrU3ZM4FJ5fMF91wBKh
…s on containerd

Spec:
- Artifacts are ordinary OCI images built without a base image, carrying only
  the workload's own layers; composition stacks the runtime's base beneath
  them into a runnable chain. Replaces the filesystem-blob framing, gaining
  layer dedup, incremental pulls, and standard registry tooling. Drop the
  bespoke verify rule (standard OCI pull) and the root-directory indirection.
- Infrastructure services are torn down when no workload requires them, so an
  idle host runs no infrastructure containers.

Plan:
- Settle the implementation on containerd + the runhcs shim + the Windows
  snapshotter, chosen on the "seedlingd restarts without losing workloads"
  axis: the shim is the per-instance supervisor and survives daemon restarts
  by construction. containerd is a seedling-managed infra dependency (lowest
  in the dependency graph), started on demand and stopped when the world is
  empty, so idle steady-state is one daemon. Restack via a synthesised merged
  image descriptor; networking stays seedling-owned over HNS.
- Firm up Spike A as the decider (Windows shim-reconnect across a containerd
  restart) with the hand-rolled Compute*-API fallback priced in the same
  spike. Record the base-less artifact format and its two producer paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D5LfrU3ZM4FJ5fMF91wBKh
Thread the settled implementation into the spec, following the Linux
runtime's precedent of naming its engine:

- wc[engine]: each instance runs as a process-isolated container through
  containerd and its runhcs shim; containerd is a runtime-managed
  infrastructure dependency, started ahead of what needs it and stopped when
  no workload remains, so an idle host runs only seedlingd.
- wc[shim]: the runhcs shim supervises the container and survives containerd
  and seedlingd restarts; a restarting containerd re-attaches to its shims.
- wc[reconnect]: on restart seedlingd reconnects to containerd and reconciles
  the state and exits it reports (replaces the hand-rolled pod event/identity
  rules, which containerd now owns).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D5LfrU3ZM4FJ5fMF91wBKh
Rename the rule namespace from wc[...] to wcr[...] across the spec and plan,
including all cross-reference anchors, and fix the plan's stale wcr[pod]
reference (the rule is wcr[shim]).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D5LfrU3ZM4FJ5fMF91wBKh
Tracey requires rule ids to have at least one dot. Rename the ten
single-segment ids: platform->platform.floor, base->base.image,
compose->compose.chain, engine->engine.lifecycle, container->container.model,
shim->shim.ownership, reconnect->daemon.reconnect, volume->volume.model,
capability->capability.map, artifact->artifact.format; update anchors and the
plan's references accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D5LfrU3ZM4FJ5fMF91wBKh
Draft the decider spike for the container runtime: does a process-isolated
Windows container survive a full containerd stop/start, so containerd can be a
seedling-managed, restartable infrastructure dependency (option B) rather than
the compute plane being hand-rolled on the Compute* APIs (option A).

- docs/plans/windows-spike-containerd.md: spike plan — at-stake rules
  (wcr[shim.ownership], wcr[daemon.reconnect], wcr[engine.lifecycle]),
  experiments, exit criteria, and the option-A fallback if survival fails.
- crates/spikes/src/bin/spike_containerd.rs: Windows-only harness driving the
  sequence via ctr and sc, with the make-or-break check — workload alive while
  containerd is stopped — done by opening the process directly, independent of
  containerd. Non-Windows builds compile to an explanatory stub.
- Register the spike-containerd binary and point the plan's Spike A at the doc.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D5LfrU3ZM4FJ5fMF91wBKh
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