Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
778d83c
docs(plans): register the repository interrogation corrective batch
Oct 23, 2026
6f41957
feat(security): M005a degraded isolation observability
Oct 23, 2026
a8abfcb
docs(plans): record the core protocol-contract ownership change as AD…
Oct 23, 2026
63699df
feat(security,data-plane): M005b helper environment parity + M005b GC…
Oct 23, 2026
b925003
docs(plans): register M005a/M005b as implemented and apply coordinato…
Oct 23, 2026
1da739b
feat(control-plane): M004 shared protocol contract
Oct 23, 2026
be54831
docs(plans): fill the implementation commit SHAs in the closure records
Oct 23, 2026
4258964
feat(data-plane): M005a declared-artifact capture fail-closed
Oct 23, 2026
c0ccf68
docs(plans): record the Workspace M005a implementation commit
Oct 23, 2026
1f1b56c
docs(plans): finish registering the five implemented milestones
Oct 23, 2026
275b070
docs(plans): align the five milestones' status lines with their closu…
Oct 25, 2026
af5a217
docs(plans): accept ADR-0007 — implement resource-scoped grants
Oct 25, 2026
721768d
feat(server): M005c resource-scoped authorization — implement the ADR…
Oct 25, 2026
496f4c8
feat(core,runner): M005 runner request validation parity — one owner …
Oct 25, 2026
c87a4b6
docs(architecture,plans): close divergence #4 and register the M005c …
Oct 25, 2026
c8999e1
feat(release): M008b OP-4/OP-6 — one owner per fact, and CI executes …
Oct 25, 2026
d488a31
docs(plans): register the M008a/M008b dispositions and add the harnes…
Oct 25, 2026
8e056f8
feat(docs): M008b OP-5 (part B) — the citation gate and the machine-e…
Oct 25, 2026
5df1b69
feat(server): M008a operator surface truthfulness — say what the oper…
Oct 25, 2026
fb3300c
docs(core,architecture): state the published meaning of NodeStatus::a…
Oct 25, 2026
ebf0bf1
docs(agents): state the configuration-fault rule and the secret-beari…
Oct 25, 2026
ec67c56
docs(architecture): M008b OP-5 — convert the citations, and wire the …
Oct 25, 2026
b433b26
docs(plans): close the four remaining milestones and register the new…
Oct 25, 2026
55f83d7
docs(plans): correct the C001 plan's stale status line
Oct 25, 2026
26cba99
fix(server): make the File import Unix-only so the Windows build pass…
Oct 25, 2026
c4de477
fix(sandbox-helper): make the cancellation test wait for the runner's…
Oct 25, 2026
21ad604
fix(runner): remove the platform-gated dead code the hosted Windows a…
Oct 25, 2026
c605674
fix(runner): make the node-owned-key test platform-correct, and add a…
Oct 25, 2026
5766a69
fix(server): drop a needless return that only clippy catches on macOS
Oct 25, 2026
22f5337
feat(server): make eggworkd a real Windows SCM service host
Oct 25, 2026
e72cd22
fix(server): make the Windows adapter reachable, and cover macos-x64
Oct 25, 2026
5664e8a
fix(qualification): register a genuinely foreign service, and record …
Oct 25, 2026
35285c2
fix(ci): move the macos-x64 job to an image that still exists
Oct 25, 2026
fe79ab7
fix(ci): stop the cleanup step inheriting sc.exe's exit code
Oct 25, 2026
0f54a3d
docs(closure): record the hosted Windows service lifecycle evidence
Oct 25, 2026
df72696
docs(closure): close M007 conditionally on the hosted evidence
Oct 25, 2026
80fbe0f
docs(closure): name the hosted run that discharged the two evidence i…
Oct 25, 2026
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
397 changes: 387 additions & 10 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

