mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
Classify daemon auto-start failures in TUI telemetry (#59058)
## What changed Add a `failure_reason` tag to failed TUI auto-start events in `codex.daemon.start`, distinguishing `install`, `spawn`, `early_child_exit`, `readiness_timeout`, and `other` failures. Preserve the original error diagnostics through a classified startup API. Detect managed child exits during process identity recording and distinguish exits before readiness from readiness timeouts. ## Testing Extend daemon tests to assert classification of installation failures, spawn failures, early child exits, and readiness timeouts. GitOrigin-RevId: 7c626f278e9e7f2ecd61b3fd1a90829a113eb232
This commit is contained in:
@@ -839,6 +839,12 @@ async fn readiness_waits_for_a_slow_managed_daemon() {
|
||||
backend.start().await.unwrap();
|
||||
|
||||
tokio::time::pause();
|
||||
// The process is alive but has no listening socket throughout the first deadline.
|
||||
let error = daemon.wait_until_ready().await.unwrap_err();
|
||||
assert_eq!(
|
||||
crate::telemetry::StartError::from(error).failure_reason(),
|
||||
"readiness_timeout"
|
||||
);
|
||||
let (ready, listener) = tokio::join!(daemon.wait_until_ready(), async {
|
||||
// Model a cold start that takes longer than the old Linux readiness deadline.
|
||||
tokio::time::sleep(Duration::from_secs(15)).await;
|
||||
|
||||
Reference in New Issue
Block a user