You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revival of the closed#218 (branch deleted). Fixes the cold-thread/list half of #150: the fork rollout survived process restart and thread/read returned its parent, but cold thread/list discarded forkedFromId in the local thread-store list projection. The patch restores lineage from the rollout session metadata.
Verification:
git apply --check of patches/codex/thread-list-fork-lineage.patch against a clean export of the pinned codex (13595c36) — applies cleanly; the submodule pin has not moved since the original draft.
Sync-codex wiring (Makefile resolved to main's wildcard patch discovery; the patch is picked up automatically).
Full physical-device acceptance from Forked chat/thread becomes inaccessible after leaving session #150 (fork → follow up → leave → force restart → reopen from Sessions/Forks → continue on both iPhone This-Device and remote-VM paths) remains the issue's acceptance gate.
Follow-ups from the review, pushed as 411e6a26..1e4239c9:
CI now runs the new test. The shared job applies the patch set (sync-codex.sh --recorded-gitlink) and then runs cargo test -p codex-thread-store, so cold_list_threads_preserves_fork_lineage_from_rollout executes on every PR instead of only locally.
Per-thread re-reads removed. Lineage is now carried through the rollout list projection instead of reopening each rollout file in list_threads: ThreadItem gains forked_from_id (filled from session meta during the head read), stored_thread_from_rollout_item forwards it, and fill_missing_thread_item_metadata merges state-DB metadata values in. thread-list-fork-lineage.patch was regenerated accordingly. The whole patch sequence was verified by resetting the submodule pristine and re-applying every patch from the committed files — the re-applied tree is byte-identical to the tested state.
Self-parents / cycles / missing parents. Left as-is intentionally: upstream fork always mints a fresh thread id, and with the projection path the parent id comes straight from the fork's own session meta. A missing parent (deleted, archived, or on another page) yields a fork entry whose parent id may not be present in the same page — same exposure as the previous per-read approach; deeper UX handling is tracked with Forked chat/thread becomes inaccessible after leaving session #150.
Silent error nit — evaporated with the re-read block: list_threads no longer does per-thread file I/O for lineage.
Test gaps. The cold-list test now also asserts a non-fork thread keeps forked_from_id: None. The state-db-only and id-mismatch gaps are moot — no per-thread file reads remain, and the projection is per-file by construction. A mobile-side reducer test asserting a cold list result sets is_fork in the session summary is still open; noted on Forked chat/thread becomes inaccessible after leaving session #150.
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
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.
Revival of the closed #218 (branch deleted). Fixes the cold-
thread/listhalf of #150: the fork rollout survived process restart andthread/readreturned its parent, but coldthread/listdiscardedforkedFromIdin the local thread-store list projection. The patch restores lineage from the rollout session metadata.Verification:
git apply --checkofpatches/codex/thread-list-fork-lineage.patchagainst a clean export of the pinned codex (13595c36) — applies cleanly; the submodule pin has not moved since the original draft.