92 changes: 88 additions & 4 deletions .github/workflows/operational-qualification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,24 +284,108 @@ jobs:
--test installed_qualification -- --ignored \
--exact installed_release_admits_execution_and_refuses_unsupported_isolation \
--nocapture
- name: Qualify the truthful declared-artifact disposition
# Windows cannot capture declared outputs, and the qualified claim is
# the *refusal*: the node must not advertise `artifact.declared.v1`, and
# an execution that declares outputs must end in a failed state with a
# `failed` capture disposition and a diagnostic event — never a
# successful execution whose declared outputs were silently dropped.
# Without this step the hosted qualification would never invoke the
# suite, because the workflow selects suites by `--exact` name.
shell: bash
env:
RELEASE_QUALIFICATION_TOKEN: ${{ secrets.RELEASE_QUALIFICATION_TOKEN }}
EGGWORK_QUALIFY_DAEMON: ${{ runner.temp }}/qualification/bin/eggworkd.exe
EGGWORK_QUALIFY_CONFIG: ${{ runner.temp }}/qualification/state/node.json
EGGWORK_QUALIFY_TLS_DIR: ${{ runner.temp }}/qualification/state/tls
EGGWORK_QUALIFY_RECEIPT: ${{ runner.temp }}/receipts/execution-windows.json
EGGWORK_QUALIFY_PLATFORM: windows
run: |
set -euo pipefail
cargo test --locked -p eggwork-server --features qualification \
--test installed_qualification -- --ignored \
--exact installed_release_reports_a_truthful_declared_artifact_disposition \
--nocapture
- name: Record the service management disposition
shell: pwsh
run: |
$root = "$env:RUNNER_TEMP\qualification"
$exe = "$root\bin\eggworkd.exe"
$config = "$root\state\node.json"
$receipt = "$env:RUNNER_TEMP\receipts\windows-service.txt"
# Service management is still `unsupported`: the daemon is not a
# service host. What is qualified here is the *refusal*, which must
# happen before any mutation. A release that registers a service has
# lost that guarantee, so this is a hard failure, not a note.
# The disposition is a property of the *candidate's bytes*, and the
# candidate is what this job qualifies.
#
# A candidate that predates the service host refuses the mutating
# verbs before any mutation, and that refusal is what is qualified
# here. A candidate that carries the host registers a service,
# starts it, proves it reaches Running, stops it, and removes it.
#
# The daemon's own usage names its process modes, so the capability
# is read from the candidate under test rather than assumed from
# the branch this workflow lives on.
$usage = (& $exe 2>&1 | Out-String)
$isHost = $usage -match 'service-host'
"capability: service-host=$isHost" | Out-File -FilePath $receipt -Encoding utf8

$output = & $exe service install `
--config $config `
--executable $exe `
--service-config $config `
--windows-start-type manual 2>&1 | Out-String
$exit = $LASTEXITCODE
"service install exit=$exit output=$output" | Out-File -FilePath $receipt -Encoding utf8

if ($isHost) {
if ($exit -ne 0) {
throw "the candidate hosts a Windows service but the install failed: $output"
}
$start = & $exe service start `
--config $config `
--executable $exe `
--service-config $config `
--windows-start-type manual 2>&1 | Out-String
$startExit = $LASTEXITCODE
"service start exit=$startExit output=$start" | Out-File -FilePath $receipt -Encoding utf8 -Append
if ($startExit -ne 0) {
throw "the candidate hosts a Windows service but the service did not start: $start"
}
$status = & $exe service status `
--config $config `
--executable $exe `
--service-config $config `
--windows-start-type manual 2>&1 | Out-String
"service status output=$status" | Out-File -FilePath $receipt -Encoding utf8 -Append
if ($status -notmatch '"ownership":"Owned"') {
throw "the candidate registered the service but does not own it: $status"
}
if ($status -notmatch '"state":"Running"') {
throw "the candidate started the service but it is not Running: $status"
}
$stop = & $exe service stop `
--config $config `
--executable $exe `
--service-config $config `
--windows-start-type manual 2>&1 | Out-String
$stopExit = $LASTEXITCODE
"service stop exit=$stopExit output=$stop" | Out-File -FilePath $receipt -Encoding utf8 -Append
if ($stopExit -ne 0) {
throw "the candidate hosts a Windows service but the service did not stop: $stop"
}
$uninstall = & $exe service uninstall `
--config $config `
--executable $exe `
--service-config $config `
--windows-start-type manual 2>&1 | Out-String
$uninstallExit = $LASTEXITCODE
"service uninstall exit=$uninstallExit output=$uninstall" | Out-File -FilePath $receipt -Encoding utf8 -Append
if ($uninstallExit -ne 0) {
throw "the candidate hosts a Windows service but the service was not removed: $uninstall"
}
"DISPOSITION: supported (the candidate registered, started, and stopped the service)" | Out-File -FilePath $receipt -Encoding utf8 -Append
exit 0
}

