Skip to content

chore(deps): bump bodhi-realtime-agent to pick up GoAway CLOSED-state guard - #409

Merged
sonichi merged 1 commit into
mainfrom
bump/bodhi-goaway-guard
Apr 17, 2026
Merged

sonichi merged 1 commit into
mainfrom
bump/bodhi-goaway-guard

Conversation

@sonichi

@sonichi sonichi commented Apr 17, 2026

Copy link
Copy Markdown
Owner

Summary

Bumps `bodhi-realtime-agent` lockfile pin from `33a08c0` → `de64333` to pick up upstream PR bodhi#4 (just merged): `handleGoAway` now early-returns when `sessionManager.state !== 'ACTIVE'`, preventing the unhandled `SessionError: Invalid transition: CLOSED → RECONNECTING` FATAL when a late GoAway arrives after the reconnect has already torn down the transport.

Why

Per `notes/bodhi-closed-reconnecting-fatal.md`, current logs show 71× CLOSED → RECONNECTING + 2× RECONNECTING → RECONNECTING FATALs. These are "staying alive" rejections — they don't crash the process, but each represents a silent transport churn that likely contributes to "Gemini didn't respond" latency spikes even when voice-agent looks healthy. All resolved upstream in `de64333`.

Scope

Lockfile-only change. `package.json` pin is `github:sonichi/bodhi_realtime_agent` (unchanged, no version pin). `npm install bodhi-realtime-agent` re-resolved to the new HEAD commit. +1/-1.

Note per `feedback_no_npm_install_during_rename_sweeps`: this is an intentional lockfile bump of a single known dependency, not a sweep — no other lockfile entries changed.

Test plan

  • `npm install bodhi-realtime-agent` completes cleanly
  • Lockfile diff is a single `resolved` SHA change on the bodhi entry
  • Post-merge: restart voice-agent + conversation-server, watch for 0× `FATAL.*CLOSED → RECONNECTING` in the next hour of voice-agent.log

🤖 Generated with Claude Code

…e guard)

Picks up the upstream fix from sonichi/bodhi_realtime_agent#4:
handleGoAway now early-returns when sessionManager.state !== 'ACTIVE',
preventing the unhandled SessionError when a late GoAway arrives after
a reconnect has already torn down the transport.

Observed frequency in our voice-agent.log (per notes/bodhi-closed-
reconnecting-fatal.md): 71× CLOSED → RECONNECTING + 2× RECONNECTING →
RECONNECTING FATALs. All resolved upstream in this commit.

Lockfile-only change — package.json pin is `github:sonichi/bodhi_realtime_agent`
(unchanged), npm install re-resolved to the new HEAD commit de64333.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@sonichi sonichi left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM. Cold-reviewed:

  • Bumps node_modules/bodhi-realtime-agent from 33a08c0 to de64333 in package-lock.json. Verified de64333 is the squash-merge commit of bodhi PR #4 (fix(voice-session): guard handleGoAway against late-arriving GoAway after CLOSED).
  • 1 line change, no functional sutando code touched.
  • Pulls in the state-guard that closes the production-observed FATAL class (24/24 of 5000 voice-agent log lines were the same Invalid transition: CLOSED → RECONNECTING).

Ready to ship. Voice-agent restart will pick it up — confirms the upstream fix in our dist after merge.

@sonichi
sonichi merged commit 9ed5970 into main Apr 17, 2026
1 check passed
@sonichi
sonichi deleted the bump/bodhi-goaway-guard branch April 17, 2026 05:08
sonichi pushed a commit that referenced this pull request Apr 17, 2026
Mini overnight deliverable #3 of 4. Runs ~8 checks in <20s and prints
PASS/WARN/FAIL for each. Exits 1 on any FAIL, 2 on any WARN, 0 on all-PASS
so it integrates cleanly with other scripts / CI.

