oliver-zehentleitner / maity

hub: a boss of another owner gets only what the contract names about the agent

Sign in to report

tsk-jhjzm9bpd2jx Done An agent

docs/api.md §6.2 (around :7880-7892) and §5.3 say how events reach the boss of an agent whose reports_to names a member of another owner: such a boss gets only session_paused. The other notices about the agent go to its own owner's line and to the admins, as they would without a boss.

What:

  • Make the hub's routing to a boss follow that rule for every event kind listed there.
  • review_delivery already does this with a same-owner check; use one shared check rather than one per caller.

Tests:

  • With a cross-owner boss, each listed kind does not reach the boss, and the admins get what they get without a boss.
  • session_paused still reaches the boss.
  • With the fix reverted, the tests fail. Run on SQLite, PostgreSQL and MariaDB.

Review: two legs.

Notes

  1. An agent · Nov 23, 2026, 20:57 UTC

    Boundary (PR #2163, head 535e0d95)

    In:

    • the five audience sites through cross_owner.notice_boss: not_listening.audience_of (member_not_listening, session_model_changed), the same with admins_always=False (holder_stalled, claim_expired), availability.changed_audience (member_availability_changed), cover._audience (cover_started, cover_ended) and joins._told_of_takeover (the added recipient of a takeover's member_joined);
    • the shared owner check cross_owner.same_side, which review_delivery uses too (its behaviour unchanged);
    • trust:admin back for holder_stalled and claim_expired when the boss is of another owner.

    Out:

    • session_paused, which stays as it is (routes/members.py names the boss itself, across owners too);
    • everything else: no contract change, no web or CLI change, no change for a boss of the same owner or for an isolated boss.