feat(runtime): durable run loop — wire supervisor resume + journal the kernel loop#346
Draft
drewstone wants to merge 1 commit into
Draft
feat(runtime): durable run loop — wire supervisor resume + journal the kernel loop#346drewstone wants to merge 1 commit into
drewstone wants to merge 1 commit into
Conversation
…e kernel loop [WIP] Build-stage durability work captured as a draft for review/resume. See PR comment for spec, checklist, completion criteria, ranked alternatives, decisions, and resume steps.
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.
Durable run loop
Makes an agent run survive a worker crash or restart by wiring the run loop onto durable journals, reusing the runtime's existing resume primitives.
createSupervisor().run()loads an existing tree and rehydrates settled children (replaySpawnTree/materializeTreeView) instead of always starting fresh. These primitives were already built and tested; this wires them in.SpawnJournalinstead of the in-memory one, so a run's progress is durable without the caller opting in.Verification
A run killed mid-flight and reloaded resumes from the last committed step and does not redo committed work.
Relationship to the shared package
The kernel journal and tool-call repair are the agent-runtime consumer of the shared durability primitives (
@tangle-network/sdk-core/durability); once that package publishes, this re-points onto the shared contract so the runtime and the sandbox/cli-bridge paths share one recovery story.