Skip to content

feat(zygote): add accelerated process launcher - #772

Open
Martin Taillefer (geeknoid) wants to merge 1 commit into
mainfrom
fork-server
Open

Martin Taillefer (geeknoid) wants to merge 1 commit into
mainfrom
fork-server

Conversation

@geeknoid

Copy link
Copy Markdown
Member

Summary

  • add zygote_control, a std::process-style controller with accelerated Linux launches and native Windows/macOS process creation
  • add the pure-Rust zygote_rt target runtime with transparent and prepared entry modes plus a checked-in Protobuf protocol
  • add fail-closed portable and platform-specific sandbox controls, bounded output capture, worker sharding, lifecycle management, and fault-path coverage
  • add zygote_benchmarks, integration fixtures, user documentation, design notes, and the remaining forward-looking backlog

Validation

  • host and Windows-target cargo check, Clippy, and rustdoc
  • generated README checks, rustfmt, spellcheck, and diff hygiene
  • standalone fixture compilation
  • runtime, benchmark, coverage, Miri, and mutation suites left to CI

Copilot AI lite review requested due to automatic review settings September 21, 2026 03:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical and moderate findings affect child termination, protocol validation, descriptor cleanup, and lifecycle handling.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity

Open (2)
What changed in this PR

Adds accelerated Linux zygote launching, cross-platform process creation, runtime modes, sandboxing, protocol support, tests, documentation, and benchmarks.

Changes:

  • Introduces zygote_control and zygote_rt.
  • Adds transparent and prepared launch flows.
  • Adds fixtures, benchmarks, lifecycle handling, and workspace integration.
File Summary
README.md Documents workspace crates.
crates/​zygote_rt/​src/​zygote.proto Defines the protocol schema.
crates/​zygote_rt/​src/​prepared.rs Implements prepared runtime state.
crates/​zygote_rt/​src/​lib.rs Exposes runtime APIs.
crates/​zygote_rt/​src/​build.rs Configures runtime builds.
crates/​zygote_rt/​README.md Documents runtime usage.
crates/​zygote_rt/​logo.png Adds branding asset.
crates/​zygote_rt/​favicon.ico Adds documentation favicon.
crates/​zygote_rt/​CHANGELOG.md Records runtime changes.
crates/​zygote_rt/​Cargo.toml Defines the runtime crate.
crates/​zygote_control/​tests/​protocol.rs Tests protocol behavior.
crates/​zygote_control/​tests/​launch_semantics.rs Tests launch semantics.
crates/​zygote_control/​tests/​fixtures/​targets/​src/​lib.rs Implements test fixture behavior.
crates/​zygote_control/​tests/​fixtures/​targets/​src/​bin/​transparent.rs Defines transparent fixture entry.
crates/​zygote_control/​tests/​fixtures/​targets/​src/​bin/​prepared.rs Defines prepared fixture entry.
crates/​zygote_control/​tests/​fixtures/​targets/​examples/​controller.rs Exercises controller usage.
crates/​zygote_control/​tests/​fixtures/​targets/​Cargo.toml Defines fixture package metadata.
crates/​zygote_control/​tests/​fixtures/​targets/​build.rs Configures fixture linking.
crates/​zygote_control/​src/​zygote.rs Implements launcher lifecycle.
crates/​zygote_control/​src/​unix.rs Provides Unix process support.
crates/​zygote_control/​src/​stdio.rs Defines standard-stream configuration.
crates/​zygote_control/​src/​sandbox.rs Defines sandbox controls.
crates/​zygote_control/​src/​lib.rs Exposes controller APIs.
crates/​zygote_control/​src/​command.rs Implements launch configuration.
crates/​zygote_control/​src/​child.rs Implements child handles and output capture.
crates/​zygote_control/​README.md Documents controller usage.
crates/​zygote_control/​logo.png Adds branding asset.
crates/​zygote_control/​favicon.ico Adds documentation favicon.
crates/​zygote_control/​examples/​controller.rs Provides controller example.
crates/​zygote_control/​docs/​TODO.md Tracks future work.
crates/​zygote_control/​CHANGELOG.md Records controller changes.
crates/​zygote_control/​Cargo.toml Defines the controller crate.
crates/​zygote_benchmarks/​src/​bin/​transparent.rs Defines transparent benchmark fixture.
crates/​zygote_benchmarks/​src/​bin/​transparent_signals_ignored.rs Defines ignored-signal fixture.
crates/​zygote_benchmarks/​src/​bin/​transparent_signals_custom.rs Defines custom-signal fixture.
crates/​zygote_benchmarks/​src/​bin/​transparent_default.rs Defines default-signal fixture.
crates/​zygote_benchmarks/​src/​bin/​transparent_close_fallback_512.rs Defines descriptor fallback fixture.
crates/​zygote_benchmarks/​src/​bin/​transparent_close_fallback_4096.rs Defines large descriptor fallback fixture.
crates/​zygote_benchmarks/​src/​bin/​startup.rs Configures startup benchmarks.
crates/​zygote_benchmarks/​src/​bin/​prepared.rs Defines prepared benchmark fixture.
crates/​zygote_benchmarks/​src/​bin/​prepared_64m.rs Defines 64 MiB fixture.
crates/​zygote_benchmarks/​src/​bin/​prepared_1m.rs Defines 1 MiB fixture.
crates/​zygote_benchmarks/​src/​bin/​prepared_0.rs Defines empty-state fixture.
crates/​zygote_benchmarks/​src/​bin/​fixture.rs Implements benchmark workload.
crates/​zygote_benchmarks/​Cargo.toml Defines benchmark package metadata.
crates/​zygote_benchmarks/​build.rs Configures benchmark builds.
crates/​zygote_benchmarks/​benches/​zygote_benchmarks_specialization.rs Benchmarks specialization.
crates/​zygote_benchmarks/​benches/​zygote_benchmarks_scaling.rs Benchmarks scaling.
crates/​zygote_benchmarks/​benches/​zygote_benchmarks_output.rs Benchmarks output capture.
crates/​zygote_benchmarks/​benches/​zygote_benchmarks_launch.rs Benchmarks launch performance.
crates/​zygote_benchmarks/​benches/​support/​mod.rs Provides benchmark utilities.
CHANGELOG.md Registers crate changes.
Cargo.toml Updates workspace configuration.
Cargo.lock Locks dependencies.
.spelling Adds project terminology.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread crates/zygote_rt/src/native.rs Outdated
Comment thread crates/zygote_rt/src/native.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved packaging, lifecycle, and protocol-validation findings remain.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity

