Skip to content

fix: list_project_activity_since lists at most 20 tasks, with has_more EXO-94377 - #738

Merged
bmestrallet merged 1 commit into
feature/rtdfrom
fix/EXO-94377-project-activity-cap
Nov 16, 2026
Merged

bmestrallet merged 1 commit into
feature/rtdfrom
fix/EXO-94377-project-activity-cap

Conversation

@bmestrallet

Copy link
Copy Markdown
Contributor

Symptom. list_project_activity_since returned every task of a project updated in the period, each with its whole change log and comments of the period, then every other uncompleted task. Its size had no bound: it grew with the project's tasks and their changes, and nothing told the assistant how to read a large project in parts.

Cause. The method read all the project's tasks and mapped each one, change logs and comment counts included, with no cap and no paging signal in its model.

Fix.

  • At most 20 tasks in all: first the tasks updated in the period, most recently active first; then, in the room left, the other uncompleted tasks.
  • The updated tasks are read page by page, in the last-activity order the DAO already sorts by, and the read stops at the first page they no longer fill, or once one more than the cap is found.
  • The uncompleted tasks are read through the uncompleted-only query, page by page, up to the room left plus one.
  • Change logs and comments are loaded only for the tasks returned.
  • The model gains has_more (more such tasks exist than shown) and uncompleted_count (the project's uncompleted tasks).
  • The tool description says the cap, what has_more means, and how to list every uncompleted task: page list_tasks with project_id and hide_completed_tasks true. The earlier definition's digest is added to ai-tool-definition-upgrades.json, so platforms that imported it are upgraded, and the upgrades test pins it.
  • Tests pin the cap, the fill with older uncompleted tasks, has_more on each side of the cap, the count, the empty project and the two reads being distinct.

Stacked on #737 (EXO-94298), which sets the period's start in the user's zone.

Knowledge: pending — EXO-94377
Classification: N2: a changed definition of an existing read-only MCP tool (description and output fields; no require_approval or annotations change), with no REST, DAO, schema or ACL change. Its approver must be an Architect or Developer who knows it is N2.

🤖 Generated with Claude Code

@bmestrallet

Copy link
Copy Markdown
Contributor Author

Self-review close-out — dc904c7

Delivery checks before each round; reviewer round 1, then a closing round with a fresh reviewer, whose one 🟢 was fixed and confirmed clean by the same reviewer.

# Round Sev Finding Status
1 delivery checks 🟡 The description sent the assistant to list_tasks without hide_completed_tasks, which returns completed tasks too fixed
2 delivery checks 🟡 The test fixture could not tell the all-tasks read from the uncompleted-only read fixed: completed tasks added to the all-tasks list only
3 1 🟢 The early stop of the first read was not verified fixed: read count verified
4 1 🟢 A constant was not private fixed
5 1 🟢 Line wrap fixed
6 closing 🟢 A test's Javadoc claimed a mutant it did not kill fixed: ids asserted

Verified conform.

  • At most 20 tasks: the updated ones first, in lastTaskActivity order (TaskDAOImpl, computed from the same comment, change-log and creation times getLastUpdateDate reads), then the older uncompleted ones in the room left.
  • has_more is set only when a task beyond the cap exists; uncompleted_count comes from the uncompleted-only count.
  • Change logs and comments are loaded for the returned tasks only.
  • The earlier definition's digest is in ai-tool-definition-upgrades.json; the intermediate description of the review never reached the branch history.
  • Targeted at dc904c7 (rebased on feature/rtd 50911c4): TaskMcpToolTest 138/0, TaskToolDefinitionUpgradesTest 2/0.
  • Mutation-verified at 7d3588aeb, whose production diff the rebase left unchanged (only the upgrades test's maps were merged with feat: list_projects managed_only filter EXO-94373 #735/feat: list_assigned_tasks tells each task's relation and splits its count EXO-94361 #736), 8/8 killed: cap 21; mapping before the cap; older tasks past the room; the second read on all tasks; has_more at exactly 20; uncompleted_count from all tasks; the upgrades digest removed; the first read's early stop dropped.
  • Full suite -pl services -am verify -Prun-its -Pcoverage: UT 491/0, IT 13/0; « All coverage checks have been met ».

Classification (computed on origin/feature/rtd...dc904c726, this PR's own commit on top of #737): N2. A changed definition of an existing read-only MCP tool, no require_approval or annotations change; no REST, DAO, schema or ACL touched. Its approver must be an Architect or Developer who knows it is N2.

@bmestrallet
bmestrallet force-pushed the fix/EXO-94377-project-activity-cap branch from dc904c7 to 3b7cc4b Compare November 15, 2026 11:51
@bmestrallet

Copy link
Copy Markdown
Contributor Author

Rebased onto #737's new head e76f3c1, itself rebased onto feature/rtd c3086f6 after that branch was rewritten (see #737). No conflict; the commit is identical by git range-diff: dc904c7 → 3b7cc4b.

@bmestrallet

Copy link
Copy Markdown
Contributor Author

Rebased onto feature/rtd 111fb84, which now carries #737 (rebase-merged, its commits with new SHAs). No conflict, and the commit is identical by git range-diff: 3b7cc4b → 22683ae. The tree at 22683ae is byte-identical to the one at 3b7cc4b, so the earlier local runs (full suite, mutants) still apply.

…EXO-94377

The tool paged through every task of the project and returned each one
with its change log and comments of the period, so one answer for a large
project reached about a megabyte. It now returns at most 20 tasks in all:
the ones updated in the period, the most recently active first, then as
many older uncompleted ones as there is room for. has_more says that the
project holds more such tasks; uncompleted_count gives its uncompleted
tasks. Only the tasks returned are read in full. The period still starts
at midnight of the user's day, in the user's zone.

The description changes, so the upgrades file lists the tool's one
earlier definition, the only one any ref ever shipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bmestrallet
bmestrallet force-pushed the fix/EXO-94377-project-activity-cap branch from 22683ae to 0ed52b2 Compare November 16, 2026 06:27
@sonarqubecloud

Copy link
Copy Markdown

@bmestrallet
bmestrallet merged commit 0ed52b2 into feature/rtd Nov 16, 2026
5 checks passed
@bmestrallet
bmestrallet deleted the fix/EXO-94377-project-activity-cap branch November 16, 2026 10:24
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