Context: Follow up to the Phase 3 Mailbox A2A integration (#10146, #10147). The core primitives were shipped in PR #10167, but test coverage for the expanded API surface and the role-based addressing mode were deferred to unblock Phase 4.
The Problem: Missing test coverage for pagination, outbox mode, advanced filtering, and edge creation leaves the new API surface vulnerable to regressions. Missing role-based addressing leaves the AC of #10147 incomplete.
The Architectural Reality: MailboxService.mjs handles the logic. Needs tests covering listMessages filters and addMessage full schema. Role-based addressing needs routing logic in MailboxService supporting role:<name> and human:<login>.
The Fix:
- Add comprehensive tests to
MailboxService.spec.mjs for all new features.
- Implement role-based addressing parsing and permission evaluation.
Acceptance Criteria:
- Outbox mode is tested.
- Pagination (limit/offset) boundary behavior is tested.
- Thread and sender filtering (
threadId, from) are tested.
- 6 new edge types are verified to be created and queryable.
- Reachable Counterparty exception is tested.
listPermissions access-denied path is tested.
role:next-session, role:librarian, human:<login> addressing modes are implemented and tested.
Out of Scope: TAGGED_CONCEPT Gemma4 auto-emit (handled in separate ticket).
Origin Session ID: ada4aecb-60fc-4b25-a76b-cb92600835a2
Context: Follow up to the Phase 3 Mailbox A2A integration (#10146, #10147). The core primitives were shipped in PR #10167, but test coverage for the expanded API surface and the role-based addressing mode were deferred to unblock Phase 4.
The Problem: Missing test coverage for pagination, outbox mode, advanced filtering, and edge creation leaves the new API surface vulnerable to regressions. Missing role-based addressing leaves the AC of #10147 incomplete.
The Architectural Reality:
MailboxService.mjshandles the logic. Needs tests coveringlistMessagesfilters andaddMessagefull schema. Role-based addressing needs routing logic inMailboxServicesupportingrole:<name>andhuman:<login>.The Fix:
MailboxService.spec.mjsfor all new features.Acceptance Criteria:
threadId,from) are tested.listPermissionsaccess-denied path is tested.role:next-session,role:librarian,human:<login>addressing modes are implemented and tested.Out of Scope: TAGGED_CONCEPT Gemma4 auto-emit (handled in separate ticket).
Origin Session ID: ada4aecb-60fc-4b25-a76b-cb92600835a2