test: cover gstack-gbrain-detect --is-ok + dev-skill render refresh

Fills the two automated-coverage gaps from the eng review: --is-ok exit-code
gate (no-cli -> nonzero, healthy -> 0, plus an agrees-with-JSON no-skew check
reusing the deterministic fake-gbrain harness) and a static tripwire that
dev-skill re-renders the :user variant into the workspace render dir only when
it already exists.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-06-08 06:36:05 -07:00
parent 1d2716e3b8
commit 551c972294
2 changed files with 88 additions and 1 deletions
+14
View File
@@ -75,3 +75,17 @@ describe('.gitignore: render dir is declared untracked', () => {
expect(read('.gitignore')).toContain('.claude/gstack-rendered/');
});
});
describe('dev-skill: refreshes the render on template change', () => {
const devSkill = read('scripts/dev-skill.ts');
test('re-renders the :user variant into the workspace render dir', () => {
expect(devSkill).toContain('gstack-rendered');
expect(devSkill).toContain('--out-dir');
expect(devSkill).toContain('--respect-detection');
});
test('only refreshes when the render dir already exists (never creates it during plain dev)', () => {
expect(devSkill).toContain('fs.existsSync(RENDER_DIR)');
});
});