Skip to content

fix(codex): recover legacy thread names - #396

Open
huzhongyyuan wants to merge 1 commit into
SaladDay:mainfrom
huzhongyyuan:fix/codex-legacy-thread-name-backfill
Open

fix(codex): recover legacy thread names#396
huzhongyyuan wants to merge 1 commit into
SaladDay:mainfrom
huzhongyyuan:fix/codex-legacy-thread-name-backfill

Conversation

@huzhongyyuan

Copy link
Copy Markdown

Closes #395.

Backfills legacy Codex thread names from session_index.jsonl into blank threads.name values during startup, allowing native Codex CLI and VS Code surfaces to retain renamed session titles after provider/relay changes.

Safety properties:

  • never overwrites non-empty native names;
  • updates only threads.name, preserving archive and unrelated state;
  • supports the default state DB and configured sqlite_home;
  • uses BEGIN IMMEDIATE, source snapshot/digest checks, a fresh SQLite backup, and a per-DB transactional ledger;
  • retries safely after interruption, handles DB replacement, isolates per-DB failures, and bounds index/DB work.

Validation:

  • cargo fmt --check
  • cargo test codex_history_migration::tests:: --lib (52 passed)
  • cargo test settings::tests:: --lib (19 passed)
  • git diff --check

Repository-wide cargo clippy remains blocked on unchanged src/cli/tui/ui/home_chart.rs:806 (reversed_empty_ranges). Full integration-test compilation also has unchanged test-harness errors in tests/settings_current_provider.rs and tests/settings_visible_apps.rs; these are not introduced by this patch.

Related upstream Codex reports: openai/codex#16405 and openai/codex#16280.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recover legacy Codex thread names in the native state database

1 participant