bug: align NLP recurrence provider storage with parser #314

Closed
opened 2026-05-11 19:19:50 +00:00 by barrettruth · 0 comments
Owner

Parent: #305

Problem

NLP recurrence parsing remains part of the calendar settings surface, but the current provider storage and parser route appear inconsistent: settings write provider metadata/tokens one way while the parse route reads a different key shape. Optional provider complexity is acceptable only if it is reliable and isolated.

Solution

Tighten the NLP recurrence boundary:

  • audit src/app/api/settings/nlp/route.ts, src/app/api/nlp/parse-recurrence/route.ts, and src/components/settings/calendar-settings-section.tsx
  • make provider IDs, token field names, enabled provider selection, and model defaults consistent
  • if NLP fallback is not required for v0.1, remove the route/UI cleanly instead of keeping a broken optional path
  • keep local deterministic recurrence parsing as the baseline behavior

Acceptance criteria

  • The selected NLP provider, stored token metadata, and parse route agree on one contract.
  • A missing or disabled NLP provider falls back cleanly to local parsing.
  • Provider tokens are never exposed to the client, logs, issues, docs, or PR descriptions.
  • Tests cover enabled provider, disabled provider, and missing-token behavior.
Parent: #305 ## Problem NLP recurrence parsing remains part of the calendar settings surface, but the current provider storage and parser route appear inconsistent: settings write provider metadata/tokens one way while the parse route reads a different key shape. Optional provider complexity is acceptable only if it is reliable and isolated. ## Solution Tighten the NLP recurrence boundary: - audit `src/app/api/settings/nlp/route.ts`, `src/app/api/nlp/parse-recurrence/route.ts`, and `src/components/settings/calendar-settings-section.tsx` - make provider IDs, token field names, enabled provider selection, and model defaults consistent - if NLP fallback is not required for v0.1, remove the route/UI cleanly instead of keeping a broken optional path - keep local deterministic recurrence parsing as the baseline behavior ## Acceptance criteria - The selected NLP provider, stored token metadata, and parse route agree on one contract. - A missing or disabled NLP provider falls back cleanly to local parsing. - Provider tokens are never exposed to the client, logs, issues, docs, or PR descriptions. - Tests cover enabled provider, disabled provider, and missing-token behavior.
barrettruth added this to the v0.1.0 milestone 2026-05-11 19:19:50 +00:00
Sign in to join this conversation.
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
barrettruth/delta#314
No description provided.