Skip to content

fix(sessions): specify native duplicate identity handling - #1374

Merged
vastsa merged 4 commits into
mainfrom
codex/fix-pr1368-session-dedupe-spec
Oct 4, 2026
Merged

vastsa merged 4 commits into
mainfrom
codex/fix-pr1368-session-dedupe-spec

Conversation

@vastsa

@vastsa vastsa commented Oct 4, 2026

Copy link
Copy Markdown
Owner

This follow-up carries yexisu's original #1368 fix and synchronizes the storage contract and E2E plan.

The reported duplicate is real: session IDs include the file path, so copied native JSONL files can produce multiple rows for one native header ID. The implementation already deduplicates the scan result and preserves the selected file and stable persisted IDs. The added contract records the newest-transcript selection rule and confirms that discovery does not rewrite or delete copied files.

Validation:

  • Original fix(sessions): collapse copied session files onto one entry per native id #1368 JS, typecheck, architecture, and Rust CI checks passed.
  • git diff --check passed.
  • origin/main is an ancestor of this head; latest base is included.
  • The full Desktop session journey remains Draft because no isolated host-backed native-session E2E harness exists; the original change includes a native session regression test.

Supersedes #1368. Fixes #1359.

yexisu and others added 3 commits October 4, 2026 10:51
…e id

Session identity hashes the file path together with the header id, so a
copy of a session .jsonl under the scan root (a backup, a manual copy)
appeared as a second list entry for the same conversation (#1359).
list() now dedupes by native header id and keeps the newest write,
dropping stale duplicates from the records map so lookups cannot route
to a dead copy. Stable ids are unchanged, so existing persisted
references stay valid.

Validated: native-pi-session tests 36/37; the single failure ("never
deletes a foreign publication") reproduces on pristine main and is
unrelated baseline noise. agent-runtime tsc clean apart from the same
baseline.
Document the identity and preservation behavior expected when native transcript files share an id, and record the full user journey for the resulting projection.
Copilot AI balanced review requested due to automatic review settings October 4, 2026 03:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

[Bug] 会话列表出现重复会话:递归扫描 + 按路径生成 ID,子目录副本变成第二条会话

3 participants