fix: handle CRLF in managed URL notes and CSV exports - #93
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:16 AM ET / 08:16 UTC. ClawSweeper reviewWhat this changesRecognize complete newline characters when removing managed URL notes and escaping CSV exports, with CR/LF/CRLF regression tests and documentation. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main retains the faulty newline checks, and no blocking patch defect was found. The collaborator-authored PR is also protected from automatic closure. Priority: P2 Review scores
Verification
How this fits togetherremindctl reads and edits Apple Reminders through EventKit. Its URL-note helper keeps links visible in Reminders.app, while its CSV exporter converts reminder fields into spreadsheet-safe output. flowchart TD
A[CLI reminder edits] --> B[Managed URL note cleanup]
B --> C[EventKit reminder storage]
C --> D[CSV export]
D --> E[Newline quoting and formula protection]
E --> F[CSV output]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep newline recognition in the existing helpers so CRLF notes retain authored text and CSV fields remain quoted and formula-protected. Do we have a high-confidence way to reproduce the issue? Yes, from source: embedded CRLF managed lines and CRLF-prefixed formulas encounter character comparisons that cannot recognize the combined newline. The added tests encode these cases; this review did not execute them. Is this the best way to solve the issue? Yes. Character newline classification repairs the existing scanner and CSV helpers without adding a parallel implementation, configuration, or migration. 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
|
Swift treats CRLF as one Character. Checks against individual CR or LF characters therefore missed Windows-style newlines: clearing or replacing a URL left its managed notes line behind, CSV export emitted multiline fields without quotes and split records, and formula-prefix neutralization missed CRLF prefixes.
Use Character newline classification in the existing note scanner and CSV helpers. The scanner consumes a complete newline and preserves authored text and line endings; CSV quotes multiline fields and recognizes formula prefixes after CRLF. Add parameterized CR/LF/CRLF regressions, command documentation, and an Unreleased entry.
Validation: the new tests failed on the original paths and
make checkpassed after the fix with 94.9% RemindCore coverage. A compiled synthetic notes probe confirms clearing the URL leaves exactly the authored CRLF text. Docs built and independent P0–P2 autoreview was scoped-clean. Reminder fixtures are synthetic; no live reminder records were changed.