Repository navigation
feat(runtime): ONE lifecycle — save/load on the base trait, bounded save-and-join on stop, typed boot slice 1 - #3447
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was true:
Runtime::shutdownexisted 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.stepper node);load_all_stateafter init (boot.load_stateper node)._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