chore: remove /v1/runs endpoints and runs infrastructure#9166
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
| session.setTurnChannelContext({ | ||
| userMessageChannel: 'voice', | ||
| assistantMessageChannel: 'voice', | ||
| }); | ||
| session.setChannelCapabilities(resolveChannelCapabilities('voice', undefined)); |
There was a problem hiding this comment.
🟡 Missing setTurnInterfaceContext call causes incorrect metadata on voice messages
The new voice-session-bridge.ts never calls session.setTurnInterfaceContext() during setup, and never resets it during cleanup. The old RunOrchestrator did both.
Root Cause and Impact
The deleted RunOrchestrator (see diff for run-orchestrator.ts) set the turn interface context during setup:
session.setTurnInterfaceContext({
userMessageInterface: resolvedInterface,
assistantMessageInterface: resolvedInterface,
});and reset it during cleanup:
session.setTurnInterfaceContext({
userMessageInterface: 'vellum',
assistantMessageInterface: 'vellum',
});The new voice bridge at assistant/src/calls/voice-session-bridge.ts:292-307 sets setTurnChannelContext (line 302) but omits the analogous setTurnInterfaceContext call. Downstream, session-messaging.ts:72 reads ctx.getTurnInterfaceContext() to populate userMessageInterface and assistantMessageInterface metadata on persisted messages. Without being set, it returns whatever stale value was left by a prior session user (or null), so voice messages will have missing or incorrect interface metadata.
Similarly, the cleanup at lines 384-395 resets channel context, guardian context, etc. but does not reset the turn interface context — potentially leaking a stale voice interface context into subsequent non-voice turns on the same session.
Impact: All voice turn messages will be persisted with incorrect or missing userMessageInterface/assistantMessageInterface metadata, which downstream consumers (e.g. origin interface tracking at assistant/src/daemon/server.ts:832) rely on.
| session.setTurnChannelContext({ | |
| userMessageChannel: 'voice', | |
| assistantMessageChannel: 'voice', | |
| }); | |
| session.setChannelCapabilities(resolveChannelCapabilities('voice', undefined)); | |
| session.setTurnChannelContext({ | |
| userMessageChannel: 'voice', | |
| assistantMessageChannel: 'voice', | |
| }); | |
| session.setTurnInterfaceContext({ | |
| userMessageInterface: 'voice', | |
| assistantMessageInterface: 'voice', | |
| }); | |
| session.setChannelCapabilities(resolveChannelCapabilities('voice', undefined)); |
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
/v1/runsHTTP API endpoints,RunOrchestratorclass, andruns-store/v1/messages+pending-interactions(PRs feat: add queue-if-busy behavior and hub publishing to POST /v1/messages #8400, feat: add pending-interactions tracker and standalone approval endpoints #8407, refactor: migrate Swift HTTPTransport and CLI from /v1/runs to /v1/messages #8410, refactor: migrate channel approval system from runs-store to pending-interactions #8428)voice-session-bridgeto use session directly instead ofRunOrchestrator, injecting deps viasetVoiceBridgeDeps()messageRunsDrizzle schema (table left in SQLite for backward compat)run-orchestrator.ts,run-routes.ts,runs-store.ts, and associated testshttp-server.ts,http-types.ts,server.ts,lifecycle.ts,conversation-store.ts,schema.tsTest plan
RunOrchestrator,runs-store,run-routes, orPendingRunInfoin production code🤖 Generated with Claude Code