Stop get_journal from silently creating entries and carrying tasks forward

オープン
#415 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp
領域
api, backend

調査の方向性

Read assistant/src/TaskFlow.Mcp/Tools/JournalTools.cs and JournalResolver.cs, then trace JournalEntriesController.Create at lines 97–105 to understand when entries are created and tasks are carried forward. First resolve the design decision alongside #409 part 3 and #412 item 1; this work is blocked by #400. Done means the chosen read behavior, tool result, and "safe" wording are consistent, with any carried tasks disclosed.

索引モデルが issue の本文から書いたものです。

説明

bug

Follow-up from #413 (chore: move taskflow-assistant into assistant/), raised during review.

Problem

get_journal is described as safe to call ("calling it for today is safe"), but it creates the day's entry through JournalResolver.EnsureAsync, always passing the real timezone offset. For the user's own today, JournalEntriesController.Create then runs CarryForwardIncompleteTasksAsync and moves incomplete tasks from earlier days into it. The tool's output does not say so.

Scenario: a plan-my-day run calls get_journal for today as a read-only gather step. If today's entry does not exist yet, that call creates it and moves yesterday's incomplete tasks, with no mention in the result. The same EnsureAsync call sits behind set_journal_todos, add_log_entry and update_journal. A read of a past or future date also creates an empty entry for that date (carry-forward does not run for those).

Whether the carry-forward itself is wrong is a design question: the API does carry forward when today's entry is created with an offset, which is the intended web behaviour. The problem is that the assistant triggers it silently from a tool presented as a read, and creates junk entries on reads of other dates.

Severity: 🟠 Important. Pre-existing in the imported assistant code, not introduced by #413.

Location

assistant/src/TaskFlow.Mcp/Tools/JournalTools.cs:31 at 3c3e6b4 (permalink); see also JournalResolver.cs:12 and TaskFlow.Api/Controllers/V1/JournalEntriesController.cs:97-105.

Suggested approach

Decide the intended behaviour first. Options: have get_journal look the entry up read-only (FindAsync) and report "no entry yet" instead of creating it; or create only for today and say in the tool result when tasks were carried forward (the API returns movedCount/movedTaskItemIds); and correct the "safe" wording in the tool description and skill docs either way. Deferred from #413 because it needs a design decision and the assistant code was imported unchanged.

Related

The option that reports movedCount and movedTaskItemIds in the tool result overlaps #409 part 3 (report moved tasks) and #412 item 1 (JournalEntryDto drops those fields). Decide the three together, so the DTO and the wording change once. Blocked by #400, because assistant feature work waits for the merged pipeline.


Created by @nevridge with Claude Code during review of #413

主要言語
C#
スター
1
フォーク
0
平均マージ
2時間 2分
マージ済み PR(30日)
98

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nevridge/TaskFlow のほかの issue

nevridge/TaskFlow の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。