fix(ci): make ci green (#1409)

This commit is contained in:
Charles Packer
2026-03-16 14:23:44 -07:00
committed by GitHub
parent f65a751ff0
commit 8ecf39798c
7 changed files with 110 additions and 29 deletions

View File

@@ -133,6 +133,7 @@ describe("reflectionTranscript helper", () => {
test("buildParentMemorySnapshot renders tree descriptions and system <memory> blocks", async () => {
const memoryDir = join(testRoot, "memory");
const normalizedMemoryDir = memoryDir.replace(/\\/g, "/");
await mkdir(join(memoryDir, "system"), { recursive: true });
await mkdir(join(memoryDir, "reference"), { recursive: true });
await mkdir(join(memoryDir, "skills", "bird"), { recursive: true });
@@ -165,12 +166,14 @@ describe("reflectionTranscript helper", () => {
expect(snapshot).toContain("SKILL.md (X/Twitter CLI for posting)");
expect(snapshot).toContain("<memory>");
expect(snapshot).toContain(`<path>${memoryDir}/system/human.md</path>`);
expect(snapshot).toContain(
`<path>${normalizedMemoryDir}/system/human.md</path>`,
);
expect(snapshot).toContain("Dr. Wooders prefers direct answers.");
expect(snapshot).toContain("</memory>");
expect(snapshot).not.toContain(
`<path>${memoryDir}/reference/project.md</path>`,
`<path>${normalizedMemoryDir}/reference/project.md</path>`,
);
expect(snapshot).not.toContain("letta-code CLI details");
expect(snapshot).not.toContain(

View File

@@ -34,6 +34,22 @@ describe("shell codex tool", () => {
expect(result.output).toContain("hello from bash");
});
test.skipIf(isWindows)(
"falls back when env-wrapped shell launcher is missing",
async () => {
const result = await shell({
command: [
"/definitely-missing/env",
"bash",
"-lc",
"echo env-fallback",
],
});
expect(result.output).toContain("env-fallback");
},
);
test("handles arguments with spaces correctly", async () => {
// This is the key test for execvp semantics - args with spaces
// should NOT be split
@@ -136,6 +152,18 @@ describe("shell codex tool", () => {
}
});
test.skipIf(isWindows)(
"falls back to the default cwd when workdir does not exist",
async () => {
const result = await shell({
command: ["pwd"],
workdir: "/definitely/missing/path",
});
expect(result.output).toBe(process.env.USER_CWD || process.cwd());
},
);
test.skipIf(isWindows)(
"handles command that produces multi-line output",
async () => {