feat: [ENG-2062] prune operation — staleness scoring and archival#414
feat: [ENG-2062] prune operation — staleness scoring and archival#414danhdoan merged 3 commits intoproj/dreamingfrom
Conversation
Two-signal candidate detection (importance decay + mtime staleness), LLM review (ARCHIVE/KEEP/MERGE_INTO), archive via existing service, defer merge suggestions to next dream cycle via pendingMerges. Bugs found and fixed during interactive testing: - Inline candidate summaries in prompt (LLM exhausted maxIterations on code_exec) - Re-read dream state at Step 7 to preserve pendingMerges written by prune - Wire archiveService + projectRoot into CLI undo for archive restoration - Compute stub path from original path in undo (restoreEntry expects stub)
|
Claude finished @RyanNg1403's task in 2m 33s —— View job PR Review: feat: [ENG-2062] prune operation — staleness scoring and archival
SummaryScore: 4 / 5 Solid, well-structured implementation. The two-signal candidate detection, the dedup+cap logic, the never-throw contract, and the sequential Issues found
What's working well
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74cd41bf33
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Remove ! non-null assertion, guard with if-check instead - Extract shared walkMdFiles helper, eliminating duplicated walk logic - Drop MERGE_INTO op when mergeTarget is absent (return undefined) - Store stubPath in ARCHIVE operation, undo reads it directly (no fragile path recomputation) - Fix mergeTarget? in JSON prompt example to valid format - Add test for MERGE_INTO with absent mergeTarget
|
Claude finished @RyanNg1403's task in 1m 33s —— View job PR Review (follow-up): feat: [ENG-2062] prune operation — staleness scoring and archival
Follow-up Review — Addressing Reviewer FeedbackThe fix commit (
Notable quality of the
|
Use toUnixPath on walkMdFiles relative path output to ensure consistent forward-slash separators across platforms. Without this, Signal A/B dedup and candidateSet hallucination guard would fail on Windows due to backslash vs forward-slash mismatch.
|
Claude finished @RyanNg1403's task in 1m 14s —— View job PR Review (follow-up #2): feat: [ENG-2062] prune operation — staleness scoring and archival
Follow-up Review — Windows Path NormalizationThe third commit ( The fix (
|
| Prior Observation | Resolution |
|---|---|
Path separator mismatch in walkMdFiles — Signal A/B dedup and candidateSet guard would fail on Windows |
✅ toUnixPath applied at the single generation point inside walkMdFiles; fix is minimal, idiomatic, and covers all callers |
The fix is correct, minimal, and uses the project's established utility. No issues found.
Score: 5 / 5
All issues from all prior reviews have been resolved. The implementation is clean, standards-compliant, well-tested, and now cross-platform safe. Ready to merge.
Summary
Test plan