Repository navigation
fix(rooms): every principal's access is re-checked at wake time (trinity-enterprise#860) - #3843
Conversation
…ity-enterprise#860) The wake-time access re-check in shared_sessions._after_landing ran for Workspace principals only, on the reasoning that a platform member's access was resolved when the room was created. Access can change after that, so a room now asks every principal the question room creation asks (_assert_can_reach_agent, as the predicate _can_still_reach) before each wake: the portal roster for a Workspace principal, the platform ACL for everyone else. An agent that fails it is not woken and the room gets the existing "could not be reached" line. An agent's reply carries the person whose turn started the chain, so a cascade is held to that person's access. Mutation: reverting the service turns the 3 platform and agent-chain tests red; the Workspace tests pass either way, as that path was already checked. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…check (trinity-enterprise#860) — mechanical The source pin asserted `agent_on_roster` appears in `_after_landing`. #860 replaced that inline portal-only check with `_can_still_reach` -> `_assert_can_reach_agent`, which still reads the roster. Pin the new chain link by link instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
merge-train (2026-10-20): I pushed one commit to this branch, What it fixes. CI's Decision taken at the merge gate. A wake started by an agent posting directly (MCP |
# Conflicts: # tests/registry.json
Summary
A room re-checks the sender's access to an agent at wake time, so that a change in access stops future wakes even inside a room the sender already belongs to. That re-check ran for Workspace principals only. It now runs for every principal, using the same rule room creation applies:
_assert_can_reach_agent, as the new predicate_can_still_reach;An agent that fails the check is not woken, and the room gets the existing "could not be reached" line. The transcript is unchanged.
An agent's reply carries the person whose turn started the chain, so a cascade of agent-to-agent mentions is held to that person's access too.
Changes
src/backend/shared_sessions/service.py:_can_still_reach, and the wake-time check in_after_landingapplied to every principal.tests/unit/test_ent860_room_wake_access.py(new, 6 tests), plus itstests/registry.jsonentry.Test Plan
cd tests && pytest unit/test_ent860_room_wake_access.py: 6 pass, through the real_after_landingwith only the wake, the wake cap and the system-line writer stubbed.Fixes abilityai/trinity-enterprise#860
🤖 Generated with Claude Code