Merge remote-tracking branch 'origin/main' into garrytan/slim-gstack-skills

# Conflicts:
#	test/brain-sync.test.ts
#	test/skill-validation.test.ts
This commit is contained in:
Garry Tan
2026-04-25 21:25:21 -07:00
10 changed files with 450 additions and 30 deletions
+4 -2
View File
@@ -97,16 +97,18 @@ describe('gstack-config gbrain keys', () => {
});
test('GSTACK_HOME overrides real config dir', () => {
// Real ~/.gstack/config.yaml must not change, regardless of what it
// already contains on the developer's machine.
const realConfig = path.join(os.homedir(), '.gstack', 'config.yaml');
const before = fs.existsSync(realConfig) ? fs.readFileSync(realConfig, 'utf-8') : null;
run(['gstack-config', 'set', 'gbrain_sync_mode', 'full']);
// The override actually took effect — temp config got the new value.
const tempConfig = fs.readFileSync(path.join(tmpHome, 'config.yaml'), 'utf-8');
expect(tempConfig).toContain('gbrain_sync_mode: full');
// Real ~/.gstack/config.yaml must not be touched. It may already contain
// the same value on a developer machine, so compare contents, not strings.
// Real ~/.gstack/config.yaml must not be touched.
const after = fs.existsSync(realConfig) ? fs.readFileSync(realConfig, 'utf-8') : null;
expect(after).toBe(before);
});