fix: resolve merge conflicts — rebase onto main v0.13.10.0

CHANGELOG: keep both main's entries (0.13.10.0 Office Hours, 0.13.9.0
Composable Skills) and our sidebar inspector entry, re-versioned to
0.13.11.0 since our features land after main's 0.13.10.0.

VERSION: 0.13.9.0 (ours) vs 0.13.10.0 (main) → 0.13.11.0 (combined).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-29 23:52:06 -07:00
48 changed files with 2199 additions and 174 deletions

View File

@@ -135,4 +135,62 @@ describe('gstack-config', () => {
const { stdout } = run(['get', 'test_special']);
expect(stdout).toBe('a/b&c\\d');
});
// ─── annotated header ──────────────────────────────────────
test('first set writes annotated header with docs', () => {
run(['set', 'telemetry', 'off']);
const content = readFileSync(join(stateDir, 'config.yaml'), 'utf-8');
expect(content).toContain('# gstack configuration');
expect(content).toContain('edit freely');
expect(content).toContain('proactive:');
expect(content).toContain('telemetry:');
expect(content).toContain('auto_upgrade:');
expect(content).toContain('skill_prefix:');
expect(content).toContain('routing_declined:');
expect(content).toContain('codex_reviews:');
expect(content).toContain('skip_eng_review:');
});
test('header written only once, not duplicated on second set', () => {
run(['set', 'foo', 'bar']);
run(['set', 'baz', 'qux']);
const content = readFileSync(join(stateDir, 'config.yaml'), 'utf-8');
const headerCount = (content.match(/# gstack configuration/g) || []).length;
expect(headerCount).toBe(1);
});
test('header does not break get on commented-out keys', () => {
run(['set', 'telemetry', 'community']);
// Header contains "# telemetry: anonymous" as a comment example.
// get should return the real value, not the comment.
const { stdout } = run(['get', 'telemetry']);
expect(stdout).toBe('community');
});
test('existing config file is not overwritten with header', () => {
writeFileSync(join(stateDir, 'config.yaml'), 'existing: value\n');
run(['set', 'new_key', 'new_value']);
const content = readFileSync(join(stateDir, 'config.yaml'), 'utf-8');
expect(content).toContain('existing: value');
expect(content).not.toContain('# gstack configuration');
});
// ─── routing_declined ──────────────────────────────────────
test('routing_declined defaults to empty (not set)', () => {
const { stdout } = run(['get', 'routing_declined']);
expect(stdout).toBe('');
});
test('routing_declined can be set and read', () => {
run(['set', 'routing_declined', 'true']);
const { stdout } = run(['get', 'routing_declined']);
expect(stdout).toBe('true');
});
test('routing_declined can be reset to false', () => {
run(['set', 'routing_declined', 'true']);
run(['set', 'routing_declined', 'false']);
const { stdout } = run(['get', 'routing_declined']);
expect(stdout).toBe('false');
});
});