Uh oh!
There was an error while loading. Please reload this page.
feat(runtime): add durable continuation authority - #1573
Merged
likun666661 merged 14 commits intoJul 31, 2026
Conversation
zhiiw
marked this pull request as ready for review
July 31, 2026 15:03
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 freeto 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.
Summary
This change establishes durable continuation correctness on top of the canonical RuntimeEvent recovery store.
runtime_admissioncontinuation-start the only durable provider-call T1, backed by an opaque one-shot admission receipt;claim_repairstart + terminal facts and zero provider calls;Primary invariant
A durable continuation may call the provider only after one versioned composite immutable boundary has been rebuilt, revalidated, and atomically claimed. Every lineage segment uses the same replay projection. Only a continuation-start durably committed by the SQLite authority with
start_kind=runtime_admissiongrants provider execution authority;claim_repairis audit-only and never grants execution.Ownership and atomicity
SqliteRuntimeStore;BEGIN IMMEDIATEre-reads the latest immediate-source ledger, validates identity, position, and digest, requires exactly one terminal RuntimeEvent at the tail, checks an empty exact target, and inserts the claim.RuntimeKerneland the package-private one-shot admission proof/receipt consumed byRuntimeRunner.SessionManagerclassifies durable claim/start/terminal state before generic ledger repair.Claim and continuation-start failures roll back their SQLite transactions. A rejected non-terminal claim creates no row and does not seal the source, so the active Run can still commit its terminal fact.
Failure states and rollback
0;continuation_started_indeterminateunless ownership can be proven;Existing provider retry compatibility
The hosted runtime currently uses a file RuntimeEvent store and does not yet own the SQLite continuation authority lifecycle. To avoid regressing its existing child provider-429 retry, this change keeps an explicit
legacy_provider_retrylane:continuationSource, or continuation-start;A later host authority lifecycle integration will replace and remove this compatibility lane.
Compatibility
Explicitly out of scope
This change does not implement general typed retry/reattach, Bash replay, ShellRun reattach, conversation-clone evidence rewriting,
ContinuationExecutionProfileV1, Write/Edit file checkpoints, workspace/Git checkpoints, hosted SQLite authority lifecycle integration, or default hosted auto-resume. Those remain separate changes because they have different owners and failure boundaries.Validation
After rebasing onto
upstream/main@e4c6ddbf:These are focused proofs for the affected paths; this description does not use CI green as a substitute for concurrency, crash, or data-safety reasoning.