Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,40 @@ jobs:
- run: cargo check --workspace
- name: release candidate validator tests
run: python3 -m unittest discover --start-directory tests/release --top-level-directory tests/release
windows-runner:
# The Windows process-tree backend cannot be observed from Linux: Job Object
# ownership, descendant convergence, and pipe inheritance only mean something
# on a real Windows kernel. This job is the native evidence for Foundation
# M004, so a green Linux run must never be read as Windows coverage.
#
# Scope is deliberately narrow. `eggwork-runner` runs its full suite on
# Windows; the server's own tests are `/bin/sh`-shaped and stay Linux-only
# until a separate milestone reshapes them. The installed production path
# (installed release bytes, not a build tree) is qualified by the
# `operational-qualification` workflow, not here.
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.89.0
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
key: windows-msvc
# Production code, linted on the Windows target: this is where a
# Windows-only regression actually matters, and it is the surface a
# release binary is built from.
- run: cargo clippy --locked --workspace --lib --bins --all-features -- -D warnings
# Test targets only for the crate this milestone owns. `eggwork-server`
# and `eggwork-client` unit tests are Linux-shaped (they spawn `/bin/sh`
# and set `0700` modes through `std::os::unix`), so they do not compile
# for Windows and are not claimed as coverage. Making them portable is
# its own milestone; until then this job's scope is stated, not widened
# to hide the gap.
- name: eggwork-runner test targets
run: cargo clippy --locked -p eggwork-runner --all-targets --all-features -- -D warnings
- name: Windows process-tree lifecycle suite
run: cargo test --locked -p eggwork-runner --all-targets -- --nocapture
release-drift:
# Eggpack is producer authority for the release matrix: the generated
# release workflow must be exactly what the pinned tool renders from the
Expand Down
46 changes: 33 additions & 13 deletions .github/workflows/operational-qualification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,18 +198,33 @@ jobs:

# Windows is dispositioned, not claimed.
#
# Hosted qualification found two structural gaps in the Windows candidate, and
# neither can be re-qualified without a release that contains the fixes:
# Corrected after Foundation M004. The original diagnosis here was wrong, and
# the comment said so before the cause was found; keeping the correction
# visible matters more than tidiness.
#
# The earlier text blamed the runner's Unix-only baseline environment
# (`PATH=/usr/bin:/bin`, no `SystemRoot`) for a Windows child exiting with no
# capturable exit code. That shaping was a real defect and it is fixed, but it
# was never the blocker: on Windows `LocalProcessRunner::run` refused with
# `UnsupportedPlatform` *before* creating any child, so no child ever received
# an environment. The `Failed / Internal / exit_code: null` receipt proved
# exactly that, which is what the M004 plan's baseline section records.
#
# The two genuine gaps in the qualified candidate are:
#
# 1. `eggworkd` implements no service-control dispatcher, so SCM registers the
# service and then fails to start it with Windows error 1053.
# 2. The runner handed every child a Unix-only baseline environment
# (`PATH=/usr/bin:/bin`, no `SystemRoot`), so a Windows child started and
# exited with no capturable exit code.
# service and then fails to start it with Windows error 1053. This is
# Operations M007, and it is still open.
# 2. Windows child execution itself: there was no process-tree owner at all.
# Foundation M004 adds a Job Object backend (`plans/closure/foundation-execution-core/004-status.md`)
# and has qualified its tree lifecycle on hosted `windows-latest`.
#
# Both are fixed on `main` and neither is in the qualified candidate's bytes.
# This job therefore records the candidate's real disposition and fails if the
# observation ever diverges from it, so the limitation cannot silently rot.
# Neither fix is in the qualified candidate's bytes: M004 needs a release cut
# first, and M007 is not implemented. This job therefore records the
# candidate's real disposition and fails if the observation ever diverges from
# it, so the limitation cannot silently rot. When a release containing M004 is
# cut, run this workflow with that exact tag to replace this disposition with a
# claim.
windows-installed-execution:
name: windows installed execution and service disposition
runs-on: windows-latest
Expand Down Expand Up @@ -245,10 +260,15 @@ jobs:
cargo test --locked -p eggwork-server --features qualification \
--test installed_qualification -- --ignored --exact qualification_fixture
- name: Qualify installed execution through the production client
# This is the step that previously could not be claimed. The candidate
# built a Unix-only child environment, so the shell could not resolve;
# the runner now supplies a platform-shaped environment. The test also
# proves required filesystem isolation is refused *before* the target
# This is the step that previously could not be claimed. For the current
# candidate the blocker is that the runner refuses Windows outright, not
# the child environment: `run` returned `UnsupportedPlatform` before any
# process existed, so the receipt was `Failed / Internal / exit_code: null`
# with nothing to blame on the environment. The runner now supplies a
# platform-shaped environment *and* owns the process tree, so this step
# becomes a real claim once the candidate's bytes contain Foundation M004.
# The test also proves required filesystem isolation is refused *before*
# the target
# runs, which is the truthful Windows disposition.
shell: bash
env:
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ and deliberate. Deep dives:

