Recurrence: RRULE not validated at add/edit time (only fails later at done) #13

Closed
opened 2026-06-05 10:26:22 +00:00 by victor · 0 comments
Owner

parse_recurrence (src/cli/recurrence_parse.rs) stores the raw rrule string without ever calling parse_rrule. A malformed or unsupported rule is accepted silently and only fails later when the user runs next done (which then also fails the whole done operation).

Fix: validate the rule when it is set (add/edit) by parsing it through parse_rrule and rejecting with a clear error. Add tests for malformed rules: missing FREQ, INTERVAL=0, empty string, unknown FREQ, BYMONTHDAY=0/negative, garbage.

REQUIREMENTS §7 doesn't state when validation occurs — document it. Found in review.

`parse_recurrence` (src/cli/recurrence_parse.rs) stores the raw `rrule` string without ever calling `parse_rrule`. A malformed or unsupported rule is accepted silently and only fails later when the user runs `next done` (which then also fails the whole done operation). **Fix:** validate the rule when it is set (`add`/`edit`) by parsing it through `parse_rrule` and rejecting with a clear error. Add tests for malformed rules: missing FREQ, `INTERVAL=0`, empty string, unknown FREQ, `BYMONTHDAY=0`/negative, garbage. REQUIREMENTS §7 doesn't state when validation occurs — document it. Found in review.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
victor/task-manager#13
No description provided.