Checks:
  voice-agent          port 9900 listening + log mtime <60s
  bodhi state machine  0× CLOSED→RECONNECTING FATALs in current log (post-#409)
  conversation-server  port 3100 /health = ok
  ngrok tunnel         curl public URL, expect 200-range
  presenter-mode       sentinel present + future expiry
  Claude quota         >=10% remaining
  disk space           >5 GB free
  memory-sync          last sync <6h

Designed for the 5-10 min pre-talk window. Owner runs it once, sees the
summary, triages the WARNs before going on screen.

Local test: 5 pass, 3 warn, 0 fail. Warnings are all actionable:
- ngrok tunnel unreachable (SSL handshake fails — separate bug, non-blocking
  for remote ICLR talk which uses Zoom audio routing, not phone)
- presenter-mode INACTIVE — expected, run before talk
- memory-sync 9h — run `bash src/sync-memory.sh` before talk

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sonichi added a commit that referenced this pull request Apr 17, 2026
* feat: stage-readiness.sh — single-command pre-flight check for ICLR talk

Mini overnight deliverable #3 of 4. Runs ~8 checks in <20s and prints
PASS/WARN/FAIL for each. Exits 1 on any FAIL, 2 on any WARN, 0 on all-PASS
so it integrates cleanly with other scripts / CI.

Checks:
  voice-agent          port 9900 listening + log mtime <60s
  bodhi state machine  0× CLOSED→RECONNECTING FATALs in current log (post-#409)
  conversation-server  port 3100 /health = ok
  ngrok tunnel         curl public URL, expect 200-range
  presenter-mode       sentinel present + future expiry
  Claude quota         >=10% remaining
  disk space           >5 GB free
  memory-sync          last sync <6h

Designed for the 5-10 min pre-talk window. Owner runs it once, sees the
summary, triages the WARNs before going on screen.

Local test: 5 pass, 3 warn, 0 fail. Warnings are all actionable:
- ngrok tunnel unreachable (SSL handshake fails — separate bug, non-blocking
  for remote ICLR talk which uses Zoom audio routing, not phone)
- presenter-mode INACTIVE — expected, run before talk
- memory-sync 9h — run `bash src/sync-memory.sh` before talk

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(stage-readiness): portable stat + df + remove dead ngrok conditional

Three real bugs surfaced by MacBook's cold-review on a Mac-with-Homebrew-
coreutils dev environment (the common setup — MacBook's Apr 26 pre-flight
will run under this shell).

1. `stat -f %m` BSD syntax fails silently on GNU coreutils: GNU emits
   filesystem info to stdout AND exits non-zero. The original
   `BSD || GNU` fallback in `$(...)` concatenated both outputs, then
   `set -u` arithmetic expansion died with "File: unbound variable"
   and silently aborted remaining checks. Fix: new `stat_mtime()` helper
   tries GNU first (works on Linux + coreutils-on-Mac), BSD as fallback,
   explicit `echo 0` as second fallback. Order matters — GNU first is
   correct because GNU's presence is the bug trigger; pure BSD Macs
   without coreutils work cleanly either way.

2. `df -g` is BSD-only. GNU df doesn't support `-g`, so the disk check
   silently printed nothing and was skipped entirely. Fix: POSIX
   `df -k` returns KB universally; convert to GB via arithmetic.

3. Dead `[[ "$probe_url" != */* ]]` conditional on the ngrok probe:
   the pattern matches any URL containing `/` — i.e., every full URL,
   because `https://` has slashes — so the branch always triggers
   regardless of path. The intended "append /health only if no path"
   semantic doesn't work. Fix: just unconditionally append
   `/health` since all Twilio-bound ngrok webhooks need it.

Tested on this Mac: `bash scripts/stage-readiness.sh` → 6 pass, 2 warn
(ngrok SSL handshake + presenter-mode INACTIVE are expected pre-talk),
exit 0.

Credit: MacBook's cold-review-log.md entry on #412 caught (1) and (2);
(3) I'd already flagged in build_log pass 435 but hadn't fixed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Chi <wangchi@Chis-Mac-mini.local>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
liususan091219 pushed a commit to liususan091219/sutando-fork that referenced this pull request May 28, 2026
…e guard) (sonichi#409)

Picks up the upstream fix from sonichi/bodhi_realtime_agent#4:
handleGoAway now early-returns when sessionManager.state !== 'ACTIVE',
preventing the unhandled SessionError when a late GoAway arrives after
a reconnect has already torn down the transport.

Observed frequency in our voice-agent.log (per notes/bodhi-closed-
reconnecting-fatal.md): 71× CLOSED → RECONNECTING + 2× RECONNECTING →
RECONNECTING FATALs. All resolved upstream in this commit.

Lockfile-only change — package.json pin is `github:sonichi/bodhi_realtime_agent`
(unchanged), npm install re-resolved to the new HEAD commit de64333.

Co-authored-by: Chi <wangchi@Chis-Mac-mini.local>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
liususan091219 pushed a commit to liususan091219/sutando-fork that referenced this pull request May 28, 2026
…i#412)

* feat: stage-readiness.sh — single-command pre-flight check for ICLR talk

Mini overnight deliverable sonichi#3 of 4. Runs ~8 checks in <20s and prints
PASS/WARN/FAIL for each. Exits 1 on any FAIL, 2 on any WARN, 0 on all-PASS
so it integrates cleanly with other scripts / CI.

Checks:
  voice-agent          port 9900 listening + log mtime <60s
  bodhi state machine  0× CLOSED→RECONNECTING FATALs in current log (post-sonichi#409)
  conversation-server  port 3100 /health = ok
  ngrok tunnel         curl public URL, expect 200-range
  presenter-mode       sentinel present + future expiry
  Claude quota         >=10% remaining
  disk space           >5 GB free
  memory-sync          last sync <6h

Designed for the 5-10 min pre-talk window. Owner runs it once, sees the
summary, triages the WARNs before going on screen.

Local test: 5 pass, 3 warn, 0 fail. Warnings are all actionable:
- ngrok tunnel unreachable (SSL handshake fails — separate bug, non-blocking
  for remote ICLR talk which uses Zoom audio routing, not phone)
- presenter-mode INACTIVE — expected, run before talk
- memory-sync 9h — run `bash src/sync-memory.sh` before talk

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(stage-readiness): portable stat + df + remove dead ngrok conditional

Three real bugs surfaced by MacBook's cold-review on a Mac-with-Homebrew-
coreutils dev environment (the common setup — MacBook's Apr 26 pre-flight
will run under this shell).

1. `stat -f %m` BSD syntax fails silently on GNU coreutils: GNU emits
   filesystem info to stdout AND exits non-zero. The original
   `BSD || GNU` fallback in `$(...)` concatenated both outputs, then
   `set -u` arithmetic expansion died with "File: unbound variable"
   and silently aborted remaining checks. Fix: new `stat_mtime()` helper
   tries GNU first (works on Linux + coreutils-on-Mac), BSD as fallback,
   explicit `echo 0` as second fallback. Order matters — GNU first is
   correct because GNU's presence is the bug trigger; pure BSD Macs
   without coreutils work cleanly either way.

2. `df -g` is BSD-only. GNU df doesn't support `-g`, so the disk check
   silently printed nothing and was skipped entirely. Fix: POSIX
   `df -k` returns KB universally; convert to GB via arithmetic.

3. Dead `[[ "$probe_url" != */* ]]` conditional on the ngrok probe:
   the pattern matches any URL containing `/` — i.e., every full URL,
   because `https://` has slashes — so the branch always triggers
   regardless of path. The intended "append /health only if no path"
   semantic doesn't work. Fix: just unconditionally append
   `/health` since all Twilio-bound ngrok webhooks need it.

Tested on this Mac: `bash scripts/stage-readiness.sh` → 6 pass, 2 warn
(ngrok SSL handshake + presenter-mode INACTIVE are expected pre-talk),
exit 0.

Credit: MacBook's cold-review-log.md entry on sonichi#412 caught (1) and (2);
(3) I'd already flagged in build_log pass 435 but hadn't fixed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Chi <wangchi@Chis-Mac-mini.local>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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