fix(server): cast finished listener call, remove stale TODO, document execute contract - #553
Conversation
🧪 Code Coverage
Generated by coverage-comment.yml |
There was a problem hiding this comment.
Code Review
This pull request addresses TypeScript strict-mode compiler errors in execution_event_bus.ts by adding type casts, updates documentation in agent_executor.ts regarding event publishing requirements, and refactors comments in jsonrpc_transport_handler.ts. The reviewer provided valuable feedback, suggesting method overloading in ExecutionEventBus to achieve proper type safety without casting, and recommending the removal of a redundant console.error call in the JSON-RPC transport handler to prevent duplicate server logs.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
e2f15af to
be71a19
Compare
Description
Three small SDK quality fixes surfaced while reviewing the codebase:
SDK changes
execution_event_bus: Castlistener.call(this)for'finished'listeners (which are invoked with no args despite the typedListenersignature). Clears 2 TS strict-mode issues;.betterer.resultsregression baseline shrinks accordingly.jsonrpc_transport_handler: Removed stale TODO about mid-stream SSE errors; the Express layer already catches and writesformatSSEErrorEvent(covered byexpress_app.spec.ts).AgentExecutor.executeJSDoc: Documented the contract that every streaming turn must begin with ataskormessageevent (including follow-ups). The server already enforces this; the JSDoc just makes it explicit to implementors.