Skip to content

review: drop Antigravity capture wiring (keep migration detection)#41

Open
kridaydave wants to merge 7 commits into
Shreyan1:mainfrom
kridaydave:review/drop-antigravity
Open

review: drop Antigravity capture wiring (keep migration detection)#41
kridaydave wants to merge 7 commits into
Shreyan1:mainfrom
kridaydave:review/drop-antigravity

Conversation

@kridaydave

Copy link
Copy Markdown
Contributor

Split out of PR #39 (kridaydave:fix/good-first-issues) to address review concern #1.

We made a deliberate, documented call in detect.ts and the FAQ: we intentionally do not wire Antigravity capture yet, because Google has not published the finalized hook format, and shipping a capture path that silently never fires would break the transparency/reliability promise in PHILOSOPHY.md ("no half-working features dressed up to look finished"). fromAntigravity guesses the payload shape and AntigravityCliProvider guesses agy -p - (which, per Google's own docs, a non-interactive agy also needs --headless/--approve or it hangs).

Most importantly, adding antigravity to ALLOWED_ADAPTERS/HOOK_ADAPTERS to satisfy the parity test was the part that should not land: that invariant exists to prove every registered adapter is real and fully wired end-to-end (install + detect + a real fixture), so including it made the test pass without the thing it tests being true.

This removes:

  • src/adapters/antigravity.ts and src/providers/antigravity-cli.ts
  • the antigravity entries in ALLOWED_ADAPTERS, HOOK_ADAPTERS, PARKED_PROVIDERS
  • the adapter/provider registration tests

The Antigravity migration detection in detect.ts stays (it only switches the Gemini setup path to inject-only, it does not register capture hooks).

The other three concerns (bounded concurrency #2, the captureDisabled cache fix #3, config-parse dedup #4) land in their own PRs, also split from #39.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Shreyan1 Shreyan1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks Kriday, splitting the #39 review into four PRs was exactly the right move and I appreciate how fast you turned this around. The Antigravity removal itself is spot on: adapter, provider, ALLOWED_ADAPTERS, HOOK_ADAPTERS, PARKED_PROVIDERS all gone cleanly, and the migration detection correctly kept. Merged with current main the suite is green (1052).

What's holding it up is scope and freshness, not the removal:

  • This branch is 7 commits behind main and carries the whole #39 async refactor (28 files), so the actual "drop Antigravity" change is buried under bootstrap/storage/migrate/menu/Windows edits. A reviewer should be able to open the diff and see just the removal. Could you rebase onto current origin/main and bring over only the Antigravity removal? It should be about 6 files.
  • Two CI failures, both of which clear on rebase: the version-bump gate (this is user-facing, so bump package.json + VERSION in src/cli.ts), and CodeQL flags a HIGH at storage.ts (see inline) that is not on current main, you are reintroducing it by carrying the old #39 trimIfNeeded.

Concretely: git fetch origin main, branch fresh off it, cherry-pick just the removal. Everything else here belongs in #42/#43. I left a couple of inline notes, plus a shared process note (same root cause across all four) in a separate comment below.

Comment thread src/storage.ts
return; // absent or unstattable: nothing to trim
}
if (size <= LOG_ROTATE_BYTES) return;
const st = fs.statSync(filePath);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

CodeQL flags this as a HIGH TOCTOU: you stat here, then readFileSync on the next line, and the file can change in between. Heads up, current main does not have this, it comes from the #39 rewrite this branch carries (main still wraps the statSync in its own try/return). Rebasing on main drops the alert. If you do want to keep this shape, read through a single fd (open then fstatSync then read), which is the exact pattern readFileBytesSafe already uses further down this file.

Comment thread src/menu.ts
// Render the menu as a plain string (no cursor control) so tests can assert it.
export function renderMenu(items: MenuItem[], selected: number): string {
const width = Math.max(...items.map(it => it.label.length));
let width = 0;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Example of the scope issue: this renderMenu rewrite has nothing to do with dropping Antigravity, it is only in the diff because the branch carries all of #39. Not wrong, just not reviewable in a PR titled "drop Antigravity". It should ride in whatever PR actually owns the async refactor.

@Shreyan1

Copy link
Copy Markdown
Owner

One note that applies to all four (#41, #42, #43, #44), since it is the same root cause each time, and a bit about what I hit running them locally.

First, credit where it is due: every one of the four fixes is technically correct. You read the review precisely. The problems are git hygiene and test coverage, not the engineering.

What actually happened when I pulled and ran these:

If you are driving these with a Codex agent, five instructions fix all of it at once:

  1. Always git fetch origin main and branch/rebase off current main, never a stale checkout. Rebase before every push.
  2. For a split, each PR's diff against main touches only that concern's files. Give the agent the explicit file allowlist. Dependent fixes branch off the parent branch, not main, so review: bound process concurrency in git capture and bootstrap scans #42/review: fix captureDisabled module-global cache poisoning #43/review: dedup config parsing, revert claude/gemini -p - change, bump version #44 stack on review: drop Antigravity capture wiring (keep migration detection) #41.
  3. Every change ships with a test that fails without it; every bug fix ships with a regression test that reproduces the bug.
  4. Every user-facing PR bumps package.json + VERSION (src/cli.ts). Standing rule, not a one-off.
  5. Before pushing: npm run build && npm run lint && npm test against a merge with origin/main, and do not reintroduce CodeQL findings.

Cleanest path from here: rebase all four on current main, stack #42/#43/#44 on #41, slim each to its real diff, add the two missing tests (concurrency primitive + cache regression), and fix the config-# bug in #44. The engineering is solid, this is all about landing it cleanly. Thanks again for turning the split around so fast.

@kridaydave
kridaydave force-pushed the review/drop-antigravity branch from e93f532 to 4a53364 Compare July 18, 2026 15:38
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.

cch bootstrap defaults to checking Claude sessions

2 participants