(
line_rx: &mpsc::Receiver<std::io::Result<String>>,
deadline: Instant,
)
| 343 | } |
| 344 | |
| 345 | fn recv_line( |
| 346 | line_rx: &mpsc::Receiver<std::io::Result<String>>, |
| 347 | deadline: Instant, |
| 348 | ) -> Result<String> { |
| 349 | let remaining = deadline |
| 350 | .checked_duration_since(Instant::now()) |
| 351 | .unwrap_or_default(); |
| 352 | if remaining.is_zero() { |
| 353 | return Err(TraceDecayError::Config { |
| 354 | message: "timed out waiting for codex app-server".to_string(), |
| 355 | }); |
| 356 | } |
| 357 | match line_rx.recv_timeout(remaining) { |
| 358 | Ok(Ok(line)) => Ok(line), |
| 359 | Ok(Err(err)) => Err(err.into()), |
| 360 | Err(mpsc::RecvTimeoutError::Timeout) => Err(TraceDecayError::Config { |
| 361 | message: "timed out waiting for codex app-server".to_string(), |
| 362 | }), |
| 363 | Err(mpsc::RecvTimeoutError::Disconnected) => Err(TraceDecayError::Config { |
| 364 | message: "codex app-server closed stdout before completing".to_string(), |
| 365 | }), |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | fn collect_item_text(value: Option<&Value>) -> Option<String> { |
| 370 | match value? { |
no outgoing calls
no test coverage detected