Files
codex/codex-rs/state
Charlie Marsh 44b857c00e Clean up legacy Guardian thread metadata in SQLite (#47303)
## Why

Guardian prompts are synthetic review context, but legacy thread metadata can duplicate them in titles, previews, and first messages. Keep SQLite metadata small while retaining rollout JSONL as the canonical record.

## What changed

Add a migration for Guardian threads that:

- Replaces blank or prompt-derived titles with `Guardian review`.
- Preserves nonblank names and distinct nonblank titles, using the title as the name when no name exists.
- Sets `preview` to `Approval review` and clears `first_user_message`.

## Testing

Add a migration test covering prompt-derived and blank titles, custom titles and names, and unchanged metadata for a non-Guardian worker thread.

GitOrigin-RevId: 65b5ff5200a39a19fb11f494de6dca7710ff6cc6
2026-09-22 15:05:27 +00:00
..