Skip to content

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

Keep the test Bot's chat owned across saves in the learning test

AdamPlatin1235461f964b1bd
diff --git a/ds-bot/test/learning.test.js b/ds-bot/test/learning.test.js
index 91f1e564..517f2618 100644
--- a/ds-bot/test/learning.test.js
+++ b/ds-bot/test/learning.test.js
@@ -567,13 +567,22 @@ test('long turns ending during review remain pending for the next pass', async t
config: { learningTimes: { tickMs: 100_000 } },
})
t.after(() => runtime.stop())
+ // Every load and save rebuilds the owner maps from the roster, and the startup model sync
+ // saves while the test runs: b3 is put back after each of them.
+ const owned = () => { runtime.rt.chatOwners.set('b3', 'b2') }
const load = runtime.rt.load
runtime.rt.load = async (...args) => {
const result = await load(...args)
- runtime.rt.chatOwners.set('b3', 'b2')
+ owned()
return result
}
- runtime.rt.chatOwners.set('b3', 'b2')
+ const save = runtime.rt.save
+ runtime.rt.save = (...args) => {
+ const result = save(...args)
+ owned()
+ return result
+ }
+ owned()
const b3Statuses = []
runtime.ctx.on('agent/status', ({ agent, status }) => {
if (agent?.id === 'b3') b3Statuses.push(status)