Sync all existing Codex state databases - #50
Open
mayii2001 wants to merge 1 commit into
Open
Conversation
Owner
|
感谢提交,这个方向可以解决两个
建议补充对应的失败提交和同文件链接测试。修改后我再看一下。 |
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.codex/sqlite/state_5.sqliteand~/.codex/state_5.sqlitebefore changing rollout metadataEnvironment
10.0.26200(build26200)26.707.8479.0(OpenAI.Codex_26.707.8479.0_x64__2p2nqsd0c76g0)Why
v0.2.9 / #48 improved active database detection, but sync still writes only the single database returned by that heuristic. After updating the database by v0.2.9 tool, the desktop history records briefly appeared and then disappeared.
Codex supports an independent SQLite home through
sqlite_home/CODEX_SQLITE_HOME; otherwise it defaults toCODEX_HOME. Consequently, different Codex versions, surfaces, or launch configurations can select different paths:CODEX_HOME=~/.codex→~/.codex/state_5.sqlitesqlite_home=~/.codex/sqlite→~/.codex/sqlite/state_5.sqliteA sync tool cannot reliably predict which existing database a later Desktop or app-server launch will select. Updating only the database that currently looks most active can therefore leave stale provider metadata in the other known location.
Observed locally before manual repair:
~/.codex/sqlite/state_5.sqlite: 262 threads usingcustom~/.codex/state_5.sqlite: 316 threads usingOpenAI, 1 usingcustomThe current Desktop app-server was actively writing the legacy-root database, while the sqlite-dir database appeared to be left by another version or configuration. After both databases were synchronized to
custom, Desktop history remained visible instead of appearing briefly and disappearing again.The Codex CLI/app-server and SQLite state implementation are public, but the complete Codex Desktop UI implementation is not available in the public
openai/codexrepository. Therefore the exact UI-side mechanism behind the brief appearance and subsequent disappearance cannot currently be established from source. Synchronizing only the heuristically selected database did not resolve the issue in this environment, while synchronizing both existing databases did.This is related to the behavior reported in #28 and complements the active-database detection added by #48.
Safety
BEGIN IMMEDIATEis acquired before rollout changes are appliedTests
npm test— 41 passeddotnet test desktop/CodexProviderSync.Core.Tests/CodexProviderSync.Core.Tests.csproj -c Release --no-restore— 43 passed