Repository navigation
Conversation
Antigravity CLI conversation databases store generation metadata as protobuf blobs in gen_metadata, steps, and trajectory_metadata_blob rather than a usage_events table, so the adapter skipped every native database with zero events. Parse those native tables inside a read-only transaction while keeping the usage_events fallback, and bump the adapter to version 2 so previously synced sources re-parse. Extract token counts (splitting reasoning out of total output), model, project path from file:// workspace URIs, responseId dedup keys, and generation timestamps from gen_metadata, steps, or session metadata. Also include non-empty SQLite -wal file stat metadata in sampleSourceHash so sync detects commits that have not been checkpointed into the main database file yet.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Problem
Antigravity CLI conversation databases under
~/.gemini/antigravity-cli/conversations/**/*.dbdo not have ausage_eventstable. They store generationmetadata as protobuf blobs across
gen_metadata,steps, andtrajectory_metadata_blob, so the adapter currently returns zero events for every nativedatabase.
In addition,
syncUsageonly hashes the main.dbfile when checking for changes and parse stability. For SQLite databases in WAL mode, new commitswritten to
<db>-walleave the main database file unchanged until a checkpoint occurs, causing syncs to skip updated databases.Changes
gen_metadatapresent andusage_eventsabsent) inside a read-only transaction while keepingthe
usage_eventsfallback unchanged.antigravityCliAdapter.versionto2so previously synced empty sources are re-parsed automatically.gen_metadata(ModelUsageStats), storing response output separately from reasoning tokens (#10, falling back tomax(0, #3 - #9)).model,provider(googleforgemini-*),responseId(identity/dedupKey), and local workspaceprojectpath fromfile://URIsin
trajectory_metadata_blob(ignoring remote URIs).gen_metadata, matchedstepsentries byresponseId, ortrajectory_metadata_blobsession time.sampleSourceHashinsync.server.tsto incorporate non-empty<db>-walstat metadata (ino,size,mtimeNs,ctimeNs) forsqlitesources so uncheckpointed WAL commits trigger re-sync and stability retries.
Tests
src/lib/sync/sync.test.tscovering native Antigravity CLI protobuf parsing, WAL-only commits (wal_autocheckpoint = 0), unchanged skip behavior on re-sync, and extracted token/model/project/timestamp fields.tsc --noEmit,vitest run(17 test files, 126 passed, 1 skipped),prettier --checkon modified files, andeslintonantigravity-cli.ts/sync.test.tspass.