Skip to content

Recover archived lineage migration across compression and mount boundaries - #14

Merged
friel-openai merged 1 commit into
mainfrom
fix/archive-lineage-mount-recovery
Nov 9, 2026
Merged

friel-openai merged 1 commit into
mainfrom
fix/archive-lineage-mount-recovery

Conversation

@friel-openai

Copy link
Copy Markdown
Owner

Why

Automatic history migration can leave an archived thread unreadable.
SQLite can still store the plain rollout path after compression, even
though the migration journal records the compressed file. Comparing the
journal path directly to the SQLite row makes publication retry without
progress. Publishing a rollout segment can also fail with EXDEV when
staging and the destination are on different mounts.

Behavior

  • Resolve the current SQLite path and require it to identify the
    authenticated journal source. Use the exact stored path for the
    compare-and-swap. A changed selection is not writer-lock contention.
  • On EXDEV, copy the segment to a temporary file on the destination
    mount, verify and sync it, then publish without overwriting an existing
    target. Keep the staged bytes and legacy sources available for recovery.

The SQLite schema and journal format are unchanged. The existing hard
link for detached review inputs is unchanged.

Verification

  • An invented archived lineage reproduced the stale SQLite path failure
    before the fix. Thirteen focused thread-store tests passed after it,
    including interrupted recovery, rejection of a changed selection, and
    injected EXDEV for plain and compressed segments.
  • An independent replay from the public definitions reproduced the
    exact tested tree. All 15 CI selector tests passed; the selector adds
    the four new regression cases.

Codex Task: codex://threads/01a029f4-9863-7523-be3e-864bebe4187a

@friel-openai friel-openai added the codex-thread-store Changes to codex-thread-store label Nov 9, 2026
@friel-openai
friel-openai marked this pull request as ready for review November 9, 2026 12:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T12:22:52.554123Z e948616 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@friel-openai
friel-openai force-pushed the fix/archive-lineage-mount-recovery branch from e948616 to 9a9b42d Compare November 9, 2026 12:34
@friel-openai
friel-openai merged commit 1651f47 into main Nov 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-thread-store Changes to codex-thread-store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant