fix: keep numeric reminder targets stable across fetches - #92
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 4:15 AM ET / 08:15 UTC. ClawSweeper reviewWhat this changesThe PR breaks reminder sorting ties with stable IDs, adds reordered-fetch regression tests, and documents numeric targeting limits. Merge readiness✅ Ready for maintainer review The fix remains necessary: current main and v0.3.7 lack deterministic ordering for tied reminders. The patch addresses that gap without a blocking correctness finding. Priority: P2 Review scores
Verification
How this fits togetherremindctl reads Apple Reminders through EventKit and displays numbered reminders. Its shared sorter also determines which reminder a numeric edit, completion, or deletion targets. flowchart TD
A[EventKit reminders] --> B[Default view filter]
B --> C[Shared reminder sorter]
C --> D[Numbered listing]
E[Numeric command target] --> F[Index resolver]
C --> F
F --> G[Edit complete or delete by ID]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep one deterministic sorter for display and numeric resolution, with stable IDs recommended whenever the reminder set changes between commands. Do we have a high-confidence way to reproduce the issue? Yes, from source: reversing distinct reminders with equal dates and titles can change their numeric positions under main's comparator. The new regression exercises that mechanism; this review did not run tests. Is this the best way to solve the issue? Yes. Adding the ID as the final shared sort key preserves existing date/title precedence and fixes both display and resolution without introducing another targeting mechanism. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 673a4666794e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Two reminders with the same due date and title inherited EventKit's fetch order. A subsequent fetch in a different order could therefore make
edit 1,complete 1, ordelete 1target a different reminder from the one displayed as index 1.The shared sorter now breaks date/title ties with the stable reminder ID. Existing date and title ordering is preserved. Command documentation explains the ordering and recommends IDs when the reminder set itself may change.
Validation: failing regressions demonstrated changed numeric targets for both dated and undated ties, then passed with the fix. A compiled synthetic probe now resolves the same ID after reversing the fetch order.
make checkpassed with 94.3% RemindCore coverage, docs built, and independent P0–P2 autoreview was scoped-clean. No live reminder records were changed.