Skip to content

Add src/verify-gemini-31.sh — pre-rollout gate for Gemini 3.1 stack - #261

Merged
sonichi merged 2 commits into
mainfrom
feat/verify-gemini-31-rollout
Apr 10, 2026
Merged

sonichi merged 2 commits into
mainfrom
feat/verify-gemini-31-rollout

Conversation

@sonichi

@sonichi sonichi commented Apr 10, 2026

Copy link
Copy Markdown
Owner

Summary

Scripts the post-merge verification after the 3-PR Gemini 3.1 compat stack lands. Saves future-me (or whoever lands the stack) a manual audit pass.

The rollout stack

PR Repo Author Status
#1 bodhi fork Chi (me) ✅ merged earlier today
#2 bodhi fork Susan open
#3 bodhi fork Chi (me) open
#259 sutando Chi (owner) open, LGTM'd by Mini

All 4 need to be applied for the 3.1 text + audio + file + tool-dedup paths to work end-to-end. Any single missing link is a latent 1007/1011.

What the script checks

  1. Bodhi dist PR Add demo video to README #1 marker — narrowed `sendClientContent(turns, _turnComplete)` signature (underscore-prefixed unused param is reliable)
  2. Bodhi dist PR temp: demo video upload #2 marker — `sendAudio` body uses `audio: { data }`, not `media: { data }`
  3. Bodhi dist PR Inline demo video in README #3 marker — `sendFile` body branches on `mimeType.startsWith("image/")` / `"audio/"`, not a single `media` path
  4. Sutando Gemini 3.1 compatibility: deduplicate tools + upgrade SDK #259 marker — `Deduplicate by name` comment in `conversation-server.ts`
  5. .env pin state — exits green on 2.5 baseline, warns on 3.1 (safe to run repeatedly)
  6. voice-transport health probe — no recent 1007/1011/1006 close codes in `voice-agent.log`

Non-trivial detail: the bodhi transport checks use awk-scoped extraction of the specific function body, not naive grep, because:

  • `@google/genai` Gemini Live's `sendAudio` takes `audio: { data, mimeType }` (wrapped blob)
  • OpenAI realtime transport's `sendAudio` takes `audio: base64Data` (flat string)

A flat `grep 'audio:'` would false-positive on the OpenAI variant. The awk extraction constrains the match to each function's own body + brace depth.

Exit behavior

  • Fail any PR marker → exit 1 with "NOT READY for 3.1 rollout" and a pointer to `npm install github:sonichi/bodhi_realtime_agent`
  • All markers green → exit 0 and print the manual next-steps checklist (unpin `.env`, restart voice-agent, run a real 3.1 session test, rollback one-liner)

Test plan

Usage

```bash
bash src/verify-gemini-31.sh # check current state
bash src/verify-gemini-31.sh --install # npm install + check
```

🤖 Generated with Claude Code

sonichi added 2 commits April 9, 2026 20:25
Scripts the post-merge verification after the 3-PR Gemini 3.1 compat
stack lands:
  - bodhi fork #1 (sendClientContent → sendRealtimeInput text path)
  - bodhi fork #2 (Susan: sendAudio media → audio)
  - bodhi fork #3 (me: sendFile mimeType branching)
  - sutando #259 (Chi: deduplicate tool declarations + SDK bump)

