A team of long-lived bots for DeepSeek Harness, with main bots, bot-to-bot messages and group chats.
Let the work-dir tests finish their writes before their folder is deleted
Fei24117799e0a323b0
diff --git a/ds-bot/test/work-dir.test.js b/ds-bot/test/work-dir.test.jsindex ecd34ba6..116dc97c 100644--- a/ds-bot/test/work-dir.test.js+++ b/ds-bot/test/work-dir.test.js@@ -112,8 +112,9 @@ async function start({ services = {}, workspaces = [], llm, team: saved = TEAM }await until(() => agentOf(state().bots[botId].sessionId).session.header.cwd === dir)await settle()}- const stop = () => {- ctx.dispose()+ const stop = async () => {+ // The writes still running finish before their folder goes.+ await ctx.dispose()if (previousHome === undefined) delete process.env.DSH_HOMEelse process.env.DSH_HOME = previousHomermSync(root, { recursive: true, force: true, maxRetries: 5 })@@ -555,8 +556,8 @@ test('a team copied from another DSH_HOME moves on to a fresh part in the folderconst root = realpathSync.native(mkdtempSync(join(tmpdir(), 'ds-bot-app-workspace-')))process.env.DS_BOT_WORKSPACE = rootconst { agentOf, created, state, preStep, stop } = await start({ team: copied })- t.after(() => {- stop()+ t.after(async () => {+ await stop()if (previous === undefined) delete process.env.DS_BOT_WORKSPACEelse process.env.DS_BOT_WORKSPACE = previousrmSync(root, { recursive: true, force: true })