Repository navigation
fix(messages): the owner stands in for an unseated primary (ent#904) - #3754
Conversation
With the assignments module entitled, an agent with no rows answers "nobody fills primary", which overrides the owner fallback. That is the default state of a fresh enterprise install, and send_message(to: primary) then refused with 422 role_unassigned: the agent had no sanctioned way to message a person. The tool text sent it to an alert, which lands in the Operating Room and reaches no person. On the message surface only, primary with no seat now goes to the agent's owner, who is always allowed proactive messages. The resolver is unchanged on purpose: it also decides who may approve a gated skill, so asks still go to the operators and a primary-approved gate still refuses. An owner with no email gets a 422 naming the remedy (assign a primary in the agent's Access tab). The send_message description says so instead of pointing at an alert. Fixes Abilityai/trinity-enterprise#904 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Tested against a local instance (rc4 backend
The addressing rows were checked inside the running backend container against the instance's database, with the assignments provider registered exactly as app startup does. Not covered: delivery itself. After the fix the HTTP call returns 404 |
/review + /validate-prVerdict: APPROVE on head /review (structural)Scope: clean. On the message route only, the owner stands in for a Execution coverage
Informational
Low confidence
/validate-prLane B (no schema), 6 files (+106/−9), 1 commit, head
Release: this P1 correction is not in rc4. If it lands for 1.0, it goes into the next RC, and the open manual item is that RC's re-test: a |
webmixgamer
left a comment
There was a problem hiding this comment.
Approving 60d784c06: no critical findings. The /review + /validate-pr report is in the comment above. The five informational items can be follow-ups. After the merge, set status-in-dev on abilityai/trinity-enterprise#904 by hand, because the reference is cross-tracker.
Summary
people_for → []), which overrides the owner fallback. That's the default state of a fresh enterprise install.send_message(to: "primary")then returned 422role_unassigned, so the agent had no sanctioned way to message a person. Only the deprecatedrecipient_emaildelivered.primarywith no seat now goes to the agent's owner. The owner is always allowed proactive messages (proactive_message_service), so it delivers.role_addressing.resolvealso decides who may approve a gated skill (skill_gate_service._approvers, whereprimaryis the default approver). An owner fallback there would silently make the owner every unseated agent's approver, and an owner requesting a skill would approve themselves. So asks still go to the operators (the ent#606 rule), and a gate approved byprimarystill fails closed. Both are pinned by tests.send_messagetool text no longer tells the agent to "raise an ask of type alert" to reach someone. That advice lands in the Operating Room, not with a person.Changes
src/backend/routers/messages.py: the owner stand-in in_recipient, forprimaryonly.src/mcp-server/src/tools/messages.ts: thesend_messagedescription.tests/unit/test_ent904_primary_unseated.py(new): coversprimarystill refuses;primaryonly;tests/unit/test_ent606_role_addressing.py: the "message to an unseated primary is refused" test becomes "goes to the owner".requirements/security.md(the Messages bullet) andfeature-flows/proactive-messaging.md.Not in this PR (from the issue's suggestions)
Test Plan
TestPaidA2Aintest_ent751_gate_callers.py, which also fail on unchangeddev(f5fc04fb0).send_message(to="primary")reaches the owner; a gated skill approved byprimarystill refuses.Fixes abilityai/trinity-enterprise#904 (cross-repo, so it won't auto-close; close it at release)
🤖 Generated with Claude Code