chore: keep gate green

This commit is contained in:
Peter Steinberger
2026-01-11 04:41:44 +01:00
parent 0b2ff4cfd9
commit 7343597075
2 changed files with 43 additions and 33 deletions

View File

@@ -130,33 +130,41 @@ describe("sandbox skill mirroring", () => {
return { context, workspaceDir }; return { context, workspaceDir };
}; };
it("copies skills into the sandbox when workspaceAccess is ro", async () => { it(
const { context } = await runContext("ro"); "copies skills into the sandbox when workspaceAccess is ro",
async () => {
const { context } = await runContext("ro");
expect(context?.enabled).toBe(true); expect(context?.enabled).toBe(true);
const skillPath = path.join( const skillPath = path.join(
context?.workspaceDir ?? "", context?.workspaceDir ?? "",
"skills", "skills",
"demo-skill", "demo-skill",
"SKILL.md", "SKILL.md",
); );
await expect(fs.readFile(skillPath, "utf-8")).resolves.toContain( await expect(fs.readFile(skillPath, "utf-8")).resolves.toContain(
"demo-skill", "demo-skill",
); );
}); },
20_000,
);
it("copies skills into the sandbox when workspaceAccess is none", async () => { it(
const { context } = await runContext("none"); "copies skills into the sandbox when workspaceAccess is none",
async () => {
const { context } = await runContext("none");
expect(context?.enabled).toBe(true); expect(context?.enabled).toBe(true);
const skillPath = path.join( const skillPath = path.join(
context?.workspaceDir ?? "", context?.workspaceDir ?? "",
"skills", "skills",
"demo-skill", "demo-skill",
"SKILL.md", "SKILL.md",
); );
await expect(fs.readFile(skillPath, "utf-8")).resolves.toContain( await expect(fs.readFile(skillPath, "utf-8")).resolves.toContain(
"demo-skill", "demo-skill",
); );
}); },
20_000,
);
}); });

View File

@@ -636,13 +636,15 @@ describe("doctor", () => {
expect( expect(
note.mock.calls.some( note.mock.calls.some(
([message, title]) => ([message, title]) => {
title === "Sandbox" && if (title !== "Sandbox") return false;
typeof message === "string" && if (typeof message !== "string") return false;
message const normalized = message.replace(/\s+/g, " ");
.replace(/\s+/g, " ") return (
.includes('agents.list (id "work") sandbox docker') && normalized.includes('agents.list (id "work") sandbox docker') &&
message.replace(/\s+/g, " ").includes('scope resolves to "shared"'), normalized.includes('scope resolves to "shared"')
);
},
), ),
).toBe(true); ).toBe(true);
}); });