Files
codex/codex-rs
Eric Traut b6a53810db Add failure stages and OS error kinds to daemon startup metrics (#65049)
## Why

The TUI's daemon auto-start metric reports a failure reason, but broad
reasons such as `other` leave it unclear which startup step failed.

## What changed

Add `failure_stage` and `os_error_kind` to failed `codex.daemon.start`
attempts. For example, a missing executable reports `spawn` at
`process_spawn` with `not_found`. The metric uses a fixed set of error
categories and keeps raw OS codes and diagnostic text local.

Report Windows detached-launch restrictions as
`windows_detach_restricted`, matching the reason recorded when the TUI
falls back to an embedded app server.

## Testing

Cover missing executables, Windows launch restrictions, and preservation
of the underlying I/O error. An in-memory metrics test checks that a failed
attempt increments the counter once and maps an unknown OS code to `other`.

GitOrigin-RevId: c5976517e1178fb8d65257362a893ad6254a2ddd
2026-12-01 18:08:05 +00:00
..
…
…
…
…