Skip to content

store: scope --date thread orphan dump to the requested day - #358

Closed
anish749 wants to merge 1 commit into
mainfrom
worktree-date-no-orphan-dump
Closed

store: scope --date thread orphan dump to the requested day#358
anish749 wants to merge 1 commit into
mainfrom
worktree-date-no-orphan-dump

Conversation

@anish749

Copy link
Copy Markdown
Owner

Problem

pigeon read --date X returned data even when the conversation had no date file for X. interleaveThreads always dumped every thread file whose parent wasn't in the selection, leaking parents and replies from unrelated days into a single-day read.

Solution

Pass the requested date through to interleaveThreads. When set, the orphan-dump fallback drops the cross-date parent and keeps only replies whose ts falls on that day. --since and the default window still get the unbounded fallback (their existing post-filter trims by ts).

Tests

  • TestReadConversation_Date_NoFile_DoesNotDumpThreads — new regression: thread file from another day must not surface for --date X when X has no date file.
  • Existing TestInterleaveThreads_ParentNotInDateFiles still passes (cross-date reply on requested day still surfaces).
  • Existing --since orphan tests unchanged.

@anish749

anish749 commented May 3, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #363 — the right fix is to rebuild the read pipeline around thread completion (filter → complete → dedupe → sort → interleave), not patch the orphan-dump path.

@anish749 anish749 closed this May 3, 2026
@anish749
anish749 deleted the worktree-date-no-orphan-dump branch July 9, 2026 19:31
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.

1 participant