Open (2)
Resolved since last review (2)

Comment thread crates/zygote_control/test-fixtures/targets/Cargo.toml Outdated
Comment thread crates/zygote_control/src/zygote.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

One critical memory-safety issue and five moderate correctness or lifecycle issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (2)

Comment thread crates/zygote_rt/src/native.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical and moderate correctness, security, and portability issues remain.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity

Open (2)
Resolved since last review (1)

Comment thread crates/zygote_control/src/linux.rs
Comment thread crates/zygote_rt/src/native.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical and moderate issues affect process cleanup, descriptor safety, fail-closed validation, and FFI correctness.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 6 High severity · 2 Low severity

Open (8)

Comment thread crates/zygote_rt/src/native.rs Outdated
Comment thread crates/zygote_rt/src/native.rs
Comment thread crates/zygote_rt/src/native.rs Outdated
Comment thread crates/zygote_rt/src/prepared.rs Outdated
Comment thread crates/zygote_control/src/windows.rs
Comment thread crates/zygote_rt/src/native.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread crates/zygote_control/src/child.rs Outdated
Comment thread crates/zygote_control/src/linux.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical prepared-bootstrap behavior and additional runtime, benchmark, and test-coverage findings block approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 High severity · 1 Medium severity

Open (4)
Resolved since last review (6)

Comment thread crates/zygote_rt/src/prepared.rs
Comment thread crates/zygote_benchmarks/benches/support/mod.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical linker integration and moderate correctness/test findings remain.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

Comment thread crates/zygote_rt/src/build.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical descriptor-leak and protocol field-presence issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity

Open (2)
Resolved since last review (1)

Comment thread crates/zygote_control/src/linux.rs
Comment thread crates/zygote_rt/src/zygote.proto

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Address the worker-failure hang, bound worker allocation, and strengthen the denied-path sandbox test.

Review effort: Lite
Findings: None

Resolved since last review (2)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved sandbox-probing and prepared-launch error-reporting issues remain, along with test and documentation fixes.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)

Comment thread crates/zygote_control/src/lib.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The broad platform-sensitive change has an unresolved packet-size validation issue requiring human review.

Review effort: Lite
Findings: None

Resolved since last review (1)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical descriptor handling and moderate protocol validation issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)

Comment thread crates/zygote_control/src/linux.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

A critical Windows SID-attribute issue remains unresolved, and the platform-wide process-launching changes require human review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

Comment thread crates/zygote_control/src/windows.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Six unresolved moderate findings affect benchmark validity, backend consistency, fixture assertions, sandbox coverage, and prepared-startup diagnostics.

Review effort: Lite
Findings: None

Resolved since last review (1)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

A moderate fixture correctness issue remains unresolved; the runtime findings are minor.

Review effort: Lite
Findings: None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Three moderate issues remain unresolved and should be addressed before approval.

Review effort: Lite
Findings: None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Broad cross-platform process and sandbox changes include an unresolved moderate stdio-semantics issue.

