Skip to content

fix: list_tasks names the boards the user manages beside the boards holding tasks, and counts each board's overdue tasks EXO-94360 - #743

Open
bmestrallet wants to merge 9 commits into
feature/rtdfrom
feat/EXO-94360-managed-board-count
Open

bmestrallet wants to merge 9 commits into
feature/rtdfrom
feat/EXO-94360-managed-board-count

Conversation

@bmestrallet

@bmestrallet bmestrallet commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Why. In evaluation runs, the Tasks assistant was asked for « the status of every project I manage ». It answered « you manage 86 projects » when the user manages 105. The grouped list_tasks summary read « 1630 open tasks in 86 of 86 boards the user manages », but the 86 were the managed boards that hold open tasks: a board with no task never appears in a count made from its tasks. The same answer needed a second overdue_only call for the overdue figures. Its board rows have the same shape as the first call's, and the assistant read one call's status split as the other's. A later run showed two more causes:

  • the tool's answers write each object's keys in alphabetical order (Jackson 3's default), so a board's by_status entries, each with its own count, came before the board's count, and the assistant read a status's count as the board's;
  • with a longer, field-heavy list_tasks description, the assistant called the tool less often.

How.

  • With managed_only and no project_id, a grouped list_tasks answer gives managed_project_count: every board the user manages, boards with no task included. It uses the query and the distinct count list_projects managed_only gives with no space. With a project_id, the counts cover that one board, so no total is given.
  • The summary then reads « 1630 open tasks in 86 of the 105 boards the user manages; 19 have no open task ». The boards with no open task are named only when the call selects open tasks only. The other groupings say « … on the 105 boards the user manages ».
  • Each board of the project grouping gains overdue_count, using the overdue_only rule: open tasks due before today in the user's time zone, within project_id and managed_only, without the call's other filters. One grouped call now gives each board's selected, open and overdue tasks and their split by status.
  • On the boards the user manages (grouping by board, managed_only, no project_id), the answer also gives three totals:
    • idle_project_count: the managed boards holding no open task;
    • overdue_count: the overdue tasks of every managed board, from the query each board's overdue_count reads, the boards left out of projects included;
    • overdue_project_count: the boards that hold them.
      The summary then ends with « ; 264 overdue in 30 boards », unless another filter narrows the count or the call selects overdue tasks only.
  • Each answer states its counts before its lists: a board row reads project_id, project_name, count, open_count, overdue_count, by_status, a status reads status_id, status, count, and a grouped answer gives its totals before projects and tasks. @JsonPropertyOrder on the three models makes this hold whatever their constructors.
  • The list_tasks description is shorter than before this PR, 1,432 characters against 3,006. It says what the tool does and to count by board, assignee, status, label or due period in one grouped call. The grouped answer's fields are described in the group_by_project, group_by and managed_only parameters. The earlier definition joins ai-tool-definition-upgrades.json and is pinned in the upgrades test.

Part of EXO-94360 (B0.5): the Tasks agent text that reads these fields follows in a Meeds-io/ai change.

Knowledge: pending — EXO-94360
Classification: N1: it changes which boards a read-only MCP tool counts and names as the user's managed boards (reusing the list_projects managed selection), adds a count to an access-scoped task query on a list endpoint, and changes an MCP tool definition (no require_approval change); no REST, schema or write path. Its approver must be an Architect who knows it is N1.

🤖 Generated with Claude Code

bmestrallet and others added 6 commits November 16, 2026 11:36
…olding tasks, and counts each board's overdue tasks EXO-94360

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t, whose counts reach that board alone EXO-94360

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…her filters, and names the managed boards with no open task beside open tasks only EXO-94360

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erdue count ignores EXO-94360

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he user manages holds open tasks EXO-94360

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

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

Copy link
Copy Markdown
Contributor Author

Self-review close-out — 4ac6fba

Delivery checks, two reviewer rounds, then a closing round with a fresh reviewer. Every finding was fixed and verified in the source. The mutation run found one test gap, which is now fixed and confirmed.

# Round Sev Finding Status
1 delivery checks 🟠 With project_id, the managed total stayed global while the open-board count covered that board only (« 104 have no open task ») fixed: no total with a project
2 1 🟡 The definition sent a filtered overdue-per-board question to overdue_count, which ignores the other filters fixed: stated, and overdue_only named for filtered questions
3 1 🟡 No test of the managed total on the assignee, status, label and due-period groupings fixed
4 1 🟢 « N have no open task » appended to a count of completed tasks fixed: open-only selections only
5 2 🟢 changed_since missing from the filters overdue_count ignores fixed
6 2 🟢 Javadoc wrap fixed
7 closing 🟢 Javadoc wrap, and a test Javadoc overstating the overdue count fixed
8 mutation run 🟡 « 0 have no open task » would go unnoticed fixed: pinned

Verified conform.

  • managed_project_count is ProjectService#countProjects(ProjectQuery) over list_projects' managed query, a distinct count. The plain count by memberships, which counts a board once per matching manager, is never called. TestProjectDAO pins the distinct count with a board that two manager memberships match.
  • overdue_count clones the open tasks' query, keeping the user's accessibility, the managed narrowing and the project, and adds the overdue_only rule.
  • The open boards are a subset of the managed boards (same manager predicate over the same memberships), so the « no open task » figure is never negative.
  • The earlier list_tasks digest is in ai-tool-definition-upgrades.json (25 earlier definitions); the new one is not.
  • Targeted at 4ac6fba: TaskMcpToolTest 150/0, TaskToolDefinitionUpgradesTest 2/0, TestProjectDAO 7/0.
  • Mutation-verified, 19/19 killed:
    • the managed count dropped, read through the participants or the plain count, taken from the open boards, given with a project, or set on the project grouping only;
    • the « no open task » clause written at 0, beside completed tasks, dropped or always plural;
    • the singulars lost;
    • the other groupings' count dropped;
    • the overdue count read from the open query, not made overdue, cloned from the listing, read from open_count, or null instead of 0;
    • the upgrades digest removed.
  • Full suite -pl services -am verify -Prun-its -Pcoverage at 4ac6fba: UT 506/0, IT 13/0; « All coverage checks have been met ».

Classification (computed on 6cdd000f6..4ac6fba80): N1. It changes which boards a read-only MCP tool counts and names as the user's managed boards, adds a count to an access-scoped task query, and changes an MCP tool definition (no require_approval change). Its approver must be an Architect who knows it is N1.

bmestrallet and others added 3 commits November 16, 2026 15:49
… and the totals before the lists, and totals the managed boards' idle boards and overdue tasks EXO-94360

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a count no other filter narrows, and writes each status before its count EXO-94360

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t in one call, the grouped answer's fields in their parameters EXO-94360

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

Copy link
Copy Markdown
Contributor Author

Self-review close-out — follow-up 4ac6fba..6f78a56

The follow-up has three commits on top of the reviewed 4ac6fba:

  • 92d730f: the JSON key order, and the totals of the boards the user manages.
  • a74e628: the review fixes.
  • 6f78a56: a shorter list_tasks description.

Why. A later evaluation found two problems, which these commits fix:

  • The tool's answers write each object's keys in alphabetical order (Jackson 3's default, MapperFeature.SORT_PROPERTIES_ALPHABETICALLY). A board's by_status entries, each with its own count, came before the board's count, and the model read a status's count as the board's.
  • After the field-heavy list_tasks description grew, the model called the tool less often.
# Round Sev Finding Status
1 review 🟡 « ; 264 overdue in 30 boards » was appended beside a count that other filters narrow (priority, no due date…), and the overdue total ignores those filters fixed: only beside a count no other filter narrows
2 review 🟢 A by_status item wrote its count before its status fixed: explicit order
3 review 🟢 Unclear wording in the definition (« those past projects included ») fixed
4 mutation run — status-order-dropped survived equivalent (see below)

Verified conform.

  • A board row is written project_id, project_name, count, open_count, overdue_count, by_status. A grouped answer writes its totals before the lists they sum up. Both are checked through a plain Jackson 3 mapper, which applies the same sorting default as the one serializing the tool results.
  • With managed_only and no project_id, a grouping by board adds three fields:
    • idle_project_count is managed_project_count less open_project_count.
    • overdue_count is the sum of the overdue query each board's overdue_count reads, over every board, those left out of projects included.
    • overdue_project_count is the number of boards that hold overdue tasks.
    • A 101-board test pins the cap case.
  • The summary ends with « ; 264 overdue in 30 boards » (« none overdue » at 0). The clause is left out beside a narrowed count and on an overdue_only call.
  • The list_tasks description is 1,432 characters, against 3,006 before fix: list_tasks names the boards the user manages beside the boards holding tasks, and counts each board's overdue tasks EXO-94360 #743 and 3,676 at 4ac6fba. It keeps what the tool does and one sentence on counting in one call. The grouped fields are described in the group_by_project, group_by and managed_only parameters.
  • No new upgrade digest is needed: 4ac6fba's definition, the last one pushed, is already listed. The two commits in between were never pushed.
  • Targeted at 6f78a56: 170/0, from these four classes:
    • TaskMcpToolTest 153
    • TaskToolDefinitionSpaceScopeTest 8
    • TaskToolDefinitionUpgradesTest 2
    • TestProjectDAO 7
  • Mutation-verified: 15 killed, with one equivalent mutant, status-order-dropped.
    • At 92d730f, 11 of 11 were killed: either key order dropped; the overdue total taken from the listed boards; the overdue boards taken from the open ones; the idle boards taken from the selected ones; the totals always set; the overdue clause dropped, written on an overdue call or always plural; « none overdue » dropped; the upgrades digest removed.
    • At 6f78a56, 4 of 5 were killed: the clause beside a narrowed count, without_due_date not counted as narrowing, the clause on an overdue call, the digest.
    • status-order-dropped is equivalent in this build. StatusTaskCountModel has a single multi-argument constructor, and the module compiles with -parameters, so Jackson 3 takes that constructor as the implicit creator. It then writes the creator's properties first, in parameter order (MapperFeature.SORT_CREATOR_PROPERTIES_FIRST), which is already status_id, status, count. The annotation stays so that the order does not depend on the class's constructors.
  • Full suite -pl services -am verify -Prun-its -Pcoverage at 6f78a56: UT 509/0, IT 13/0; « All coverage checks have been met ».

Classification (computed on 6cdd000f6..6f78a562a, the whole PR): N1, unchanged. These follow-up commits alone read N2: a changed definition and output fields of an existing read-only MCP tool. Its approver must be an Architect who knows it is N1.

@sonarqubecloud

Copy link
Copy Markdown

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