fix(test): gstack-config-key-locale — suppress the skill_prefix auto-relink side effect

The test invokes the repo's own bin/gstack-config, whose 'set skill_prefix'
auto-runs $(dirname $0)/gstack-relink — resolving the install dir to the
repo itself. In any environment where the loop shares a working tree (the
free-tests CI container, a fresh-HOME run), gstack-patch-names rewrote all
52 tracked SKILL.md names to gstack- prefixed, poisoning five unrelated
suites downstream (hermetic-skills-seeding, host-config golden, skill-census,
skill-validation, spec-template-sync). GSTACK_SETUP_RUNNING=1 is the
documented suppression; relink behavior stays covered by relink.test.ts's
mock install.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan 2026-08-15 08:40:12 -07:00
parent 9c76f89a51
commit c8bf0474b1
No known key found for this signature in database
GPG Key ID: C1F69E85C74EFE1D
1 changed files with 8 additions and 1 deletions

View File

@ -20,7 +20,14 @@ let stateRoot: string;
function run(args: string[]) {
const result = spawnSync(CONFIG, args, {
encoding: "utf8",
env: { ...process.env, GSTACK_STATE_ROOT: stateRoot },
// GSTACK_SETUP_RUNNING suppresses `set skill_prefix`'s auto-relink side
// effect. Without it, this test invokes the REPO's gstack-config, whose
// auto-relink resolves the install dir from its own path — i.e. the repo —
// and gstack-patch-names rewrites all 52 tracked SKILL.md files to
// gstack-prefixed names, poisoning every downstream test that reads the
// live tree (observed in the free-tests CI job). Relink behavior itself is
// covered in isolation by test/relink.test.ts's mock install.
env: { ...process.env, GSTACK_STATE_ROOT: stateRoot, GSTACK_SETUP_RUNNING: "1" },
});
return {