Repository navigation
feat(cloud-workers): durable transcript commit protocol for worker sessions - #104809
Merged
Merged
Conversation
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 12, 2026
…ssions (openclaw#104809) * feat(cloud-workers): add transcript commit protocol * feat(cloud-workers): persist transcript commit replay state * feat(cloud-workers): apply transcript commits to sessions * fix(cloud-workers): harden transcript commit admission * fix(cloud-workers): recover branched transcript commits * fix(cloud-workers): preserve diagnostic semantics
This was referenced Jul 12, 2026
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.
Part of #104294 (cloud workers, milestone 2, PR 6). Builds on the merged milestone-1 stack plus #104688 (authenticated worker role). Design:
docs/plan/cloud-workers.md("Session backend RPCs" — durable transcript commits).What Problem This Solves
An admitted worker (PR 5) still can't put anything in a session. This PR adds the durable transcript-commit contract: the worker appends semantic message turns and the gateway turns them into real transcript entries visible to normal
sessions.messages.subscribeclients — so a worker-run session appears in the sidebar exactly like a local one — with DAG integrity and idempotent replay guarantees.Why This Change Was Made
SessionManager.appendMessageso parent/leaf/DAG invariants hold and the gateway generates all ids.(sessionId, runEpoch, seq)replay ledger (two dedicated tables — pending claim, ordered cursor, cached terminal RPC result) so a tunnel reconnect replaying the last commit is idempotent: no duplicate or reordered entries. At-least-once delivery with deterministic dedupe, not exactly-once.User Impact
Opt-in only; no worker loop or inference yet (PRs 7-8 add live-event streaming and the inference proxy, PR 9 the worker mode). This is the mechanism by which worker sessions will populate the sidebar. No config/changelog/version-bump changes.
Evidence
withTranscriptWriteTransaction(writer queue + one outer agent-DB transaction) instead of keeping a second path.harden/recovercommits). Local: oxlint (23 files), check:test-types, madge zero, db:kysely:check, docs:map:check, protocol:check all green.