Skip to content

A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.

Check the fresh part's models, not the order of the Bot's chat

Fei24119380277d4424
diff --git a/ds-bot/test/work-dir.test.js b/ds-bot/test/work-dir.test.js
index d0f32db7..d4a1647e 100644
--- a/ds-bot/test/work-dir.test.js
+++ b/ds-bot/test/work-dir.test.js
@@ -492,9 +492,13 @@ test('a model the user picks while the fresh part is made reaches the fresh part
}
assert.equal((await env.call('update-bot', { id: 'b', workDir: env.project })).ok, true)
await until(() => env.state().bots.b.sessionId === 's1')
- await until(() => selected.some(([sessionId, model]) => sessionId === 'b' && model === 'v4-pro'))
+ await until(() => selected.some(([sessionId, model]) => sessionId === 's1' && model === 'v4-pro'))
await until(() => handoffOf(env.agentOf('s1')) !== undefined)
- assert.deepEqual(selected.filter(([sessionId]) => sessionId === 's1'), [['s1', 'flash'], ['s1', 'v4-pro']])
+ // Which chat the change is applied to first depends on when the fresh part takes over
+ // the Bot's chat, so only the fresh part's own models are checked.
+ const fresh = selected.filter(([sessionId]) => sessionId === 's1').map(([, model]) => model)
+ assert.equal(fresh[0], 'flash')
+ assert.equal(fresh.at(-1), 'v4-pro')
})
test('a Bot without a model of its own goes on with the earlier part\'s route', async (t) => {