Repository navigation
Conversation
Share only known Codex settings and canonical rollout paths. Refuse legacy runtime links without unlinking targets, and retain one writer-lock namespace across repeated or concurrent starts. Honor explicit config homes before preparing an unused account home, and keep restored sessions stopped when account setup fails. Add synthetic SQLite close/reopen and active-lock regressions. Signed-off-by: Ahimsa Jenar Bramsaifstyo Kusuma <tio.rmx@gmail.com> (cherry picked from commit 7d7596661a461f676aed5bc51a48cc9a39278c24) (cherry picked from commit bd061596a044c39afa7855123f9a87f2ecc08217) Signed-off-by: Ahimsa Jenar Bramsaifstyo Kusuma <tio.rmx@gmail.com>
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.
What and why
Codex account preparation links missing default-home runtime entries into another account home. After a physical account SQLite database closes and removes its sidecars, the next preparation can link the default database's WAL/SHM into that account. Share only known settings and conversations so databases, journals, auth, sockets, daemon state and unknown future names remain private. Refuse existing unsafe links without changing them or their targets.
Keep
sessions,archived_sessionsandthread-writer-locksin one canonical namespace, including first launch and concurrent starts within the daemon. Refuse conflicting namespaces or failure to establish required links. Honor the last explicit config CODEX_HOME before touching an unused generated home, using case-insensitive environment names on Windows. Explicit homes remain owner-managed; team-member isolation is unchanged.Failed account preparation during restoration leaves the session stopped with exit code -1; continue propagates the failure. Adapted onto main
cd071c6299c93b91c6e21643ca6c6c11156a39d7after the restart changes in #31: retainkeyAwaitsApp,restartVaultEnv, Lost reporting, TabAgent handling and the existing carry-on flow. The account guard runs after key-wait handling and before launching a restored session.How it was tested
One signed-off commit:
d62460b9fea93fa5de1d62e9234906e05a59f835. Only account-sharing code, its restoration guard, focused regressions and account documentation are changed.Actual local Windows checks with Go 1.27.3, fresh synthetic homes and a private temporary/cache location:
go test ./core/accounts -count=1 -timeout=2m -v: 19 top-level tests passed, 2.904s. Includes real SQLite close/prepare/reopen cycles for two account databases, row ownership/integrity, canonical aliases with a live OS lock, legacy/dangling link refusal and explicit-home precedence.TestCodexRestoreRefusesUnsafeAccountHomepasses for idle and mid-turn-tab records, including continue refusal, carry-on readiness refusal, unchanged journal/link and retained Lost reporting.TestContinueWithoutAConversationpasses. Eleven existing restart tests that requireshskip on Windows; these skips are not native restart validation.go vet ./core/accounts ./daemon: passed.git diff --check: passed.048b78ece9b54ab5c2d5f32c1944eb738c82311cfails at cycle 0. The broad sharing path remains in the current base. This is a synthetic path-sharing reproduction, not historical corruption attribution.This starts as Draft while CI runs for this exact head. Local checks do not establish full
make test/make lint, native Linux/macOS flock/restart behavior, or authenticated lifecycle behavior.make testandmake lintpass on this headgit commit -s)No protocol change, automatic legacy migration, recovery or private thread-index rebuilding is included. Real sign-in, fresh/resume/account switching, and owner-reviewed offline migration still need validation. Preserve matching physical databases/journals and canonical writer-lock identity during that separate review. No deployment is included.
Closes #37.