fix(rooms): default new rooms to tribunal when room_mode is omitted

assign_room (MCP tool + host-side assignRoomInDatabase) and setup
register previously fell back to 'single' when no room_mode was given,
so newly added rooms silently lost the reviewer. Default to 'tribunal'
across the MCP zod schema, the IPC arg fallback, and the DB helper, and
update the ipc-auth expectation accordingly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-06-19 00:00:20 +09:00
parent 822ac34c0e
commit f9b1e74838
3 changed files with 8 additions and 6 deletions

View File

@@ -1131,7 +1131,7 @@ describe('assign_room success', () => {
});
});
it('assign_room auto-fills missing folder for single rooms without exposing trigger metadata', async () => {
it('assign_room auto-fills missing folder and defaults to tribunal without exposing trigger metadata', async () => {
await processTaskIpc(
{
type: 'assign_room',
@@ -1146,7 +1146,7 @@ describe('assign_room success', () => {
const group = getRegisteredGroup('partial@g.us');
expect(group).toBeDefined();
expect(group!.folder).toMatch(/^grp_whatsapp_/);
expect(getStoredRoomSettings('partial@g.us')?.roomMode).toBe('single');
expect(getStoredRoomSettings('partial@g.us')?.roomMode).toBe('tribunal');
});
it('assign_room preserves an existing tribunal room mode when room_mode is omitted', async () => {