Skip to content

fix: handle CRLF in managed URL notes and CSV exports - #93

Merged
steipete merged 1 commit into
mainfrom
fix/crlf-text-handling
Sep 15, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/crlf-text-handling

Conversation

@steipete

Copy link
Copy Markdown
Collaborator

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 check passed 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.

@clawsweeper

clawsweeper Bot commented Sep 15, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 4:16 AM ET / 08:16 UTC.

ClawSweeper review

What this changes

Recognize 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
Reviewed head: adb5555c336a625323d8b8070c5bd93b5f8b9de7

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, maintainable repair with focused regression coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The collaborator-authored PR is exempt from the ordinary external-contributor proof gate; its body reports a compiled synthetic URL-note probe and regression checks, but supplies no independently inspected live EventKit or CSV runtime trace.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The collaborator-authored PR is exempt from the ordinary external-contributor proof gate; its body reports a compiled synthetic URL-note probe and regression checks, but supplies no independently inspected live EventKit or CSV runtime trace.
Evidence reviewed 7 items Current main still needs the repair: The main revision compares individual Characters against CR and LF in the note scanner and formula-prefix scan. The introduced patch replaces these checks with isNewline and consumes the complete newline character.
Production persistence boundary: Reminder creation and updates call the existing URL-note helper before saving through EventKit. The patch changes text recognition without changing the persisted model, URL matching contract, or authorization.
Focused regression coverage: New parameterized tests cover embedded managed-line clearing and replacement for three newline styles, CSV multiline quoting for those styles, and formula-prefix protection for four prefixes. Existing tests retain authored whitespace, empty-note, and generated-block behavior.
Findings None None.
Security None None.

How this fits together

remindctl 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]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta Production +6/-15; tests +25/-0 The repair simplifies existing production logic while adding focused newline regressions.

Technical review

Best 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.

Labels

Label changes:

  • add P2: This repairs bounded CRLF handling defects in reminder notes and CSV export without evidence of an urgent broad outage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The collaborator-authored PR is exempt from the ordinary external-contributor proof gate; its body reports a compiled synthetic URL-note probe and regression checks, but supplies no independently inspected live EventKit or CSV runtime trace.

Label justifications:

  • P2: This repairs bounded CRLF handling defects in reminder notes and CSV export without evidence of an urgent broad outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The collaborator-authored PR is exempt from the ordinary external-contributor proof gate; its body reports a compiled synthetic URL-note probe and regression checks, but supplies no independently inspected live EventKit or CSV runtime trace.

Evidence

What I checked:

Likely related people:

  • Andy Ye: Raw commit 5ac23a9 adds Sources/RemindCore/ReminderURLNoteMirror.swift:4 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5ac23a9c823b; files: Sources/RemindCore/ReminderURLNoteMirror.swift)
  • Peter Steinberger: Raw commit 3bc45c3 adds Sources/remindctl/Commands/ExportCommand.swift:97 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3bc45c3bba93; files: Sources/remindctl/Commands/ExportCommand.swift)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 2a1da5f into main Sep 15, 2026
11 checks passed
@steipete
steipete deleted the fix/crlf-text-handling branch September 15, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant