fix(android): atomically upsert app-owned sessions#105144
Merged
Merged
Conversation
Contributor
Author
|
Land-ready verification on exact head
No known proof gaps for this narrow Android session bootstrap hardening. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 13, 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.
Related: #101927
Follow-up to #105115.
What Problem This Solves
Android's new app-session bootstrap used
sessions.describefollowed bysessions.create. Two concurrent missing-row observations can each prepare a different session identity, allowing the later create to replace the first identity after work has started.Why This Change Was Made
Use the existing label-only
sessions.patchstorage-boundary upsert for missing and unlabeled app sessions. This path is atomic, remainsoperator.writescoped, preserves a nonblank user label, and avoids a second session identity.The focused reconnect test now proves that a superseded agent adoption cannot create or load history for the stale key even if its delayed response completes later.
User Impact
Android reconnects and rapid agent switches keep the app-owned session identity and transcript stable instead of risking a late replacement.
Evidence
tbx_01kxanza26gteawzjc1da9733a: Play and third-partyChatControllerReconnectRestoreTestplus:app:ktlintCheck, all green.git diff --check: clean.Risk
Android chat session bootstrap only. Adoption remains best-effort; history still loads if the metadata upsert fails.
Docs Updated
No additional docs change: #105115 already documents and credits the app-session behavior; this only hardens its unshipped implementation.