mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-08 01:38:10 +01:00
fix(context-bill): skill discovery refuses a tree past the entry cap too
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
1ec023b1ed
commit
77fe211776
2 files changed
+21
-8
No files matched your search
@@ -391,6 +391,15 @@ describe("upstream fix b: installed-tree layout (repo-checkout subdir skip)", ()
|
||||
fs.rmSync(root, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
it("refuses skill discovery past its entry cap instead of walking on", () => {
|
||||
const root = fs.mkdtempSync(path.join(os.tmpdir(), "context-bill-discovery-cap-"));
|
||||
fs.mkdirSync(path.join(root, "vendor"));
|
||||
for (let i = 0; i < 10; i++) fs.mkdirSync(path.join(root, "vendor", `d${i}`));
|
||||
expect(() => findSkillDirs(root, 5)).toThrow(/more than 5 entries to walk/);
|
||||
expect(findSkillDirs(root)).toEqual([]);
|
||||
fs.rmSync(root, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
it("bills a subdirectory whose SKILL.md is a directory to its container, as discovery does not count it as a skill", () => {
|
||||
const root = fs.mkdtempSync(path.join(os.tmpdir(), "context-bill-skilldir-"));
|
||||
fs.writeFileSync(path.join(root, "SKILL.md"), "---\nname: c\ndescription: d\n---\n# c\n");
|
||||
|
||||
Reference in new issue
Block a user