Skip to content

Test agent isolation and every queue of the desk tools, and tell agents they see their own sets - #2648

Merged
pournasserian merged 4 commits into
v2from
2625-desk-tools-tests
Oct 19, 2026
Merged

pournasserian merged 4 commits into
v2from
2625-desk-tools-tests

Conversation

@pournasserian

Copy link
Copy Markdown
Member

Closes #2625

What

Follow-ups from the independent review of #2594 (F-DSK, #2422). No scoping leak was found; these close the test gaps and tighten what agents are told.

  • Tool descriptions. get_desk_counts, list_desk_queue and get_change_set_review say an agent sees only the change sets it opened, so a count of 0 doesn't read as an empty desk.
  • get_change_set_review reads the set and its moves again when the last move disagrees with the set's state, up to three times. A decision that commits between the two reads no longer gives an answer that disagrees with itself.
  • ChangeSetMoves.StateAfter names the state each move leaves a set in. The review tool uses it, and a test ties it to the directory.
  • ConnectedAgent.AnotherAgentAsync connects a second agent to the same host for tests.

Why

  • Read again rather than derive the state from the moves. The rejection reason lives on the set, not in the move event, so only a fresh read of both gives a consistent answer.

Tests

On SQLite and PostgreSQL:

  • Another agent's sets are not counted, listed or readable over MCP, while that agent sees its own. This exercises the credential-id half of the OpenedBy filter.

  • Every queue through list_desk_queue:

    • recently_published lists newest first and leaves out a set published eight days earlier.
    • reverted lists the reverted set.
    • stale_facts pages two and then one of three, with the total on both pages.
    • The counts match.
  • No tool call appends an event, get_change_set_review included.

  • Every move the directory makes appends exactly one known move, and StateAfter names the state the move left. The set goes through:

    • open, submit, checks failed, reopen, submit and awaiting review;
    • approve and publish;
    • a published revert, which reverts the original;
    • a rejection.

    All nine move names are seen.

dotnet build -warnaserror, the unit and bUnit suite and the desk, desk tools and queue tests on SQLite and PostgreSQL pass locally. No new package and no new project reference.

Checklist

  • Linked to an issue a maintainer has confirmed
  • Targets v2
  • Tests or docs updated where behaviour changed
  • No tool-generated co-author trailers or footers

@pournasserian pournasserian added this to the M1 Governance core milestone Oct 19, 2026
@pournasserian pournasserian added type:feature New capability v2 FluentCMS v2 (v2 branch) area:desk Review desk (DSK) labels Oct 19, 2026
@pournasserian
pournasserian merged commit bdc1764 into v2 Oct 19, 2026
2 checks passed
@pournasserian
pournasserian deleted the 2625-desk-tools-tests branch October 19, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:desk Review desk (DSK) type:feature New capability v2 FluentCMS v2 (v2 branch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test agent isolation and every queue of the desk tools, and tell agents they see their own sets

1 participant