Checks the installed bodhi dist for each wire-format fix using
awk-scoped extraction (simpler grep would false-positive on the
OpenAI realtime transport's sendAudio which also uses `audio:` as a
flat field, so the 3.1 gemini-specific check has to be scoped to the
Gemini transport's function body).

Checks sutando src for the phone conversation-server's tool dedup
comment as a PR #259 marker.

Checks .env for the 2.5 pin (exits green on 2.5, warns on 3.1 — so
the script is safe to run repeatedly before, during, and after the
rollout).

Exits non-zero with "NOT READY for 3.1 rollout" if any wire-format
fix is missing. On success, prints the manual next-steps checklist
for unpinning .env, restarting voice-agent, and running the real
3.1 session test.

Usage:
  bash src/verify-gemini-31.sh              # check current state
  bash src/verify-gemini-31.sh --install    # npm install + check

Tested on the current state: correctly reports PR #1 applied,
PR #2 + #3 + #259 not yet. Will flip to "ready" once those merge
and an `npm install` pulls the updated bodhi SHA.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Extends the script to enforce the second 3.1 compat requirement
discovered in #262: VOICE_GOOGLE_SEARCH must be 'false' when
VOICE_NATIVE_AUDIO_MODEL is pinned to 3.1. Without it, voice-agent
hits a misleading 1011 close on connect.

Check matrix:
  2.5 + default (googleSearch=true)   → pass
  2.5 + VOICE_GOOGLE_SEARCH=false     → warn (unnecessarily losing search)
  3.1 + VOICE_GOOGLE_SEARCH=false     → pass
  3.1 + default (googleSearch=true)   → fail (1011 on connect)
  3.1 + unset VOICE_GOOGLE_SEARCH     → fail (defaults to true → 1011)

Also updates the 'Manual next steps' tail to tell users to set BOTH
env vars together when flipping to 3.1.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@sonichi
sonichi force-pushed the feat/verify-gemini-31-rollout branch from ce29212 to 69be80d Compare April 10, 2026 03:26
@sonichi
sonichi merged commit c33409c into main Apr 10, 2026
1 check passed
@sonichi
sonichi deleted the feat/verify-gemini-31-rollout branch April 10, 2026 04:08
liususan091219 pushed a commit to liususan091219/sutando-fork that referenced this pull request May 28, 2026
…onichi#261)

* Add src/verify-gemini-31.sh — pre-rollout gate for Gemini 3.1 stack

Scripts the post-merge verification after the 3-PR Gemini 3.1 compat
stack lands:
  - bodhi fork sonichi#1 (sendClientContent → sendRealtimeInput text path)
  - bodhi fork sonichi#2 (Susan: sendAudio media → audio)
  - bodhi fork sonichi#3 (me: sendFile mimeType branching)
  - sutando sonichi#259 (Chi: deduplicate tool declarations + SDK bump)

Checks the installed bodhi dist for each wire-format fix using
awk-scoped extraction (simpler grep would false-positive on the
OpenAI realtime transport's sendAudio which also uses `audio:` as a
flat field, so the 3.1 gemini-specific check has to be scoped to the
Gemini transport's function body).

Checks sutando src for the phone conversation-server's tool dedup
comment as a PR sonichi#259 marker.

Checks .env for the 2.5 pin (exits green on 2.5, warns on 3.1 — so
the script is safe to run repeatedly before, during, and after the
rollout).

Exits non-zero with "NOT READY for 3.1 rollout" if any wire-format
fix is missing. On success, prints the manual next-steps checklist
for unpinning .env, restarting voice-agent, and running the real
3.1 session test.

Usage:
  bash src/verify-gemini-31.sh              # check current state
  bash src/verify-gemini-31.sh --install    # npm install + check

Tested on the current state: correctly reports PR sonichi#1 applied,
PR sonichi#2 + sonichi#3 + sonichi#259 not yet. Will flip to "ready" once those merge
and an `npm install` pulls the updated bodhi SHA.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

* verify-gemini-31: check VOICE_GOOGLE_SEARCH pin in .env

Extends the script to enforce the second 3.1 compat requirement
discovered in sonichi#262: VOICE_GOOGLE_SEARCH must be 'false' when
VOICE_NATIVE_AUDIO_MODEL is pinned to 3.1. Without it, voice-agent
hits a misleading 1011 close on connect.

Check matrix:
  2.5 + default (googleSearch=true)   → pass
  2.5 + VOICE_GOOGLE_SEARCH=false     → warn (unnecessarily losing search)
  3.1 + VOICE_GOOGLE_SEARCH=false     → pass
  3.1 + default (googleSearch=true)   → fail (1011 on connect)
  3.1 + unset VOICE_GOOGLE_SEARCH     → fail (defaults to true → 1011)

Also updates the 'Manual next steps' tail to tell users to set BOTH
env vars together when flipping to 3.1.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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