Review effort: Lite
Findings: None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

An unresolved sandbox-launch failure distinction remains, and the low-level process changes require human review.

Review effort: Lite
Findings: None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical loader-environment behavior and cross-platform sandbox/validation issues remain unresolved; seccomp acknowledgement semantics also need clarification.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)

Comment thread crates/zygote_control/src/linux.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

A moderate validation issue remains, and the broad process-launching scope warrants final human review.

Review effort: Lite
Findings: None

Resolved since last review (1)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Two moderate findings remain unresolved, including a sandbox enforcement and seccomp launch-reporting issue.

Review effort: Lite
Findings: None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Seccomp acknowledgement ordering and its documented launch guarantee must be corrected.

Review effort: Lite
Findings: None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The Linux sandbox capability probe can report Reduce as supported when the launch will fail without required capabilities.

Review effort: Lite
Findings: None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Two moderate validation issues and one benchmark timing nit remain unresolved.

Review effort: Lite
Findings: None

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Static-only five-pass review completed. I found one Windows correctness defect and four test/measurement gaps; details are in the inline comments.

Claims I specifically attacked and did not break: bounded/canonical protobuf plus SCM_RIGHTS validation; specialization acknowledgement before Started; pidfd-backed signalling and failure cleanup; fail-closed privilege/seccomp/Landlock/cgroup policy application; worker/shutdown lock ordering; prepared-mode panic/FFI containment; and the raw-pointer/arena/ABI invariants across the unsafe runtime. I found no confirmed UB or exploitability chain meeting the security bar.

I assessed all 820 taxonomy classes (150 security, 162 correctness, 182 testing, 183 performance, 143 conformance), read and deduplicated 158 prior inline comments, and did not repeat optimization work already recorded in the PR’s TODO. Generated READMEs were excluded per repository policy.

Nothing was executed: no project code, tests, benchmarks, profiles, Miri, coverage, mutation, fuzzing, or live probes.

Comment thread crates/zygote_control/src/windows.rs Outdated
Comment thread crates/zygote_control/tests/launch_semantics.rs Outdated
Comment thread crates/zygote_control/tests/launch_semantics.rs
Comment thread crates/zygote_control/tests/launch_semantics.rs
Comment thread crates/zygote_benchmarks/benches/support/mod.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical and moderate issues affect memory safety, child lifecycle handling, worker capacity, configuration validity, and fail-closed sandboxing.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity · 2 Medium severity

Open (4)

Comment thread crates/zygote_control/src/linux.rs Outdated
Comment thread crates/zygote_rt/src/native.rs
Comment thread crates/zygote_control/src/linux.rs
Comment thread crates/zygote_control/src/zygote.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical Windows sandbox and handle-inheritance issues, plus two moderate correctness issues, remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity

Open (2)
Resolved since last review (4)

Comment thread crates/zygote_control/src/windows.rs Outdated
Comment thread crates/zygote_control/src/windows.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical CI runner exposure and worker-bound issues remain, along with additional moderate correctness and packaging issues.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity

Open (2)
Resolved since last review (2)

Comment thread .github/workflows/repository-checks.yml
Comment thread crates/zygote_control/src/zygote.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Five unresolved moderate findings affect benchmark correctness, health reporting, sandbox acknowledgement, and sensitive-data cleanup.

Review effort: Lite
Findings: None

Resolved since last review (2)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Two moderate unresolved runtime issues must be addressed before approval.

Review effort: Lite
Findings: None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Critical sandbox startup and protocol-validation issues remain unresolved, alongside cross-platform health-accounting gaps.

Review effort: Lite
Findings: 2 High severity · 1 Medium severity

Open (3)

Comment thread crates/zygote_rt/src/native.rs Outdated
Comment thread crates/zygote_rt/src/protocol.rs
Comment thread crates/zygote_control/src/command.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical runtime packet handling and moderate arena-clearing, worker-health/counting, and benchmark-platform issues require fixes.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (3)

Comment thread crates/zygote_rt/src/native.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical sandbox validation and reusable-memory wiping issues remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity · 1 Low severity

Open (3)
Resolved since last review (1)

Comment thread crates/zygote_rt/src/native.rs
Comment thread crates/zygote_rt/src/native.rs Outdated
Comment thread crates/zygote_control/src/zygote.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical descriptor-inheritance and moderate sandbox-probing findings block approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (3)

Comment thread crates/zygote_rt/src/native.rs Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 16921781-b55f-423e-9ac1-851b2cba7ac2

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved moderate issues affect benchmark failure handling, launch accounting, Linux shutdown recovery, sandbox capability reporting, and closed-stdio handling.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
Resolved since last review (1)

Comment on lines +68 to +70
#[cfg(any(target_os = "linux", windows))]
{
Ok(())
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