You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: INVARIANTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ materialization, messaging, DING, or presence must preserve them.
5
5
6
6
| Invariant | Guarantee | Proof |
7
7
|---|---|---|
8
-
|**Supervisor-decoupled lifecycle**|SIGTERM or SIGKILL of st2 never kills a task. A new runner adopts survivors; only explicit teardown kills. This covers PTY and exec tasks. |`tests/nomad_survival.rs`|
8
+
|**R11 control-plane replacement safety**|Normal stop or SIGKILL of `st2 up`, atomic binary replacement, and control-plane restart leave live PTY and exec agents usable with the same PID and creation identity. The replacement adopts each survivor exactly once, launches only genuinely missing work, and never duplicates a survivor; only explicit teardown kills an agent. |`tests/nomad_survival.rs::normal_stop_and_binary_replacement_adopt_exec_unchanged_without_duplicate`; `tests/nomad_survival.rs::forced_kill_and_binary_replacement_adopt_exec_unchanged_without_duplicate`; `tests/nomad_survival.rs::normal_stop_and_binary_replacement_adopt_pty_unchanged_without_duplicate`; `tests/nomad_survival.rs::forced_kill_and_binary_replacement_adopt_pty_unchanged_without_duplicate`;`tests/nomad_survival.rs::explicit_teardown_kills_exec_but_plain_stop_does_not`; `tests/nomad_survival.rs::explicit_teardown_kills_pty_but_plain_stop_does_not`|
9
9
|**Transport-decoupled lifecycle**| Each task is isolated from a supervisor/transport process-group or cgroup cascade. |`tests/transport_isolation.rs`; `tests/transport_isolation_macos.rs`|
10
10
|**Clean exec teardown**| Killing an exec task reaps its whole process group. |`tests/exec_backend.rs::exec_kill_reaps_the_whole_process_group_not_just_the_leader`|
11
11
|**Bounded restart diagnostics**| Relaunching an exec task preserves the just-finished log as one prior generation while bounding retained diagnostics to current plus prior. Final retirement removes the PID and both logs. |`tests/exec_backend.rs::exec_restart_reap_keeps_bounded_diagnostics_and_final_remove_cleans_them`; `tests/run.rs::up_once_finally_removes_dead_retired_tasks_without_restarting_them`|
0 commit comments