feat: add SQLite-aware bootstrap frontier#646
Open
100yenadmin wants to merge 1 commit intoMartian-Engineering:mainfrom
Open
feat: add SQLite-aware bootstrap frontier#646100yenadmin wants to merge 1 commit intoMartian-Engineering:mainfrom
100yenadmin wants to merge 1 commit intoMartian-Engineering:mainfrom
Conversation
This was referenced May 9, 2026
Open
Contributor
Author
|
Architecture fit for this slice: flowchart TD
A["OpenClaw session-store runtime seam"] --> B["frontier / delta when available"]
B --> C["LCM bootstrap engine"]
C --> D["source-aware bootstrap state"]
D --> E["resume from SQLite cursor"]
A --> F["JSONL fallback on older hosts"]
Why this slice exists:
Why it was chosen before identity or message-part migration:
Stack placement:
Lossless Claw connection:
|
This was referenced May 9, 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.
Summary
This starts the LCM-side SQLite migration by making bootstrap frontier state source-aware and SQLite-capable, while keeping JSONL compatibility as a fallback.
The immediate goal is not to solve the full Lossless Claw migration in one PR. The goal here is narrower:
mtime/size/offsetfor the canonical bootstrap frontierThis is the first implementation slice for #645 and part of the vNext umbrella in #641.
Why this is better
OpenClaw is moving toward SQLite-backed session/transcript state. LCM's current bootstrap checkpoint model is still file-era:
session_file_pathlast_seen_sizelast_seen_mtime_mslast_processed_offsetThat works for append-only JSONL recovery, but it does not map cleanly onto:
This PR gives LCM a real SQLite replay frontier without forcing the rest of the migration into the same slice.
What changed
Core bootstrap frontier
conversation_bootstrap_statejsonlsource recordsEngine replay path
LcmContextEngine.bootstrap(...)stat(sessionFile)as the first truth source on SQLite-capable hostsRuntime adapter
src/plugin/index.tsopenclaw/plugin-sdk/session-store-runtimewhen available#79904-style frontier/delta seam without hard-breaking older OpenClaw installsRegression coverage
Non-goals
This PR does not attempt to solve:
message_partsreconstruction and richer transcript semantic mapping from Reconstruct message_parts and tool/result joins from OpenClaw SQLite transcripts #643It is intentionally the narrow frontier/replay slice.
Validation
Results on this branch:
250/250targeted tests passedStack placement
This PR is the first downstream Lossless Claw implementation slice that consumes the OpenClaw SQLite migration work.
Related stack:
Why this is separate:
Related