From 3ca1d4832e9d16d1b3869d1f4cab921ea6b82464 Mon Sep 17 00:00:00 2001 From: Codeman maintainer Date: Thu, 22 Oct 2026 19:29:50 +0200 Subject: [PATCH] test(ralph): pin the case name a Ralph loop start registers with Merge-time fix for #676 (review finding 2). POST /api/ralph-loop/start now passes { caseName } to addSession so the session lands in its case's default session group, and nothing tested it. The registration-order test asserts the placement argument; it fails against the route without the change. Co-Authored-By: Claude Opus 5.5 (1M context) --- test/routes/ralph-routes.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/routes/ralph-routes.test.ts b/test/routes/ralph-routes.test.ts index 4f2eaa56..23d55e11 100644 --- a/test/routes/ralph-routes.test.ts +++ b/test/routes/ralph-routes.test.ts @@ -476,6 +476,8 @@ describe('ralph-routes', () => { payload: { taskDescription: 'test task', completionPhrase: 'DONE', caseName: 'registration-order' }, }); await vi.waitFor(() => expect(harness.ctx.addSession).toHaveBeenCalledTimes(1)); + // The case rides the registration, so the session lands in the case's default session group. + expect(harness.ctx.addSession).toHaveBeenCalledWith(expect.anything(), { caseName: 'registration-order' }); expect(harness.ctx.persistSessionState).not.toHaveBeenCalled(); expect(harness.ctx.setupSessionListeners).not.toHaveBeenCalled();