




















@@ -57,6 +57,14 @@ export type MatrixQaScenarioId =
5757| "matrix-room-membership-loss"
5858| "matrix-homeserver-restart-resume"
5959| "matrix-mention-gating"
60+| "matrix-allowbots-default-block"
61+| "matrix-allowbots-true-unmentioned-open-room"
62+| "matrix-allowbots-mentions-mentioned-room"
63+| "matrix-allowbots-mentions-unmentioned-open-room-block"
64+| "matrix-allowbots-mentions-dm-unmentioned"
65+| "matrix-allowbots-room-override-blocks-account-true"
66+| "matrix-allowbots-room-override-enables-account-off"
67+| "matrix-allowbots-self-sender-ignored"
6068| "matrix-mxid-prefixed-command-block"
6169| "matrix-mention-metadata-spoof-block"
6270| "matrix-observer-allowlist-override"
@@ -117,6 +125,7 @@ export type MatrixQaProfile =
117125| "transport";
118126119127export const MATRIX_QA_BLOCK_ROOM_KEY = "block";
128+export const MATRIX_QA_BOT_DM_ROOM_KEY = "bot-dm";
120129export const MATRIX_QA_DRIVER_DM_ROOM_KEY = "driver-dm";
121130export const MATRIX_QA_DRIVER_DM_SHARED_ROOM_KEY = "driver-dm-shared";
122131export const MATRIX_QA_E2EE_ROOM_KEY = "e2ee";
@@ -137,6 +146,7 @@ const MATRIX_QA_E2EE_MEDIA_TIMEOUT_MS = 180_000;
137146function buildMatrixQaDmTopology(
138147rooms: Array<{
139148key: string;
149+members?: ["driver" | "observer", "sut"];
140150name: string;
141151}>,
142152): MatrixQaTopologySpec {
@@ -145,7 +155,7 @@ function buildMatrixQaDmTopology(
145155rooms: rooms.map((room) => ({
146156key: room.key,
147157kind: "dm" as const,
148-members: ["driver", "sut"],
158+members: room.members ?? ["driver", "sut"],
149159name: room.name,
150160})),
151161};
@@ -207,6 +217,14 @@ const MATRIX_QA_SHARED_DM_TOPOLOGY = buildMatrixQaDmTopology([
207217},
208218]);
209219220+const MATRIX_QA_BOT_DM_TOPOLOGY = buildMatrixQaDmTopology([
221+{
222+key: MATRIX_QA_BOT_DM_ROOM_KEY,
223+members: ["observer", "sut"],
224+name: "Matrix QA Observer/SUT Bot DM",
225+},
226+]);
227+210228const MATRIX_QA_SECONDARY_ROOM_TOPOLOGY = buildMatrixQaSingleGroupTopology({
211229key: MATRIX_QA_SECONDARY_ROOM_KEY,
212230name: "Matrix QA Secondary Room",
@@ -655,6 +673,110 @@ export const MATRIX_QA_SCENARIOS: MatrixQaScenarioDefinition[] = [
655673timeoutMs: 8_000,
656674title: "Matrix room message without mention does not trigger",
657675},
676+{
677+id: "matrix-allowbots-default-block",
678+timeoutMs: 8_000,
679+title: "Matrix allowBots default blocks configured bot senders",
680+configOverrides: {
681+configuredBotRoles: ["observer"],
682+groupAllowRoles: ["driver", "observer"],
683+},
684+},
685+{
686+id: "matrix-allowbots-true-unmentioned-open-room",
687+timeoutMs: 45_000,
688+title: "Matrix allowBots=true accepts unmentioned configured bot messages in open rooms",
689+configOverrides: {
690+allowBots: true,
691+configuredBotRoles: ["observer"],
692+groupAllowRoles: ["driver", "observer"],
693+groupsByKey: {
694+[MATRIX_QA_MAIN_ROOM_KEY]: {
695+requireMention: false,
696+},
697+},
698+},
699+},
700+{
701+id: "matrix-allowbots-mentions-mentioned-room",
702+timeoutMs: 45_000,
703+title: "Matrix allowBots=mentions accepts mentioned configured bot messages",
704+configOverrides: {
705+allowBots: "mentions",
706+configuredBotRoles: ["observer"],
707+groupAllowRoles: ["driver", "observer"],
708+},
709+},
710+{
711+id: "matrix-allowbots-mentions-unmentioned-open-room-block",
712+timeoutMs: 8_000,
713+title: "Matrix allowBots=mentions blocks unmentioned configured bot messages in open rooms",
714+configOverrides: {
715+allowBots: "mentions",
716+configuredBotRoles: ["observer"],
717+groupAllowRoles: ["driver", "observer"],
718+groupsByKey: {
719+[MATRIX_QA_MAIN_ROOM_KEY]: {
720+requireMention: false,
721+},
722+},
723+},
724+},
725+{
726+id: "matrix-allowbots-mentions-dm-unmentioned",
727+timeoutMs: 45_000,
728+title: "Matrix allowBots=mentions accepts unmentioned configured bot DMs",
729+topology: MATRIX_QA_BOT_DM_TOPOLOGY,
730+configOverrides: {
731+allowBots: "mentions",
732+configuredBotRoles: ["observer"],
733+},
734+},
735+{
736+id: "matrix-allowbots-room-override-blocks-account-true",
737+timeoutMs: 8_000,
738+title: "Matrix room allowBots=false overrides account allowBots=true",
739+configOverrides: {
740+allowBots: true,
741+configuredBotRoles: ["observer"],
742+groupAllowRoles: ["driver", "observer"],
743+groupsByKey: {
744+[MATRIX_QA_MAIN_ROOM_KEY]: {
745+allowBots: false,
746+requireMention: false,
747+},
748+},
749+},
750+},
751+{
752+id: "matrix-allowbots-room-override-enables-account-off",
753+timeoutMs: 45_000,
754+title: "Matrix room allowBots=mentions overrides account allowBots off",
755+configOverrides: {
756+configuredBotRoles: ["observer"],
757+groupAllowRoles: ["driver", "observer"],
758+groupsByKey: {
759+[MATRIX_QA_MAIN_ROOM_KEY]: {
760+allowBots: "mentions",
761+requireMention: true,
762+},
763+},
764+},
765+},
766+{
767+id: "matrix-allowbots-self-sender-ignored",
768+timeoutMs: 8_000,
769+title: "Matrix allowBots=true still ignores messages from the SUT user id",
770+configOverrides: {
771+allowBots: true,
772+groupAllowRoles: ["driver", "observer", "sut"],
773+groupsByKey: {
774+[MATRIX_QA_MAIN_ROOM_KEY]: {
775+requireMention: false,
776+},
777+},
778+},
779+},
658780{
659781id: "matrix-mxid-prefixed-command-block",
660782timeoutMs: 8_000,
@@ -1077,6 +1199,8 @@ const MATRIX_QA_FAST_PROFILE_SCENARIO_IDS = [
10771199"matrix-approval-exec-metadata-chunked",
10781200"matrix-restart-resume",
10791201"matrix-mention-gating",
1202+"matrix-allowbots-default-block",
1203+"matrix-allowbots-mentions-mentioned-room",
10801204"matrix-allowlist-block",
10811205"matrix-e2ee-basic-reply",
10821206] satisfies MatrixQaScenarioId[];
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。