Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Train fixes for CI: profile calls carry no sandbox note; file-handle tests match Windows paths

milind-soni5a384481a99b
diff --git a/server/bot-attachment.test.ts b/server/bot-attachment.test.ts
index 90890d2c16..58223508c0 100644
--- a/server/bot-attachment.test.ts
+++ b/server/bot-attachment.test.ts
@@ -178,7 +178,8 @@ describe("saveBotAttachment", () => {
status: 507,
message: expect.stringMatching(/storage is full/),
});
- const handle = sourceHandles.opened.find((entry) => entry.path === realpathSync(source))?.handle;
+ // The native form: on Windows it expands short (8.3) names as the opener's fs/promises realpath does.
+ const handle = sourceHandles.opened.find((entry) => entry.path === realpathSync.native(source))?.handle;
expect(handle).toBeDefined();
expect(handle!.fd).toBe(-1);
} finally {
diff --git a/server/drivers/codex.test.ts b/server/drivers/codex.test.ts
index 908151c556..7a403726b2 100644
--- a/server/drivers/codex.test.ts
+++ b/server/drivers/codex.test.ts
@@ -2954,7 +2954,9 @@ process.stdout.write(JSON.stringify({jsonrpc:'2.0',id:m.id,result})+'\\n');});`)
: codexSandboxSuffix
? `No OpenMausBot bot-specific instructions remain.${codexSandboxSuffix}`
: "";
- for (const call of threadCalls) expect(call.params.developerInstructions).toBe(expectedDeveloper);
+ // A call naming a permission profile leaves the sandbox to that profile, so it carries no sandbox note; the
+ // legacy-sandbox retry after a refused profile does.
+ for (const call of threadCalls) expect(call.params.developerInstructions).toBe(call.params.permissions ? system ?? "" : expectedDeveloper);
if (index > 0) expect(threadCalls[0].method).toBe("thread/resume");
const updates = calls.filter((call) => call.method === "thread/inject_items");
expect(updates).toHaveLength(index === 2 || index === 3 ? 1 : 0);
diff --git a/server/routes/threads-file-handle.test.ts b/server/routes/threads-file-handle.test.ts
index e630b543c4..6fe17a2ee1 100644
--- a/server/routes/threads-file-handle.test.ts
+++ b/server/routes/threads-file-handle.test.ts
@@ -81,7 +81,8 @@ async function fixture() {
mkdirSync(root, { recursive: true });
const inventory = join(root, "repo-inventory.md");
writeFileSync(inventory, Buffer.alloc(highWaterMark * 4, 0x61));
- captured.path = realpathSync(inventory);
+ // The route opens the path fs/promises' realpath gives, which on Windows expands short (8.3) names; realpathSync does not.
+ captured.path = realpathSync.native(inventory);
const message = store.appendMessage(bot.threadId, {
role: "bot",
kind: "text",