## Hard invariants (mechanically enforced — do not weaken)

1. **Process ownership is singular.** Only `eggwork-runner` and `eggwork-sandbox-helper` may create child processes; `eggwork-core`, `eggwork-client`, `eggwork-server` must not. Also banned outright: `command-group`, `duct`, `process-wrap`, `portable-pty`, `subprocess`. The allowlist lives in `scripts/check_execution_ownership.py`; adding an owner requires an architecture review. The guard scans only `crates/*/src/**/*.rs` — `tests/`, `examples/`, `build.rs`, and new top-level dirs are unscanned.
1. **Process ownership is singular.** Only `eggwork-runner` and `eggwork-sandbox-helper` may create child processes; `eggwork-core`, `eggwork-client`, `eggwork-server` must not. Also banned outright: `command-group`, `duct`, `process-wrap`, `portable-pty`, `subprocess`. The allowlist lives in `scripts/check_execution_ownership.py`; adding an owner requires an architecture review. The guard scans only `crates/*/src/**/*.rs` — `tests/`, `examples/`, `build.rs`, and new top-level dirs are unscanned. The dependency denylist is the exception: every crate is checked against it, and the one recorded exemption is `eggwork-runner` → `process-wrap` (Windows Job Object ownership, `cfg(windows)` only), in `APPROVED_PROCESS_DEP_EXCEPTIONS`.
2. **No direct service-manager invocation for the *node service*.** Eggwork never manages its own service by shelling out — the node service lifecycle goes through Eggup adapters. **Exception, and it is not a violation:** `eggwork-runner` invokes `systemd-run --scope` and `systemctl show`/`stop` for *per-execution transient cgroup units*, which is resource enforcement owned by the process-lifecycle crate, not service lifecycle. A new `systemctl`-shaped call must pick a side and match the code to it. (No dedicated Python guard; the only automated check, `no_direct_service_manager_invocation_exists`, scans three `eggwork-server` files. `eggwork-runner` is not covered — discipline is on you.)
3. **Crate dependencies stay one-way.** core/helper → nothing; client → core; server → core + runner (`eggwork-client` is dev-only for the server).
4. **Isolation claims are earned.** Advertise filesystem isolation only when `verify_trusted_helper` accepts the installed helper; the same function backs capability advertisement, `doctor`, and admission.
Expand Down
170 changes: 168 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ macOS and Windows ship the daemon only.

SHA-256 sidecars are integrity evidence, not authenticity.

**Windows executes; it does not isolate.** A Windows node runs executions and
owns the whole process tree with a Job Object, so timeout, cancellation, output
limit, and a target that outlives its leader all converge. It offers no
filesystem or resource isolation: a `Required` isolation or resource request is
refused before the target starts, and a best-effort request is reported as
`NotApplied` rather than enforced.

**Windows service management is unsupported and fails closed** — `eggworkd` has
no service-control dispatcher, so a registered service can never reach
`Running`. Every mutating `service` verb is refused before any mutation; Windows
Expand Down
Loading
Loading