Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

test(e2e): stop expecting an admin-owned outsider to be refused an invite

Petr Bauchfa093f0b1eef
diff --git a/console/tooling-e2e/README.md b/console/tooling-e2e/README.md
index 7759fc615..701d69d60 100644
--- a/console/tooling-e2e/README.md
+++ b/console/tooling-e2e/README.md
@@ -140,7 +140,7 @@ passed or not. A teardown that leaves something behind fails the scenario.
| `agent-identity` | Renaming an agent from the gateway and with `!rename-agent` renames its Mattermost bot in place, and mentions follow the new name; `!delete-agent`, confirmed, deletes it. | Mattermost |
| `room-group-paths` | The same subgroup name under two parents: a bare name both share is refused naming each path, the path picks one, and a second group of that name under one parent is refused whatever its case. | — |
| `attachment-names` | A file whose name is not latin-1 is posted, listed by `read_context` and downloaded under its own name (`filename*` in `Content-Disposition`). | — |
-| `client-mistakes` | An outsider inviting itself into a room or reading it gets a 403, and a history timestamp that is not ISO 8601 a 400 naming the parameter; never a 500. | — |
+| `client-mistakes` | An outsider reading a room gets a 403, and a history timestamp that is not ISO 8601 a 400 naming the parameter; never a 500. | — |
| `room-capture` | A room built from a document keeps the package it names, and the room captured back as a document builds a second room with the same package; both rooms delete. | — |
| `follow-ups` | Follow the conversation: an untagged message continuing an exchange the agent just answered, or replying in its thread, reaches it; one after another agent spoke, or after the window, does not; an agent's message follows no one. | Mattermost; ephemeral only, where the stack turns the flag on with a 20-second window |
diff --git a/console/tooling-e2e/src/fast/client-mistakes.ts b/console/tooling-e2e/src/fast/client-mistakes.ts
index e3ff8ce55..e203ca926 100644
--- a/console/tooling-e2e/src/fast/client-mistakes.ts
+++ b/console/tooling-e2e/src/fast/client-mistakes.ts
@@ -11,7 +11,6 @@ export const clientMistakes: FastScenario = {
header: {
id: 'client-mistakes',
covers: [
- 'invite_agent_to_room',
'get_room_detail',
'GET /agents/{agent_id}/rooms/{room_id}/history',
],
@@ -25,17 +24,6 @@ export const clientMistakes: FastScenario = {
const outsider = await fixtures.agent('out');
const room = await fixtures.internalRoom('room', [member]);
- const invite = await switchClient.agentAttempt(
- outsider,
- 'POST',
- `/agents/${outsider.id}/ops/invite_agent_to_room`,
- { room_id: room.id, agent_name: outsider.name }
- );
- expect(invite, 'an outsider inviting itself into a room').toEqual({
- status: 403,
- detail: "Not authorized to change this room's membership",
- });
-
const lookup = await switchClient.agentAttempt(
outsider,
'POST',
diff --git a/console/tooling-e2e/surface/exemptions.json b/console/tooling-e2e/surface/exemptions.json
index 3b005f184..02acad409 100644
--- a/console/tooling-e2e/surface/exemptions.json
+++ b/console/tooling-e2e/surface/exemptions.json
@@ -25,7 +25,8 @@
"POST /gateway/rooms/{room_id}/sync-name": "Needs a bridged room whose linked channel was renamed on the platform, which the fast lane's stacks cannot stage. Covered by core's test_room_sync_name.py against real Postgres.",
"PUT /gateway/chats/{room_id}/read": "Switch Console read positions. Covered by core's test_chats_groups.py against real Postgres; no scenario drives Console chats yet (every other /gateway/chats route is still in the backlog).",
"WS /gateway/changes/ws": "Console's change-notice socket. What it sends is covered by core's test_changes_socket.py, and the session probe checks it refuses a handshake without a session; no scenario drives Console's lists yet.",
- "get_template_status": "Needs an agent created from an official template on a managed machine and then a newer revision of that template; no stack the harness builds has managed agents yet (create_agent is in the backlog). Covered by core's test_template_updates.py."
+ "get_template_status": "Needs an agent created from an official template on a managed machine and then a newer revision of that template; no stack the harness builds has managed agents yet (create_agent is in the backlog). Covered by core's test_template_updates.py.",
+ "invite_agent_to_room": "Its interesting answer is the refusal, and an agent is refused only when its owner is neither an admin nor the room's owner. Every harness agent and room belongs to the harness admin, and a second, plain user to own the agent cannot be deleted afterwards, which rules it out on local, dev and staging. Who may change a room's roster is covered by core's test_room_roster_authz.py, and the 403 with its detail by test_refusal_status_codes.py."
},
"unauthenticated": {
"GET /gateway/agents/known-types": "The catalogue of agent types this server can register and their option schemas; no tenant data. Public since the initial import, and nothing records whether that is deliberate.",