mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 19:04:40 +00:00
Fix Foundry UI bugs: org names, hanging sessions, and wrong repo creation
- Fix org display name using GitHub description instead of name field - Fix createWorkbenchSession hanging when sandbox is provisioning - Fix auto-session creation retry storm on errors - Fix task creation using wrong repo due to React state race conditions - Remove Bun hot-reload from backend Dockerfile (causes port drift) - Add GitHub sync/install status to dev panel Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
14d5413f8a
commit
689d968397
17 changed files with 2569 additions and 479 deletions
29
foundry/packages/shared/test/logging.test.ts
Normal file
29
foundry/packages/shared/test/logging.test.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { createFoundryLogger } from "../src/logging.js";
|
||||
|
||||
describe("createFoundryLogger", () => {
|
||||
afterEach(() => {
|
||||
vi.restoreAllMocks();
|
||||
});
|
||||
|
||||
it("emits logfmt output when requested", () => {
|
||||
const writes: string[] = [];
|
||||
const write = vi.fn((chunk: string | Uint8Array) => {
|
||||
writes.push(typeof chunk === "string" ? chunk : Buffer.from(chunk).toString("utf8"));
|
||||
return true;
|
||||
});
|
||||
vi.spyOn(process.stdout, "write").mockImplementation(write as typeof process.stdout.write);
|
||||
|
||||
const logger = createFoundryLogger({
|
||||
service: "foundry-backend",
|
||||
format: "logfmt",
|
||||
}).child({
|
||||
requestId: "req-123",
|
||||
});
|
||||
|
||||
logger.info({ count: 2, nested: { ok: true } }, "backend started");
|
||||
|
||||
expect(write).toHaveBeenCalledTimes(1);
|
||||
expect(writes[0]).toMatch(/^time=\S+ level=info service=foundry-backend requestId=req-123 count=2 nested="\{\\"ok\\":true\}" msg="backend started"\n$/);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue