mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
fix(coding-agent): isolate autoload-disabled package test from real home directory (#7167)
* fix(coding-agent): isolate autoload-disabled package test from real home directory The test asserted result.skills is exactly empty, but resolve() also scans ~/.agents/skills via getHomeDir(). On machines where that directory is populated the test failed; CI runners have no ~/.agents/skills, so it always passed there. Stub HOME to the temp dir with the same save/restore pattern used by neighbouring tests. * fix(coding-agent): use vi.stubEnv for home directory isolation Replaces the manual try/finally save/restore with vi.stubEnv plus vi.unstubAllEnvs in afterEach, shrinking the fix to two added lines. * fix(coding-agent): plant decoy user skill so the empty-skills assertion cannot pass vacuously With an empty sandbox, result.skills equal to [] could not distinguish the package skill being correctly excluded from skill resolution being broken entirely. A decoy skill in the stubbed HOME's .agents/skills proves scanning still works while the package skill stays excluded. * fix(coding-agent): simplify home isolation test
This commit is contained in:
parent
b63403a50f
commit
063fb963c5
1 changed files with 1 additions and 0 deletions
|
|
@ -1702,6 +1702,7 @@ Content`,
|
|||
});
|
||||
|
||||
it("should resolve autoload-disabled package entries as positive-only without a global package", async () => {
|
||||
vi.stubEnv("HOME", tempDir);
|
||||
const pkgDir = join(tempDir, "positive-only-pkg");
|
||||
mkdirSync(join(pkgDir, "extensions"), { recursive: true });
|
||||
mkdirSync(join(pkgDir, "skills", "foo"), { recursive: true });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue