mirror of
https://github.com/openai/codex.git
synced 2026-09-28 08:43:01 +08:00
## Why SQLite write failures can leave persisted logs incomplete, while log snapshots taken before collection miss errors raised during that collection. ## What changed - Report SQLite flush failures directly to the in-memory log buffer without re-entering tracing, using an error category and batch size instead of raw error details. - Track whether the log writer has lost a batch and make app-server diagnostic uploads use the memory buffer when SQLite logs are incomplete. - Refresh log bytes after flushing and querying SQLite so the same submission includes collection failures, while preserving captured metadata and thread identity. ## Testing Add regression tests for failure reporting without recursion, subsequent write recovery, metadata preservation, and healthy and failing SQLite collection. Add an upload integration test that captures attachments locally and checks failure diagnostics, memory-buffer fallback, and omission of raw SQLite error details. GitOrigin-RevId: 51b0c4b69c977d9f4e74f2f245a9fd90fdb13761