Skip to content

fix: validate reminder dates without losing legacy spellings - #91

Merged
steipete merged 2 commits into
mainfrom
fix/strict-date-parsing
Sep 15, 2026
Merged

steipete merged 2 commits into
mainfrom
fix/strict-date-parsing

Conversation

@steipete

@steipete steipete commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Malformed dates could silently schedule a reminder for the wrong day: 2026-02-30T12:00:00Z became March 2, Zjunk suffixes and invalid offsets were accepted, and 03-01-26 was parsed as year 3. Select each absolute format by its field order before strict calendar validation, preserving local time zones, explicit offsets, fractions, relative dates, and all-day metadata.

Preserve unambiguous spellings verified against the original compiled parser: unpadded month/day/time fields, extra spaces before times, and year-first slash/dot separators. Parameterized compatibility tests cover those inputs. Day-first hyphens and month-first slashes follow the existing declared formats. README, command docs, and Unreleased notes describe the corrected behavior.

Validation: the regressions failed before the fixes; make check passed with strict lint, full tests, and the 90% coverage gate; docs and the credential-free release harness passed. Built-CLI probes reject impossible dates, trailing text, and invalid offsets with exit 1 before accessing EventKit. Independent P0–P2 autoreview covers the full candidate. All 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. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. 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:02 AM ET / 08:02 UTC (Revision 2).

ClawSweeper review

What this changes

Validate reminder dates before parsing, preserve supported legacy spellings and field order, and document the behavior with regression tests.

Merge readiness

Ready for maintainer review

The fix remains necessary on main. The latest commit addresses the previous compatibility concern with restored legacy spellings, regression coverage, and an explicit contributor explanation; no blocking patch defect remains.

Priority: P2
Reviewed head: 3693e9c1029e0eaafbd48caeb5d4272c45f5c654

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful regression coverage and the previous compatibility concern addressed.
Proof confidence 🌊 off-meta tidepool Not applicable: The collaborator-authored PR is exempt from the external-contributor proof gate; its captured body reports built-CLI invalid-date rejection and original-parser compatibility probes, but supplies no execution transcript for independent inspection.
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 external-contributor proof gate; its captured body reports built-CLI invalid-date rejection and original-parser compatibility probes, but supplies no execution transcript for independent inspection.
Evidence reviewed 8 items Current main still needs the fix: The pinned main parser tries ISO8601DateFormatter and successive DateFormatter formats without the branch's syntax guards or explicit format selection.
Bounded parser repair: The branch selects an anchored format before non-lenient Gregorian parsing, preserves the supplied time zone, and leaves relative-date handling and public return types intact.
Previous compatibility concern addressed: The GitHub commit patch confirms that the follow-up restores variable field widths, year-first slash/dot separators, and multiple spaces before times. The contributor's explanation at #91 (comment) reports comparison against the compiled original parser. This directly addresses the retained prior rank-up request.
Findings None None.
Security None None.

How this fits together

RemindCore converts command-line due dates, alarm dates, and date filters into timestamps with all-day metadata. Commands use those results to select reminders or update Apple Reminders through EventKit.

flowchart TD
  A[Due and alarm arguments] --> C[Shared date parser]
  B[Date filter arguments] --> C
  C --> D[Relative date or absolute format]
  D --> E[Calendar validation]
  E --> F[Timestamp and all-day metadata]
  E --> G[Invalid date error]
  F --> H[Reminder filtering or EventKit update]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta Production -20 net lines; tests +63 lines The repair reduces parser code while adding focused rejection and compatibility coverage.
New date cases 29 inputs across 5 parameterized tests Coverage exercises both malformed inputs and preserved supported spellings.

Technical review

Best possible solution:

Keep one shared parser that rejects malformed dates while preserving established spellings, explicit field order, time zones, and all-day intent.

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

Yes: the captured report supplies concrete impossible-date, suffix, offset, and day-order examples, and the main parser follows the reported permissive path. Runtime reproduction was reported by the contributor, not independently executed during this read-only review.

Is this the best way to solve the issue?

Yes: selecting field order before strict parsing repairs the shared owner, and the follow-up preserves the legacy spellings identified by the earlier review without adding configuration or a competing parser.

AGENTS.md: not found in the target repository.

Codex review notes: model internal, reasoning medium; reviewed against 2ca6a4814793.

Labels

Label changes:

  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.

Label justifications:

  • P2: Incorrect parsing can schedule reminders on the wrong date, and this is a focused repair to that existing behavior.
  • 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 external-contributor proof gate; its captured body reports built-CLI invalid-date rejection and original-parser compatibility probes, but supplies no execution transcript for independent inspection.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-15T07:50:22.545Z sha 9468451 :: blocked before merge. :: none

@steipete steipete changed the title fix: reject malformed dates and preserve explicit format order fix: validate reminder dates without losing legacy spellings Sep 15, 2026
@steipete

Copy link
Copy Markdown
Collaborator Author

Addressed the compatibility concern with executable evidence rather than an upgrade-policy change. Compiling the original parser confirmed support for 2026-1-3, 2026/1/3, 2026.1.3, 1/3/2026, unpadded times, and extra spaces before a time. The revised patterns retain these spellings, with regression coverage, while enforcing the existing declared field order and rejecting impossible dates, trailing text, and malformed offsets. The PR description and docs now spell out that boundary.

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. label Sep 15, 2026
@steipete
steipete merged commit 673a466 into main Sep 15, 2026
10 checks passed
@steipete
steipete deleted the fix/strict-date-parsing 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