Skip to content

[codex] Fix room input stop lifecycle#14

Closed
jinfeng66 wants to merge 1 commit into
lex-mainfrom
codex/fix-room-input-stop-lifecycle
Closed

[codex] Fix room input stop lifecycle#14
jinfeng66 wants to merge 1 commit into
lex-mainfrom
codex/fix-room-input-stop-lifecycle

Conversation

@jinfeng66

Copy link
Copy Markdown

Summary

  • Stop external room-input participants from the session stop route before deleting the LiveKit room.
  • Resolve legacy xunfei /start control URLs to /stop so existing env configuration can be reused.
  • Treat room-input stop failures as best-effort while keeping LiveKit room deletion as the fallback cleanup.
  • Update session stop tests to cover the new cleanup order and nonfatal room-input failures.

Why

The xunfei input source owns external audio, video, face listener, and socket resources. Relying only on Agent shutdown or LiveKit room deletion could leave those resources closing too late, which made repeated sessions vulnerable to stale input state or missing audio.

Validation

  • pnpm test -- --test-name-pattern "session stop|maps livekit|parses the latest"
  • pnpm exec tsc --noEmit --pretty false
  • pnpm exec prettier --check app/api/session/stop/route.ts tests/session-stop.test.mjs
  • git diff --check

@jinfeng66

Copy link
Copy Markdown
Author

Closing this draft because the change was pushed to the existing observability PR #12 instead.

@jinfeng66 jinfeng66 closed this Jun 30, 2026
@jinfeng66 jinfeng66 deleted the codex/fix-room-input-stop-lifecycle branch June 30, 2026 02:24
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