$unsupported = $output -match 'unsupported'
if (-not $unsupported) {
"DISPOSITION: CHANGED, the service verb mutated state; update the support matrix" | Out-File -FilePath $receipt -Encoding utf8 -Append
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target/
/target-*/
__pycache__/
*.sqlite
*.sqlite-shm
Expand Down
14 changes: 10 additions & 4 deletions .skills/pre-submit-gate/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ description: Run the mandatory pre-submit verification gate for eggwork before a

# Pre-submit gate

Run the full gate before every commit. Six of the seven commands are cheap; the
one that costs real time is the workspace test suite, so start it first and read
results while it runs.
Run the full gate before every commit. All but two of the commands are cheap;
the ones that cost real time are the workspace test suite and the two
documentation gates, so start them first and read results while they run.

```bash
cargo test --locked --workspace --all-targets # slow — start first
Expand All @@ -17,6 +17,9 @@ cargo fmt --all -- --check
cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
cargo check --workspace
python3 -m unittest discover --start-directory tests/release --top-level-directory tests/release
python3 scripts/check_doc_citations.py
python3 scripts/check_doc_citations.py --prove-negative-exit
python3 scripts/check_quickstart_sync.py
git diff --check
```

Expand Down Expand Up @@ -48,7 +51,10 @@ tag. See the `cut-a-release` skill.
| `--prove-negative-exit` | Proves the scanner *detects* a synthetic forbidden spawn | **Not** a second full guard pass: it returns before `scan_sources()`/`check_dependencies()` |
| `cargo fmt --check` | Formatting drift (no `rustfmt.toml`, so default rustfmt) | — |
| `cargo clippy … -D warnings` | Lints; `unsafe_code = "deny"` and `clippy::all = "warn"` are workspace-level | — |
| `unittest discover` | The 52 Python harness tests backing `qualify_release.py`, `release_candidate_probe.py`, `verify_windows_reproducibility.py` | The Rust side |
| `unittest discover` | The Python harness tests backing `qualify_release.py`, `release_candidate_probe.py`, `verify_windows_reproducibility.py`, and the two documentation gates | The Rust side |
| `check_doc_citations.py` | A citation under `architecture/` or `docs/` that names a line number, a path that does not exist, a symbol that is not in the named file, or an ambiguous in-file symbol | Whether the cited symbol is the one the sentence *means* — that part is the design record's own re-verification |
| `check_doc_citations.py --prove-negative-exit` | Proves the citation gate *rejects* a deliberately wrong citation and accepts a correct one | A second full pass over the tree |
| `check_quickstart_sync.py` | `docs/quickstart.md` drifting from `scripts/quickstart.sh`, and the document's shown `doctor` output drifting from the node's real report | Whether the quickstart's steps are the *right* steps |
| `git diff --check` | Whitespace errors and conflict markers | — |

## Two limits worth knowing before you trust a green gate
Expand Down
24 changes: 16 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Rust-native, fixed-target remote execution fabric: a caller selects one node, su
- Check: `cargo check --workspace`
- Ownership guard: `python3 scripts/check_execution_ownership.py` (also `--prove-negative-exit`)
- Harness tests: `python3 -m unittest discover --start-directory tests/release --top-level-directory tests/release`
- Documentation gates: `python3 scripts/check_doc_citations.py` (also `--prove-negative-exit`) and `python3 scripts/check_quickstart_sync.py` — a citation under `architecture/` or `docs/` must name a **symbol**, never a line number, and `docs/quickstart.md` must agree with `scripts/quickstart.sh`
- Run the node: `cargo run -p eggwork-server --bin eggworkd -- run --config <node.json>`

`--locked` is load-bearing on `clippy` and `test`: a version bump that skips `Cargo.lock` passes both and then fails every release build.
Expand Down Expand Up @@ -59,12 +60,16 @@ reasoning and boundary evidence goes in `architecture/`.
| [docs/deployment.md](docs/deployment.md) | Install/update a node as service software via Eggup |
| [docs/releases.md](docs/releases.md) | Consume a published release; release identity, Windows reproducibility |

Quickstart commands in `docs/` are **executed and verified**, not illustrative.
The config loader's strictness (owner-only state directories `0700`, private key
`0600`, nothing group/world writable, and a sandbox helper outside world-writable
ancestors) is undocumented anywhere else and produces a single unhelpful
`configuration is invalid or unreadable` — if that message ever appears, check
permissions first.
Quickstart commands in `docs/` are **executed and verified**, not illustrative:
`scripts/quickstart.sh` runs the whole flow end to end and
`scripts/check_quickstart_sync.py` keeps the document and that script in
agreement. The config loader's strictness (owner-only state directories `0700`,
private key `0600`, nothing group/world writable, and a sandbox helper outside
world-writable ancestors) is undocumented anywhere else — since the M008a
corrective it is reported as a stable rule identifier, the offending file or
path, and the corrective action, and a secret-bearing item is named by its
role, never by its path. If a configuration fault still surfaces without a rule
id, check permissions first.

## Architecture index

