Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test: pin the room key in the HTTP dispatch context

garrytan9563d748207b
diff --git a/test/serve-http-mcp-dispatch-context.serial.test.ts b/test/serve-http-mcp-dispatch-context.serial.test.ts
index 8483a8a971..8e4b5cd5f8 100644
--- a/test/serve-http-mcp-dispatch-context.serial.test.ts
+++ b/test/serve-http-mcp-dispatch-context.serial.test.ts
@@ -95,7 +95,7 @@ async function rpc(base: string, token: string, method: string, params?: unknown
return JSON.parse(dataLine ? dataLine.slice('data:'.length) : text).result;
}
-const FULL_SURFACE_KEYS = ['actor', 'admissionOrigin', 'auth', 'config', 'inboundFrameBytes', 'isListed', 'logger', 'mcpCaller', 'metaHook', 'noticeLedger', 'onBehalfOf', 'remote', 'resultRows', 'sourceId', 'surface', 'surfaceCeiling', 'takesHoldersAllowList', 'transport'];
+const FULL_SURFACE_KEYS = ['actor', 'admissionOrigin', 'auth', 'config', 'inboundFrameBytes', 'isListed', 'logger', 'mcpCaller', 'metaHook', 'noticeLedger', 'onBehalfOf', 'remote', 'resultRows', 'room', 'sourceId', 'surface', 'surfaceCeiling', 'takesHoldersAllowList', 'transport'];
describe('POST /mcp dispatch context', () => {
test('full surface: remote http dispatch with the verified auth and token source scope', async () => {
@@ -114,6 +114,7 @@ describe('POST /mcp dispatch context', () => {
expect(opts.transport).toBe('http');
expect(opts.takesHoldersAllowList).toEqual(['world']);
expect(opts.onBehalfOf).toEqual({ header: undefined, requestMeta: undefined });
+ expect(opts.room).toEqual({ header: undefined, requestMeta: undefined });
expect(opts.sourceId).toBe('default');
expect(opts.metaHook).toBe(getBrainHotMemoryMeta);
expect(opts.surface).toBe('full');