Skip to content

feat: migrate call-gemini.sh from gemini CLI to agy (Antigravity CLI)#8

Merged
tznthou merged 2 commits into
mainfrom
feat/agy-migration
Jun 10, 2026
Merged

feat: migrate call-gemini.sh from gemini CLI to agy (Antigravity CLI)#8
tznthou merged 2 commits into
mainfrom
feat/agy-migration

Conversation

@tznthou

@tznthou tznthou commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

Google sunsets @google/gemini-cli on 2026-06-18; agy (Antigravity CLI) replaces it for Google AI Pro OAuth users. This PR migrates the Gemini-provider wrapper while keeping the call-gemini.sh filename and [gemini] log tag for log-contract continuity (analyze-log.sh / usage-summary.sh / calibrate-timeout.sh parse those strings).

Migration (1617e14)

  • Binary resolve: agy candidates + AGY_BIN env override; GEMINI_BIN honored as a deprecated, gated fallback
  • Model flag passthrough: -m--model
  • --print-timeout $((TIMEOUT_S+30))s keeps the wrapper soft-timeout (structured marker + rc=124) firing strictly first
  • rc=0 content classification — empirically verified on agy 1.0.6/1.0.7: agy swallows network failures (rc=0, empty output) and auth failures (rc=0, OAuth prompt on stdout); both previously would log as success. New EMPTY_OUTPUT and AUTH_ERROR classifiers catch them from output content.
  • install.sh: agy detection + install URL (verified HTTP 200); checksums.sha256 regenerated

PTA quality pipeline (4b3b0a6)

Stage Result
Codex adversarial review 5 findings → 2 adopted
Simplify (read-only) 3 findings + 2 boundary notes → 1 adopted
Security (OWASP 2025) 2 findings (conf 88/83) → 2 adopted (1 merged with Codex)
Verify shellcheck clean · smoke 62/62 (baseline 60/60 + new T17×2)

Adopted: A09 sanitization parity on response_len (tr -d ' \n'); GEMINI_BIN fallback gated to executables actually named agy (stale gemini paths → sanitized WARN + standard resolution instead of choking on agy-only flags); AUTH fingerprint hardened to dual-condition (first-line prefix AND OAuth URL marker); tests migrated off the deprecated injection path (AGY_BIN) + new T17.1/T17.2 regression guards for the rc=0 classifiers.

Test plan

  • tests/smoke-test.sh — 62/62 pass, 0 skipped
  • E1–E7 manual smoke on agy 1.0.7: direct call, skill-path sub-agent fan-out, first-byte detector (method=measured), soft-timeout rc=124, EMPTY_OUTPUT / AUTH_ERROR classifiers, 150KB ARG_MAX, cross-provider /pi-askall
  • shellcheck clean on changed scripts
  • ShellCheck CI green on this PR

🤖 Generated with Claude Code

tznthou and others added 2 commits June 10, 2026 12:04
Google sunsets @google/gemini-cli on 2026-06-18; agy (Antigravity CLI)
replaces it for Google AI Pro OAuth users. Filename and [gemini] log tag
kept for log-contract continuity.

- binary resolve: agy + AGY_BIN env (GEMINI_BIN honored as deprecated
  fallback with WARN)
- model flag: -m → --model passthrough
- --print-timeout TIMEOUT_S+30s keeps wrapper soft-timeout firing first
- rc=0 content classification: agy 1.0.6/1.0.7 swallow network failures
  (rc=0, empty output) and auth failures (rc=0, OAuth prompt on stdout);
  classify EMPTY_OUTPUT + AUTH_ERROR from output content (empirically
  verified 2026-06-10)
- install.sh: agy detection + install URL (verified HTTP 200)
- pi-ask-gemini.md: wording + EMPTY_OUTPUT in error taxonomy
- checksums.sha256: regenerated (19 files)

Smoke: E1-E7 all pass on agy 1.0.7 (manual, skill-path sub-agent,
first-byte detector, soft-timeout rc=124, EMPTY_OUTPUT/AUTH_ERROR
classifiers, 150KB ARG_MAX, cross-provider fan-out).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- success log: response_len tr strips \n too (A09 convention parity with
  the soft-timeout out_bytes path)
- GEMINI_BIN deprecated fallback gated: accepted only when pointing at an
  executable named agy (rename-not-revalue); stale gemini paths ignored
  with sanitized WARN instead of choking on agy-only flags
- AUTH_ERROR fingerprint hardened to dual-condition (first-line prefix
  AND OAuth URL marker) against false positives on model responses
- tests: Test 3 detects agy instead of gemini; T13.5/T16.5 inject via
  AGY_BIN (off the deprecated path); new T17.1/T17.2 regression-guard the
  rc=0 EMPTY_OUTPUT / AUTH_ERROR classifiers (62/62 pass)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tznthou tznthou marked this pull request as ready for review June 10, 2026 04:22
@tznthou tznthou merged commit 4b3b0a6 into main Jun 10, 2026
1 check passed
@tznthou tznthou deleted the feat/agy-migration branch June 10, 2026 04:22
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.

1 participant