Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
0c7acc0
feat(lifecycle): add standalone Rust process supervisor
roodboi Nov 14, 2026
2208173
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 14, 2026
6a57cdb
fix(lifecycle): pass macOS supervisor lint without redundant cast
roodboi Nov 14, 2026
1339eb5
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 14, 2026
12e8976
feat(lifecycle): opt into native supervisor for host processes
roodboi Nov 14, 2026
9f60e7d
fix(lifecycle): isolate unreadable project state in global observations
roodboi Nov 14, 2026
bb285fd
fix(lifecycle): exclude unreadable-state placeholders from container …
roodboi Nov 14, 2026
4b3d1ae
merge: preserve supervisor and interactive session model registries
roodboi Nov 14, 2026
f8a9b67
merge: retain standalone supervisor alongside interactive session models
roodboi Nov 14, 2026
55aec84
fix(lifecycle): recover receipts across case-only command renames
roodboi Nov 14, 2026
b5b9860
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 14, 2026
c2bc1ff
fix(lifecycle): isolate supervisor control and serialize doctor retir…
roodboi Nov 14, 2026
597eb47
fix(lifecycle): accept inherited subprocess environment names
roodboi Nov 14, 2026
83f4f34
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 14, 2026
ff1e481
fix(lifecycle): place protocol regressions after implementation
roodboi Nov 14, 2026
dc1408e
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 14, 2026
7bc415f
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 14, 2026
3f6dcad
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 14, 2026
a5481c7
test(lifecycle): budget native controller cases for macOS
roodboi Nov 14, 2026
b8d89d0
fix(lifecycle): preflight supervisor and retain uncertain ownership
roodboi Nov 14, 2026
9326619
test(lifecycle): cover immediate supervisor definition replacement
roodboi Nov 14, 2026
766a3af
fix(lifecycle): recover native orphan sessions and bound idle work
roodboi Nov 14, 2026
01a4e24
fix(lifecycle): merge verified native recovery and launch leases
roodboi Nov 14, 2026
30b3453
fix(lifecycle): finish retirement before adopting commands
roodboi Nov 14, 2026
1a8d027
docs(lifecycle): describe verified orphan recovery and idle bounds
roodboi Nov 14, 2026
80550f2
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 14, 2026
30cd31d
fix(lifecycle): fence retired generations and survive helper replacement
roodboi Nov 14, 2026
e8511bd
fix(lifecycle): cancel delayed launches after generation retirement
roodboi Nov 14, 2026
42b7f82
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 14, 2026
047175a
test(lifecycle): observe unreaped exit without Darwin session identity
roodboi Nov 14, 2026
f353c3d
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 14, 2026
e2130cf
fix(lifecycle): verify Linux process UID independently of proc ownership
roodboi Nov 14, 2026
83a7925
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 14, 2026
e203585
test(lifecycle): confirm fixture zombies with non-reaping wait
roodboi Nov 14, 2026
fe144ec
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 14, 2026
768c3f0
test(lifecycle): canonicalize temporary homes before isolation checks
roodboi Nov 14, 2026
f82bb58
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 14, 2026
7d8304d
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 14, 2026
d60d4e2
fix(supervisor): fence orphan recovery against session ID reuse
roodboi Nov 14, 2026
f13b2c8
test(cli): disable daemon autostart in env plan acceptance
roodboi Nov 14, 2026
0301ffc
test(cli): identify unexpected env plan fixture state
roodboi Nov 14, 2026
f9ae813
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 14, 2026
4127a94
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 14, 2026
7a86e39
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 14, 2026
23548e0
test(supervisor): qualify both guard launch crash windows
roodboi Nov 14, 2026
e2e8a30
test(supervisor): await quiet command before guard crash
roodboi Nov 14, 2026
b228781
fix(supervisor): retain recovery authority after witness exit
roodboi Nov 14, 2026
30dde38
test(supervisor): reap paused caller on failed zombie assertion
roodboi Nov 14, 2026
0900133
test(supervisor): report receipt on failed owned stop
roodboi Nov 14, 2026
71fa093
fix(supervisor): retain zombie guard birth proof on Darwin
roodboi Nov 14, 2026
7dca617
fix(supervisor): inspect unreaped Darwin guard records
roodboi Nov 14, 2026
f952a17
fix(supervisor): retain stop admission recovery authority
roodboi Nov 14, 2026
bdc9afc
fix(supervisor): preserve recovered stop grace and guard admission
roodboi Nov 14, 2026
2288c40
fix(supervisor): recover guard loss during stop census
roodboi Nov 14, 2026
d508e2e
merge: propagate reviewed supervisor recovery fixes
roodboi Nov 14, 2026
59bd8d5
test(supervisor): make guard-loss recovery regressions deterministic
roodboi Nov 14, 2026
98d0b0a
test(supervisor): wait for kernel-observed guard stop before guard loss
roodboi Nov 14, 2026
2b3b3b2
merge: propagate deterministic guard-loss regression from #802
roodboi Nov 14, 2026
1c9c9b3
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 14, 2026
616b2f5
fix(lifecycle): refuse lost ownership state after supervisor use
roodboi Nov 14, 2026
e5bdf57
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 15, 2026
4b17889
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 15, 2026
2fb3e0e
test(e2e): register the recovery scenario's tmux root with the socket…
roodboi Nov 15, 2026
2d9c4ce
fix(supervisor): treat pidfd_open EINVAL for an exited group leader a…
roodboi Nov 15, 2026
bf664de
test(supervisor): pin pidfd_open EINVAL handling behind a seam
roodboi Nov 15, 2026
e6678df
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 15, 2026
1fbf333
test(supervisor): kill and reap pidfd seam members on any failure
roodboi Nov 15, 2026
682b260
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 15, 2026
033358a
fix(supervisor): frame every stop and status reply and count threaded…
roodboi Nov 15, 2026
b4317ec
fix(supervisor): never report success when the reply's receipt read f…
roodboi Nov 15, 2026
f4426a3
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 15, 2026
3fc81d0
fix(lifecycle): let incremental add wait for the server's whole stop-…
roodboi Nov 15, 2026
63614d6
test(lifecycle): retry ETXTBSY when spawning a just-copied supervisor
roodboi Nov 15, 2026
60d737b
fix(supervisor): reread a receipt replaced while it was being opened
roodboi Nov 15, 2026
f90a049
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 15, 2026
9ce8214
test(supervisor): give the receipt replacement test the display_name …
roodboi Nov 15, 2026
88f8546
test(e2e): register the host-process scenario's tmux root with the so…
roodboi Nov 15, 2026
eb47cc8
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 15, 2026
8ffd3c0
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 15, 2026
ca0fa30
fix(supervisor): append log records without a lock so no guard waits …
roodboi Nov 15, 2026
15bb1d0
docs(supervisor): separate stop and launch lock-wait outcomes; name s…
roodboi Nov 15, 2026
b2b8d53
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 15, 2026
80da56e
Merge branch 'feat/lifecycle-supervisor' into feat/lifecycle-supervis…
roodboi Nov 15, 2026
a9bc571
docs(lifecycle): list serve, add and status lock waits in the supervi…
roodboi Nov 15, 2026
897cb3e
Merge remote-tracking branch 'origin/next' into feat/lifecycle-superv…
roodboi Nov 15, 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
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,22 @@ jobs:
HACK_E2E_COMPOSE_PLUGIN_SHA256="$(sha256sum "$HACK_E2E_COMPOSE_PLUGIN_PATH" | cut -d ' ' -f1)"
export HACK_E2E_DOCKER_HOST HACK_E2E_NETWORK_SOURCE_REVISION HACK_E2E_NETWORK_CLI_SHA256 HACK_E2E_NETWORK_COMPILER_SHA256 HACK_E2E_COMPOSE_PLUGIN_PATH HACK_E2E_COMPOSE_PLUGIN_SHA256
HACK_E2E_REQUIRE_DOCKER=1 HACK_E2E_REQUIRE_TMUX=1 bun run test:e2e:local:docker --shard="$HACK_E2E_SHARD"
- name: Setup supervisor toolchain
if: matrix.shard == 4
uses: dtolnay/rust-toolchain@1.97.1
- name: Qualify lifecycle scenarios with the supervisor runner
if: matrix.shard == 4
env:
HACK_DAEMON_AUTOSTART_DISABLE: '1'
HACK_LIFECYCLE_RUNNER: supervisor
HACK_LIFECYCLE_SUPERVISOR_BINARY: ${{ github.workspace }}/dist/hack-lifecycle-supervisor
HACK_E2E_REQUIRE_DOCKER: '1'
HACK_E2E_DOCKER: '1'
HACK_E2E_CLI_BIN: ${{ github.workspace }}/dist/hack
run: |
cargo +1.97.1 build --locked --release --manifest-path packages/lifecycle-supervisor/Cargo.toml --target-dir .hack-local/target/lifecycle-supervisor
cp .hack-local/target/lifecycle-supervisor/release/hack-lifecycle-supervisor dist/hack-lifecycle-supervisor
bun tests/e2e/run.ts --only=lifecycle-host-process,lifecycle-session-recovery
- name: Preserve process-policy capsule and startup diagnostic
# Closed fixed-field JSON only (counts, enums, booleans); the gh log viewer truncates it inline.
if: failure()
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/lifecycle-supervisor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,47 @@ on:
pull_request:
paths:
- packages/lifecycle-supervisor/**
- src/lib/lifecycle-supervisor.ts
- src/lib/project-lifecycle-supervisor.ts
- src/lib/project-lifecycle-controller.ts
- src/lib/lifecycle-runtime.ts
- tests/lifecycle-supervisor-controller.test.ts
- tests/lifecycle-supervisor-observers.test.ts
- tests/lifecycle-state-publication.test.ts
- tests/lifecycle-runner-config.test.ts
- tests/e2e/scenarios/lifecycle-*.ts
- src/lib/project-lifecycle-hygiene.ts
- src/lib/lifecycle-runner.ts
- src/lib/runtime-projects.ts
- src/lib/private-file.ts
- src/lib/projects-registry-lock.ts
- src/lib/child-environment.ts
- src/commands/host-ps.ts
- src/commands/project.ts
- src/commands/doctor.ts
- .github/workflows/lifecycle-supervisor.yml
push:
branches: [next, main]
paths:
- packages/lifecycle-supervisor/**
- src/lib/lifecycle-supervisor.ts
- src/lib/project-lifecycle-supervisor.ts
- src/lib/project-lifecycle-controller.ts
- src/lib/lifecycle-runtime.ts
- tests/lifecycle-supervisor-controller.test.ts
- tests/lifecycle-supervisor-observers.test.ts
- tests/lifecycle-state-publication.test.ts
- tests/lifecycle-runner-config.test.ts
- tests/e2e/scenarios/lifecycle-*.ts
- src/lib/project-lifecycle-hygiene.ts
- src/lib/lifecycle-runner.ts
- src/lib/runtime-projects.ts
- src/lib/private-file.ts
- src/lib/projects-registry-lock.ts
- src/lib/child-environment.ts
- src/commands/host-ps.ts
- src/commands/project.ts
- src/commands/doctor.ts
- .github/workflows/lifecycle-supervisor.yml
workflow_dispatch:

Expand Down Expand Up @@ -42,5 +78,17 @@ jobs:
run: cargo clippy --locked --manifest-path packages/lifecycle-supervisor/Cargo.toml --all-targets -- -D warnings
- name: Test standalone supervisor with private fake callers
run: cargo test --locked --manifest-path packages/lifecycle-supervisor/Cargo.toml -- --test-threads=4
- name: Test deterministic guard crash windows (qualification build only)
run: cargo test --locked --manifest-path packages/lifecycle-supervisor/Cargo.toml --features test-hooks guard_killed_after_ -- --test-threads=1
- name: Build standalone release executable
run: cargo build --locked --release --manifest-path packages/lifecycle-supervisor/Cargo.toml
- uses: oven-sh/setup-bun@v1
with:
bun-version: "1.4.4"
- name: Install locked CLI test dependencies
run: bun install --frozen-lockfile
- name: Test current-source CLI controller against native supervisor
env:
HACK_TEST_REQUIRE_SUPERVISOR: '1'
HACK_TEST_SUPERVISOR_BINARY: ${{ env.CARGO_TARGET_DIR }}/release/hack-lifecycle-supervisor
run: bun test tests/lifecycle-supervisor-controller.test.ts tests/lifecycle-runner-config.test.ts tests/lifecycle-state-publication.test.ts tests/lifecycle-supervisor-observers.test.ts
31 changes: 31 additions & 0 deletions docs/diagrams/lifecycle-controller.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: Lifecycle controller · launch receipts and adoption
---
stateDiagram-v2
direction TB
[*] --> Idle
Idle --> Starting : Begin
Starting --> AwaitReply : Launch [pending published]
AwaitReply --> Ready : Accept
AwaitReply --> InspectLate : LoseReply
InspectLate --> LatePublished : PublishLate [native live]
LatePublished --> Failed : FailUnknown
Ready --> Adopted : Adopt [native live]
Failed --> Adopted : Adopt [native live]
Adopted --> AwaitReply : Add [not stopped]
Ready --> Aborted : Abort [epoch matches]
Failed --> Aborted : Abort [epoch matches]
Ready --> Stopped : Stop [absence confirmed]
Adopted --> Stopped : Stop [absence confirmed]
Failed --> Stopped : Stop [absence confirmed]
note right of Starting
INV ownership precedes launch
end note
note right of Adopted
INV old cleanup cannot stop
Token stable, epoch changes
end note
note right of Failed
Unknown is not absence
Verified late effect retained
end note
66 changes: 66 additions & 0 deletions docs/diagrams/lifecycle-controller.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading