mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## What changed - Add experimental `readState` to `thread/read` and a thread-ID-keyed `readStates` map to `thread/list` for eligible durable local user threads. Each receipt contains `firstUnread` and an opaque `revision`. - Publish new visible terminal results before `turn/completed`, after flushing the rollout. Reading snapshots leaves activity unread; replayed history does not publish new activity. - Clear unread positions removed by a paginated thread revert while preserving explicit thread-start marks and concurrent receipt updates. ## Testing Add an integration test covering completed-turn receipts, repeated reads without acknowledgement, matching list receipts, and revert cleanup with a changed revision. GitOrigin-RevId: e7f6ddfbb1fc2fa95d1ef2876d7f0f7b9f99ff65
9 lines
350 B
SQL
9 lines
350 B
SQL
-- Independent of rebuildable thread metadata: only actual thread deletion removes receipts.
|
|
-- NULL means read; the empty string means manually unread from the start, even when empty.
|
|
CREATE TABLE thread_read_receipts (
|
|
thread_id TEXT PRIMARY KEY NOT NULL,
|
|
first_unread_turn TEXT,
|
|
revision TEXT NOT NULL,
|
|
last_published_turn TEXT
|
|
);
|