MCP get_forecast does not project recurrence series (parity with CLI forecast) #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #14. The CLI
next forecastnow projects schedule-type recurrence series forward over the horizon (commita4c20a3), but the MCPget_forecasttool (src/mcp/tools/view.rs) is a separate implementation that still lists only existing tasks whose storeddue <= cutoff— it does not project future, not-yet-spawned occurrences.Impact: AI clients using MCP see a weekly task's single current instance instead of the ~12 occurrences in a 90-day window — inconsistent with the CLI.
Fix: bring
get_forecastto parity with the CLI: project active schedule-type recurrences vianext_occurrenceup to the horizon, mark projected (not-yet-spawned) occurrences distinctly in the JSON, and skip completion-type / done / cancelled as the CLI does. Reuse the projection logic from src/cli/commands/forecast.rs where practical (consider extracting a shared core helper so the two implementations cannot drift again). Add MCP tests.Found during the #14 fix.