Skip to content

feat(runtime): ONE lifecycle — save/load on the base trait, bounded save-and-join on stop, typed boot slice 1 - #3447

Merged
joelteply merged 1 commit into
canaryfrom
feat/one-lifecycle-cbar
Sep 2, 2026
Merged

joelteply merged 1 commit into
canaryfrom
feat/one-lifecycle-cbar

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

What was true: Runtime::shutdown existed and nothing on the production stop path ever called it — the SIGTERM handler killed sentinels, slept a flat 2 seconds, and _exit'd (the P1-deferred signal wiring from PR #1510, built upon ever since as if it existed). No module has ever saved on a real stop; the broadcast that never ran was also sequential and unbounded.

The one lifecycle, coded once at the lowest layer:

  • ServiceModule::save_state()/load_state() — default no-ops on the base trait; every concern has the facility, override when you own volatile state. Losing state becomes a contract violation, never a surprise.
  • Runtime::shutdown: parallel + bounded (2s/module, save→join) + receipted (shutdown.step per node); load_all_state after init (boot.load_state per node).
  • SIGTERM/SIGINT run the broadcast (3s overall) before the fast _exit — the flat sleep is gone. A stop saves, then dies, in seconds, deterministically.
  • kill_pid_tree: TERM → 3s → KILL. A process that argues is not a negotiation.
  • boot_plan.rs (BOOT-IS-A-TYPED-PLAN slice 1): continuum boot = typed, receipted bring-up — lane adopt-or-reap in Rust (identity-verified census, superseding the bash row), transport, core launch + Implement GAN-style Adversarial Training Loop #194 verify, desktop/eye-node Beside (never gating).

Tests: boot_plan 2/2, runtime 27/27, lane_process 3/3, ratchets green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…bounded save-and-join on stop, typed boot plan slice 1

Joel, tonight, in order: 'no lifecycle at all, random bullshit' / 'in my
architectures like CBAR I can call all nodes and tell them to save or load
state' / 'they all follow the same pattern, they gracefully and quickly save
and join threads' / 'do it at the lowest trait or layer always, code
anything ONCE'.

WHAT WAS TRUE: Runtime::shutdown existed and NOTHING on the production stop
path called it — the SIGTERM handler killed sentinels, slept a flat 2s, and
_exit'd (the P1-deferred signal wiring from PR #1510, built on ever since as
if it existed). No module has ever saved on a real stop. The broadcast that
never ran was also sequential and unbounded.

THE ONE LIFECYCLE, coded once at the lowest layer:
- ServiceModule gains save_state()/load_state() with default no-ops — every
  concern has the facility; a module holding volatile state overrides, and
  losing state becomes a contract violation, never a surprise.
- Runtime::shutdown is now PARALLEL + BOUNDED (2s per module, save first
  then join) + RECEIPTED (shutdown.step probe per node); load_all_state
  broadcasts after init (boot.load_state per node).
- The SIGTERM/SIGINT handlers run the broadcast (3s overall bound) before
  the fast _exit — the flat 2s sleep is gone; a stop saves, then dies, in
  seconds, deterministically.
- kill_pid_tree escalates TERM → 3s → KILL: a process that argues is not a
  negotiation ('I'm version 15 of code that looks identical').
- boot_plan.rs (BOOT-IS-A-TYPED-PLAN slice 1): 'continuum boot' runs typed,
  receipted runtime bring-up of an installed binary — adopt-or-reap lanes
  (Rust census + identity-verified health, superseding the bash row), airc
  transport, core launch + #194 verify, desktop/eye-node as Beside steps
  that never gate the core. One boot.step receipt row per step.

Tests: boot_plan 2/2, runtime 27/27, lane_process 3/3, unwrap ratchet green.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply enabled auto-merge (squash) September 2, 2026 15:01
@joelteply
joelteply merged commit 281fc96 into canary Sep 2, 2026
4 checks passed
@joelteply
joelteply deleted the feat/one-lifecycle-cbar branch September 2, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant