Skip to content

refactor: share EventKit reminder snapshot conversion - #83

Merged
steipete merged 1 commit into
mainfrom
refactor/phase5-command-metadata
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
refactor/phase5-command-metadata

Conversation

@steipete

@steipete steipete commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

EventKit reads and writes converted the same snapshot fields in two places, making metadata changes easy to apply to only one path. Move the callback snapshot into its own file and share its conversion to ReminderItem; remove an unused calendar lookup and reuse the existing list resolver.

The synchronous callback snapshot still owns the crossing from EventKit objects to Sendable values. Missing-calendar reads are skipped and saved reminders still report the existing error. Public library overloads, CLI output and platform floors are preserved.

Validation: isolated Codex autoreview is scoped-clean through P2; make check passes strict Swift/shell/workflow lint, all tests, and 94.0% RemindCore line coverage (958/1019). make build, make docs-site, and make release-harness pass.

Live proof using the built, locally signed bin/remindctl: created a disposable synthetic list; added a timed repeating reminder with priority, URL and notes; compared add/export/show JSON metadata; changed its title and due date to all-day while preserving its alarm; exercised standard/table/plain/quiet output; removed recurrence, completed and deleted the reminder; deleted the list. All assertions passed and synthetic data was removed. Recurrence is removed before completion because EventKit advances repeating reminders to their next occurrence.

Exact-head CI: https://github.com/openclaw/remindctl/actions/runs/34742412779 (candidate afc8ee016064a3199cf6cc090ebe56f2a7dc3ff6).

@clawsweeper

clawsweeper Bot commented Sep 13, 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 P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 2:22 AM ET / 06:22 UTC.

ClawSweeper review

What this changes

Shares reminder metadata conversion between EventKit reads and saved reminders, reuses list resolution, and removes unused helpers.

Merge readiness

Ready for maintainer review

This remains a useful, bounded refactor: main still duplicates the conversion, and no introduced correctness defect was found. The collaborator-authored PR is also protected from automatic closure.

Priority: P3
Reviewed head: afc8ee016064a3199cf6cc090ebe56f2a7dc3ff6

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving consolidation with existing regression coverage and a relevant reported live walkthrough.
Proof confidence 🌊 off-meta tidepool Not applicable: The collaborator exemption applies. The supplied signed-CLI walkthrough matches the shared read/save conversion through add, export, show, and edit, reporting preserved metadata and alarms; no independent runtime transcript was supplied or executed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The collaborator exemption applies. The supplied signed-CLI walkthrough matches the shared read/save conversion through add, export, show, and edit, reporting preserved metadata and alarms; no independent runtime transcript was supplied or executed.
Evidence reviewed 7 items Complete introduced diff: The complete pinned base-to-head diff preserves all snapshot fields, the injected Calendar, synchronous callback extraction, and missing-calendar handling. The list resolver delegates to the same existing name and ID resolution branches.
Still useful on main: Current main retains separate ReminderItem construction in reminderItem and fetchReminders. The proposed consolidation is not already implemented there.
Latest release comparison: The v0.3.6 source also retains the two conversion implementations; the release does not supersede this refactor.
Findings None None.
Security None None.

How this fits together

RemindCore connects the command-line tool to Apple Reminders through EventKit. It snapshots EventKit objects into transferable values, then converts those values into reminder records for command output.

flowchart LR
  A[CLI read requests] --> B[EventKit fetch callback]
  C[CLI reminder changes] --> D[EventKit save]
  B --> E[Reminder snapshot]
  D --> E
  E --> F[Shared record conversion]
  F --> G[CLI output]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta Production +90/-116 (net -26); tests +0/-0 The two-file consolidation reduces production code and retains existing snapshot regression coverage.

Technical review

Best possible solution:

Use one internal snapshot-to-record mapper while preserving callback isolation, metadata, calendar semantics, and existing error behavior.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a refactor rather than a reported runtime failure; the duplicated conversion is directly visible on main.

Is this the best way to solve the issue?

Yes: sharing the existing value conversion removes duplication without changing the EventKit callback boundary or public API.

AGENTS.md: not found in the target repository.

Codex review notes: model internal, reasoning medium; reviewed against 1b71fb003087.

Labels

Label changes:

  • add P3: This is internal deduplication with preserved observable behavior and no established urgent user failure.
  • 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 exemption applies. The supplied signed-CLI walkthrough matches the shared read/save conversion through add, export, show, and edit, reporting preserved metadata and alarms; no independent runtime transcript was supplied or executed.

Label justifications:

  • P3: This is internal deduplication with preserved observable behavior and no established urgent user failure.
  • 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 exemption applies. The supplied signed-CLI walkthrough matches the shared read/save conversion through add, export, show, and edit, reporting preserved metadata and alarms; no independent runtime transcript was supplied or executed.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • SebTardif: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 19e5888 into main Sep 13, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. 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