feat: durable message lifecycle from admission to execution - #3721
Open
Astro-Han wants to merge 18 commits into
Open
feat: durable message lifecycle from admission to execution#3721Astro-Han wants to merge 18 commits into
Astro-Han wants to merge 18 commits into
Conversation
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Preserve live Client capability bindings, make cancellation retries idempotent, and keep admission-backed transcripts out of compatibility Run synthesis until their root contract owns them. Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Astro-Han
marked this pull request as ready for review
August 24, 2026 18:21
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.
Summary
This is the first end-to-end durable message lifecycle PR built from the latest
main, replacing Draft PR #3633. It does not cherry-pick or continue the #3633 patch series.The problem is simple: once
turn.message.submitaccepts a message, a Host crash must not make that message disappear, revive it into a queue, or execute it twice.The solution keeps one durable authority for the message admission and one lifecycle/settlement owner.
queued,leased, andin_flightare Host-memory projections rebuilt from durable facts.The four durable values are facts, not a persisted provider state machine:
Accepted: SQLite admission and the canonical transcript row committed atomically.HandedOff: a durable root admission/source proof, or an immutable steering event, proves that Root execution owns the message.Executed: a durable provider-request proof exists downstream of that handoff proof. Steering uses its event timestamp as the lower bound.Cancelled: a retract proof or terminal Stop proof closes the message without downstream execution.First-principles ownership
SqliteSessionMetadataStoreowns the durable message admission, transcript identity, ordering, edits, reorders, promotion, retract, lifecycle rows, and size boundaries.RootAdmissionOwnerowns the durable Root execution contract and source-message proof.HostMessageCoordinatorowns only the reconstructible queue projection and the shared proof classifier/settlement owner used by normal terminal cleanup and restart recovery.Crash-cut behavior
Acceptedmessage into Host memory; it is not executed.Executed; it does not replay the message.Accepted/HandedOfffacts converge toExecutedorCancelledfrom durable proofs.Scope
Included: atomic admission and transcript, edit/reorder/promotion/retract, successor handoff, proof-driven settlement, restart recovery, size boundaries, canonical transcript identity, durable capability derivation, and removal of the old RuntimeKernel queue authority.
Excluded: CLI/Desktop projection refactors and Side Conversation UI/hooks.
Verification
Only affected builds and tests were run; the full repository test suite was not run.
2ea21a689.npm --workspace @maka/runtime run buildpassed.npm --workspace @maka/storage run buildpassed; SQLite metadata suite: 51 passed.npm --workspace @maka/runtime-host run buildpassed; production SQLite + Runtime Host/UDS message, queue, and coordinator suites: 60 passed.npm run astryx:surface-inventorypassed locally.npm run format:checkpassed.32758898698passed for exact head2ea21a689.AI use
This PR was implemented with Codex assistance. The design, repository decisions, code changes, affected-test selection, review of Draft PR #3633 evidence, adversarial review, simplification audit, and final verification were directed and checked against the repository's durable authorities and production composition.