Files
pad/internal
xarmian 40066cca8a fix(server): a role's item_count on the roles board counts only items the caller may see (BUG-3257) (#1625)
Each lane of GET /roles/board embeds its role, and store.ListAgentRoles fills
that role's item_count from every item in the workspace. The lane's items were
filtered to the caller; the count was not, so a guest and a collection-
restricted member read how many hidden items sat under each role. GET
/agent-roles already recomputed the count from the visible set; both doors now
share that rule (visibleRoleItemCounts), and the list door stops swallowing a
ListItems error as zero counts.

Every role is still listed to every reader on both doors, as ruled on the
trail: roles are workspace metadata, and only the count describes items.

The permission walk gains a roles-board leg per account: the lane's count is
the items that account can see. Both it and the server test go red with the
board recompute removed.

Claude-Session: https://claude.ai/code/session_016PXRzXhokr61CLbbu3Txj9
2026-09-27 18:51:51 -04:00
..
2026-03-26 01:52:36 +00:00