Files
pipelines/docs/notes/codex-message-timestamps.md
T

2.1 KiB

Codex transcript timestamps

Codex thread history previously flattened items without setting ChatMessage.CreatedAt, so clients correctly omitted timestamps. The installed App Server schema records Turn.startedAt in epoch seconds; individual historical ThreadItems have no creation timestamp. Forward the recorded turn start, converted to milliseconds, to both user and assistant rows (including failed-turn detail). This is turn-level timing, not an exact per-item send time. Missing, negative and out-of-range values remain absent; never substitute server read/render time. Pagination/order and client message identities are unchanged.

Verified against the installed Codex generated schema (v2/ThreadTurnsListResponse.json, ServerNotification.json). Tests exercise real JSON history decoding, pagination order, user/assistant identity, repeated reads, in-progress turns, legacy missing times and invalid/overflowing values. Focused Codex tests passed. Deployment must wait for all shared runs and chat turns to settle; the first Codex bridge upgrade cannot retroactively preserve outstanding connection-bound approvals/questions.

Full go build ./..., go vet ./..., and go test ./... passed. Landed 20a69b7e; staged canonical installer binaries from that clean commit. Four isolated deployment-helper tests passed (idle guard, backup/health/runtime verification, rollback, and Codex history timestamp verification).

Deployment queued, not yet applied: /Users/alan/.local/share/pipelines/logs/maintenance-cutover-codex-timestamps-20261106.json (helper PID 29754). It waits for executing runs, chat turns and background tasks to stop, takes a database/binary backup, installs through the canonical manager, verifies runtime identity, recorded OpenCode model metadata and actual Codex history timestamps. No forced restart; four-hour busy limit leaves a blocked status. At queue time this Codex chat was active and Claude session b73a1bae-991e-44ef-ac05-fe8a30abede5 had two background tasks. The web already renders the corrected day-first format; no further client build is required.