Repository navigation
feat(harvest): --since date filter for Codex harvest (recency scoping) - #117
Conversation
Codex harvest scopes by cwd (folder), so same-folder/different-subject sessions leak in (#116). Add --since YYYY-MM-DD to harvest only sessions updated on/after a date — the most-recent work is the most relevant. Uses rollout frontmatter updated_at, falling back to the date-prefixed filename. Codex-only; the cross-project memory_summary.md is excluded when --since is set. Closes #116. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR adds a ChangesCodex recency filtering via --since option
Sequence DiagramsequenceDiagram
participant User
participant CLI
participant HarvestTool
participant CodexRead
participant Filter
User->>CLI: harvest --tool codex --since 2026-05-20
CLI->>CLI: validate since as ISO date
CLI->>HarvestTool: harvest_tool(codex, since=2026-05-20)
HarvestTool->>CodexRead: harvest_codex_memory(since=2026-05-20)
CodexRead->>CodexRead: parse since to date object
CodexRead->>Filter: iterate rollout summaries
Filter->>Filter: resolve effective date (updated_at or filename)
Filter->>Filter: compare date >= since?
Filter->>CodexRead: include/exclude record
CodexRead->>User: return harvested sessions from 2026-05-20 onward
🎯 3 (Moderate) | ⏱️ ~20 minutes
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
Closes #116.
Why
Codex harvest scopes by
cwd(folder), so a session that ran in this repo's folder but was about a different/old subject still gets harvested. Real example: harvesting Spanweave's repo pulled in a "Issue #24 specify decisions for demo login rate limiting" record — that was the old workflow-engine's throwaway demo app, not Spanweave (which has no login or rate-limiting). Folder ≠ topic.What
spanweave harvest --tool codex --since YYYY-MM-DDfilters to sessions updated on/after the date — recent work is the most relevant. Date comes from the rollout's frontmatterupdated_at, falling back to the date-prefixed filename; undateable records are excluded under--since(can't prove recency). Inclusive comparison. Codex-only (Claude memory has no per-session dates). The cross-projectmemory_summary.mdis excluded whenever--sinceis set. Bad dates → cleanclick.BadParametererror (exit 2, no traceback).Verified independently (not just agent report)
Real
~/.codexagainst the Spanweave repo path:since=None→ 4 records (incl. the off-topic "issue W24: Integration tests + E2E validation #24 login rate limiting")since=2026-05-20→ 1 record; off-topic ones excluded ✓since=2027-01-01→ 0 (boundary correct)Full suite 345 passed · ruff clean · pyright 0 errors. +9 tests.
Note
--sinceis a recency lever, not a topic classifier — dates don't perfectly separate subjects (a clean and an off-topic record can share a date). It's the right 80/20 tool; true topic-scoping (keyword/semantic) remains future work under #116's spirit.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
--since YYYY-MM-DDoption to thespanweave harvestcommand to restrict Codex native-memory harvesting to sessions updated on or after a specified date.Tests