fix(cli): always link events to a task in start/close#5
Merged
Conversation
Previously, running `ingest start` without --task left all subsequent events with task_id=NULL, making them invisible in `ingest resume`. Similarly, `ingest close` without --task only created an event without actually closing any task. - start: always create/find a task; title defaults to --summary or a timestamp-based "Session YYYY-MM-DD HH:MM" if both are omitted - close: when --task is omitted, close the most recently active task (same selection logic as `ingest resume`) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When only one active task exists, close it automatically as before. When multiple active tasks are running in parallel, print the full list and highlight the most recently started task as the suggested default, then exit with an error so the user must pass --task <id> explicitly. Adds getLastStartedActiveTask() to taskService to find the task whose most recent task_started event is the latest. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Falls back to title lookup when the given value does not match any task ID, so both of these work: ingest close --task <id> ingest close --task "タスク名" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
問題
ingest startを--taskなしで実行すると、後続のnote/decision等のイベントがtask_id = NULLのまま記録され、ingest resumeに一切表示されなかった。ingest closeを--taskなしで実行するとtask_closedイベントを作るだけで、タスクのステータスがactiveのまま残り続けていた。修正
ingest start--taskが省略された場合、--summaryの値をタイトルとしてタスクを自動生成--summaryも省略された場合はSession YYYY-MM-DD HH:MM形式で生成task_idが付いた状態でイベントが記録されるingest closetask_startedイベントが記録されたタスクを*でマークしてデフォルト候補として提示。--task <id>の明示指定を要求してエラー終了Test plan
ingest start --summary "壁打ち"でタスクが自動作成され、後続のnoteがresumeに表示されることを確認ingest start(引数なし)でSession YYYY-MM-DD HH:MM形式のタスクが作成されることを確認ingest closeでそのままクローズされることを確認ingest closeが候補リスト付きエラーを出すことを確認🤖 Generated with Claude Code