signalAgentReady records the first handshake result. Subsequent calls are ignored — agent messages after the initial handshake are part of the stream, not the readiness signal.
(r AgentResult)
| 312 | // ignored — agent messages after the initial handshake are part of the stream, |
| 313 | // not the readiness signal. |
| 314 | func (s *Session) signalAgentReady(r AgentResult) { |
| 315 | s.readyOnce.Do(func() { |
| 316 | select { |
| 317 | case s.agentReady <- r: |
| 318 | default: |
| 319 | } |
| 320 | }) |
| 321 | } |
| 322 | |
| 323 | // WaitReady blocks up to timeout for the initial agent handshake. Returns |
| 324 | // ErrAgentTimeout if nothing arrives, or the request context error if cancelled. |
no outgoing calls
no test coverage detected