Expand Down Expand Up @@ -95,12 +100,15 @@ and deliberate. Deep dives:
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.
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. The node's environment policy has one owner — `crates/eggwork-runner/policy/environment-policy.toml` — generated into each crate and pinned by a parity test, so the runner and the sandbox helper cannot enforce different rules.
5. **Fail closed** on untrusted helper, version skew, missing prior-generation digest, unsupported service backend. Degrade only when the caller never demanded a guarantee, and always record `NotApplied`.
6. **No release identity in `release/eggpack/`** — no tag, source SHA, artifact digest, or size.
7. **`.github/workflows/release.yml` is generated** by `eggpack ci generate`. Never hand-edit; `eggpack ci check` fails on drift.
8. **Never set `RUSTFLAGS`/`CARGO_*RUSTFLAGS`** — the env would silently replace the target-scoped Windows link policy in `.cargo/config.toml` (`/BREPRO`, `/DEBUG:NONE`) that makes MSVC release binaries reproducible.
9. **Windows service management fails closed.** `deployment::windows_scm_manager` is retained but refuses before any mutation; daemon has no SCM dispatcher.
10. **Protocol contract facts have one owner.** The control-plane API schema version and the `exec.argv.v1` capability name are declared once, publicly, in `eggwork-core`; the runner owns the capability names it produces (`LANDLOCK_WORKSPACE_RW_CAPABILITY`, `CGROUPS_V2_{MEMORY,CPU,PIDS}_CAPABILITY`, `WORKSPACE_RW_PROFILE`); the terminal/non-terminal classification of `ExecutionState` is owned by `eggwork-core`'s `ExecutionState::is_terminal` / `is_non_terminal`. A second copy of any of these in an endpoint crate is a defect, not a convenience. See [ADR-0008](plans/adrs/ADR-0008-core-protocol-contract-ownership.md).
11. **A capability is advertised only where the node can honour it, and a failed claim fails the execution, not the report.** `artifact.declared.v1` is advertised only when the platform's capture-capability fact (`artifact::capture_capability`) says the capture can complete; an execution whose declared outputs were not captured ends in a truthful non-success state with a first-class disposition (`ExecutionResult::artifact_capture`), never `Succeeded` with the outputs silently dropped. The mapping from a capture attempt to the terminal facts is one decision (`eggwork_server::decide_artifact_capture`).
12. **The release harness holds no remembered copy of a fact that has an owner.** The workspace version is read once, by `scripts/release_candidate_probe.py`; the install identities and the published target set come from `release/eggpack/distribution.toml`; the service identity comes from the candidate daemon. A second *reader* of one owner is fine — `crates/eggwork-server/tests/release_contract.rs` is exactly that — but a second *rememberer* is a second owner. The same rule governs the design record: a citation names a symbol, never a line number, and `scripts/check_doc_citations.py` is the gate.

## Code style

Expand Down Expand Up @@ -131,5 +139,5 @@ and deliberate. Deep dives:

- Report suspected vulnerabilities privately to the maintainers (see `SECURITY.md`); no public issue with exploit detail.
- Never commit secrets, node private keys, or published state (config, SQLite journal, workspaces, blobs, artifacts) — the latter belong to the installation root and never ship in a release artifact.
- Node trust requires a verified mTLS client CA and explicit per-principal grants; `config print` redacts private-key paths and certificate fingerprints.
- Node trust requires a verified mTLS client CA and explicit per-principal grants; a grant may narrow an operation to named resources, and the store's ownership fences remain authoritative; `config print` redacts private-key paths and certificate fingerprints.
- SHA-256 sidecars are integrity evidence, not authenticity.
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,18 @@ cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
cargo test --locked --workspace --all-targets
cargo check --workspace
python3 -m unittest discover --start-directory tests/release --top-level-directory tests/release
python3 scripts/check_doc_citations.py
python3 scripts/check_doc_citations.py --prove-negative-exit
python3 scripts/check_quickstart_sync.py
git diff --check
```

The two documentation gates are load-bearing for any change under `architecture/`
or `docs/`: a citation must name a **symbol**, never a line number, and the
quickstart document must agree with `scripts/quickstart.sh`, which is the
executed form of it. Both gates fail the build on a finding — see
[`.skills/pre-submit-gate/`](.skills/pre-submit-gate/).

`--locked` on the clippy and test steps is load-bearing. A workspace version bump
that does not update `Cargo.lock` builds fine locally and passes both without it,
then fails every release build at `cargo build --locked`. That cost a full
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

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

19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,21 @@ 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
binary installation and daemon runtime are unaffected.
**Windows refuses declared artifacts; it does not capture them.** A Windows
node cannot open a file beneath the workspace root without traversing a
symlink, so it refuses a declared output instead of capturing it. The node does
not advertise the `artifact.declared.v1` capability, and an execution that
declares outputs ends in a failed state with a `failed` capture disposition and
a diagnostic event — never a successful execution whose declared outputs were
silently dropped.

**Windows hosts a real service.** `eggworkd service-host --config <path>` is the
Windows service entry: it joins the service control manager, reports
`START_PENDING` while the node comes up, claims `RUNNING` only once the node is
ready, and converges the active executions on `STOP` before it reports `STOPPED`.
Eggup still owns registration and install/start/stop/uninstall — Eggwork hosts
the process, it does not manage the service. The lifecycle proof is a
source-built hosted run; no published release carries it yet.

## Design and contribution

Expand Down
Loading
Loading