mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 19:20:39 +09:00
test(import): verify frontmatter role fallback preserves CEO role
Add test confirming that when a package's .paperclip.yaml extension block omits the role field, the agent role is read from AGENTS.md frontmatter instead of defaulting to "agent".
This commit is contained in:
parent
f467f3d826
commit
6d73a8a1cb
1 changed files with 44 additions and 0 deletions
|
|
@ -1638,6 +1638,50 @@ describe("company portability", () => {
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("preserves agent role from frontmatter when extension block omits it", async () => {
|
||||||
|
const portability = companyPortabilityService({} as any);
|
||||||
|
|
||||||
|
const preview = await portability.previewImport({
|
||||||
|
source: {
|
||||||
|
type: "inline",
|
||||||
|
rootPath: "ceo-package",
|
||||||
|
files: {
|
||||||
|
"COMPANY.md": [
|
||||||
|
"---",
|
||||||
|
'schema: "agentcompanies/v1"',
|
||||||
|
'name: "CEO Role Test"',
|
||||||
|
"---",
|
||||||
|
"",
|
||||||
|
].join("\n"),
|
||||||
|
"agents/ceo/AGENTS.md": [
|
||||||
|
"---",
|
||||||
|
'name: "CEO"',
|
||||||
|
'role: "ceo"',
|
||||||
|
"---",
|
||||||
|
"",
|
||||||
|
"# CEO",
|
||||||
|
"",
|
||||||
|
"You run the company.",
|
||||||
|
"",
|
||||||
|
].join("\n"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
include: { company: true, agents: true, projects: false, issues: false },
|
||||||
|
target: { mode: "new_company", newCompanyName: "CEO Role Test" },
|
||||||
|
agents: "all",
|
||||||
|
collisionStrategy: "rename",
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(preview.errors).toEqual([]);
|
||||||
|
expect(preview.manifest.agents).toEqual([
|
||||||
|
expect.objectContaining({
|
||||||
|
slug: "ceo",
|
||||||
|
name: "CEO",
|
||||||
|
role: "ceo",
|
||||||
|
}),
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
it("treats no-separator auth and api key env names as secrets during export", async () => {
|
it("treats no-separator auth and api key env names as secrets during export", async () => {
|
||||||
const portability = companyPortabilityService({} as any);
|
const portability = companyPortabilityService({} as any);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue