Skip to content

feat: each compact task item carries the date and author of its latest comment, and comments_count counts the replies EXO-91997 - #685

Draft
bmestrallet wants to merge 4 commits into
feat/EXO-91948-compact-task-tool-responsesfrom
feat/EXO-91997-last-comment-date
Draft

bmestrallet wants to merge 4 commits into
feat/EXO-91948-compact-task-tool-responsesfrom
feat/EXO-91997-last-comment-date

Conversation

@bmestrallet

Copy link
Copy Markdown
Contributor

Why

The sales pipeline skills flag a deal as stale when its card has no comment for 30 days. The compact task lists did not carry the date of a task's last comment, so an assistant read the comments of every open card, one call each (EXO-91997).

How

  • list_tasks, list_assigned_tasks and list_unscheduled_tasks: each compact item carries last_comment_date and last_comment_author (username, display_name) of its latest comment, a reply or not; both are absent for a task without comments.
  • comments_count counts the replies, in the compact items and in get_task_by_id. The change log of a full task (include_change_log, list_project_activity_since) has one commented entry per comment and per reply.
  • CommentService#getCommentsSummaries(Collection<Long>) (through CommentStorage and CommentHandler) reads a page's comments in two statements, whatever the number of tasks: a GROUP BY task for the count and the latest time, then one lookup of the comments at those times for the author, the highest id on a tie. It replaces the per-task count of the compact items. No subquery per comment row, no schema change.
  • The three tool descriptions name the new fields.
  • About 146 more characters on a commented item (date 48, author 98), none on an uncommented one.
  • Tests: TestCommentDAO#testGetCommentsSummaries runs both statements on HSQLDB (replies counted, a reply as the latest, a tie, a same-time comment of another task, absent tasks); TaskMcpToolTest pins one summaries call and no per-task count for a page of 100 tasks, the latest comment's date and author, and the change log's replies. Each pin was mutation-verified. The query plans were not measured on a real database.

Knowledge: Meeds-io/eng-standards#672, Meeds-io/eng-standards#670

This change is classified N2 at 7ab377738 (a DAO query on a list path, changed definitions of three existing MCP tools; no schema, entity, ACL or new tool) — its approver must be an Archi/Dev who knows it is N2, not an approval on AI review alone.

🤖 Generated with Claude Code

bmestrallet and others added 4 commits October 22, 2026 21:45
…plies included EXO-91997

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t comment, and count the replies EXO-91997

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… as its comments count does EXO-91997

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…with no subquery per comment row EXO-91997

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@bmestrallet

Copy link
Copy Markdown
Contributor Author

Self-review close-out — head 7ab377738

# Source Finding Status
1 delivery checks §1 get_task_by_id's count with replies, its change log built from top-level comments only ✅ fixed 4fb1bf913, pinned by theChangeLogOfAFullTaskHoldsTheReplies
2 reviewer 🟡 a max() subquery correlated per comment row on TASK_COMMENTS (no TASK_ID index on PostgreSQL) ✅ fixed 7ab377738: a grouped query and an author lookup, no subquery
3 reviewer 🟡 the last_comment_date pin ran under the constant date-format stub ✅ fixed 7ab377738: each date formatted as its instant; creation-date and due-date swaps fail it
4 reviewer 🟢 an unclear TaskListItemModel Javadoc sentence ✅ fixed 7ab377738

The closing round, by a reviewer that had not seen the fixes, returned nothing to fix.

Verified conform: one summaries call per page for the three compact-item tools and no per-task count (pinned on 100 tasks); replies counted and a reply as the latest comment (HSQLDB); the tie and the same-time comment of another task kept apart; both fields absent without comments (NON_EMPTY); layering DAO → storage → service → tool; additive interface methods, no other implementor; /** */ on every new method.

Tests: mvn -o verify -pl services -Pcoverage → Tests run: 378, Failures: 0, Errors: 0, all coverage checks met, at 7ab377738. Mutation-verified pins: tie-break inverted, same-time check removed, count without replies, per-task count restored, latest comment dropped, latest date swapped for the creation or due date, full count top-level only, replies dropped from the change log. Query plans not measured on a real database.

Classification: N2 at 7ab377738 — a DAO query on a list path, changed definitions of three existing MCP tools; no schema, entity, ACL or new tool. Its approver must be an Archi/Dev who knows it is N2, not an approval on AI review alone.

@bmestrallet

Copy link
Copy Markdown
Contributor Author

Local rig, through the MCP — task-management-services.jar built at 7ab377738 on the feature/ai-contribution rig (HSQLDB), task 208 with one comment and one reply:

  • list_assigned_tasks / list_tasks: comments_count: 2, last_comment_date = the reply's (23:39:11.271), last_comment_author {root, Root Root}; the uncommented tasks carry neither field.
  • get_task_by_id: comments_count: 2.
  • list_tasks include_change_log: two commented entries, the comment and the reply.
  • list_tasks limit 100: 100 items, no task, comment, MCP or SQL error in platform.log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant