Skip to content

Fix Antigravity IDE sync - #642

Merged
junhoyeo merged 2 commits into
junhoyeo:mainfrom
SaulMoreno3:fix/antigravity-ide-sync
May 31, 2026
Merged

Fix Antigravity IDE sync#642
junhoyeo merged 2 commits into
junhoyeo:mainfrom
SaulMoreno3:fix/antigravity-ide-sync

Conversation

@SaulMoreno3

@SaulMoreno3 SaulMoreno3 commented May 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes Antigravity IDE sync after the Google Antigravity rename/migration.

The new Antigravity IDE language server exposes its local RPC endpoint over HTTPS with a self-signed local certificate. The existing sync path only spoke plain HTTP, so tokscale antigravity sync could see filesystem candidates but detected zero usable connections and cached zero sessions.

This PR:

  • keeps the existing plain HTTP RPC path for older Antigravity installs
  • adds HTTPS RPC fallback with invalid local certs accepted for 127.0.0.1
  • accepts a successful HTTPS Heartbeat response as a valid local Antigravity endpoint after process filtering
  • scans migrated local data roots:
    • ~/.gemini/antigravity-ide
    • ~/.gemini/antigravity
    • ~/.gemini/antigravity-backup
  • adds tests for Antigravity IDE process detection and migrated filesystem roots

Fixes #641.

Local verification

Before this change, with Antigravity IDE open:

detected connections: 0
filesystem candidates: 103
export candidates: 103
cached sessions after sync: 0

After this change, with the same Antigravity IDE instance:

detected connections: 2
detected sessions: 0
filesystem candidates: 103
export candidates: 103
cached sessions after sync: 100

Reports then recovered historical Antigravity usage across February-May 2026.

Tested with:

cargo fmt --check
cargo test -p tokscale-cli antigravity -- --nocapture

Summary by cubic

Restores Antigravity IDE sync by adding HTTPS RPC support for the renamed language server, bypassing proxies, and scanning new data roots while keeping the legacy HTTP path. Sync now detects the local endpoint and caches sessions again. Fixes #641.

  • Bug Fixes
    • Added HTTPS RPC fallback (accepts self‑signed certs on 127.0.0.1 and bypasses proxies) and treats a well‑formed Heartbeat as a valid endpoint.
    • Kept plain HTTP for older installs; probes heartbeat and identity over HTTP, then HTTPS.
    • Scans migrated data roots: ~/.gemini/antigravity-ide, ~/.gemini/antigravity, ~/.gemini/antigravity-backup.
    • Updated process detection to include the IDE language server; added tests for process detection and multi-root scanning.

Written for commit e3e70eb. Summary will update on new commits.

Review in cubic

@vercel

vercel Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
tokscale Ignored Ignored Preview May 31, 2026 7:46pm

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread crates/tokscale-cli/src/antigravity.rs
@SaulMoreno3
SaulMoreno3 force-pushed the fix/antigravity-ide-sync branch from 9205d80 to 4470960 Compare May 30, 2026 16:30
@SaulMoreno3

Copy link
Copy Markdown
Contributor Author

Addressed the performance concern in the latest push. The HTTPS fallback now reuses a process-wide current-thread Tokio runtime and a cached reqwest::Client via OnceLock, so HTTPS-only Antigravity IDE installs no longer pay runtime/client construction cost per RPC.\n\nRe-verified locally with:\n- cargo fmt --check\n- cargo test -p tokscale-cli antigravity -- --nocapture\n- ./target/debug/tokscale antigravity sync\n\nThe real sync still detects 2 connections and keeps 100 cached sessions.

@junhoyeo
junhoyeo force-pushed the fix/antigravity-ide-sync branch from 4470960 to e3e70eb Compare May 31, 2026 19:46
@junhoyeo
junhoyeo merged commit a86e688 into junhoyeo:main May 31, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Antigravity IDE sync detects candidates but caches zero sessions

2 participants