mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-28 15:41:57 +02:00
* fix(design-detect): find impeccable installed as a Claude Code plugin The design-detector probe only ever checked <root>/<SKILL_ROOTS>/skills/impeccable/, never the Claude Code plugin-cache layout (<root>/.claude/plugins/cache/<marketplace>/<plugin>/<version>/skills/impeccable/). A plugin-installed impeccable was therefore invisible: IMPECCABLE_SKILL stayed absent, the launcher was never found (so the NOT_CACHED run hint never fired), and its sibling engine was never considered. Add a plugin-cache walk alongside the existing SKILL_ROOTS walk, sharing the same presence/launcher/repo-local-exclusion/sibling-engine logic via an extracted checkSkillDir() helper so both paths stay behaviorally identical. Fixes #2838 * refactor(design-detect): consolidate newestSemverDir onto safeReaddir Both did the identical try/catch-around-readdirSync; newestSemverDir now reuses the new safeReaddir helper instead of duplicating it. * fix: harden Impeccable plugin discovery and regression fixtures * test: supply eval mode to the integrated detector callback adapter --------- Co-authored-by: Som Samantray <som.samantray@gmail.com>
37 lines
1.6 KiB
TypeScript
37 lines
1.6 KiB
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
import { E2E_TOUCHFILES, E2E_TIERS, GLOBAL_TOUCHFILES, LLM_JUDGE_TOUCHFILES } from './helpers/touchfiles-data';
|
|
import { selectTests } from './helpers/test-selection';
|
|
|
|
describe('fake impeccable engine selection', () => {
|
|
const helper = 'test/helpers/fake-impeccable.ts';
|
|
const consumers = [
|
|
'design-html-slop-gate',
|
|
'design-review-detector-shim',
|
|
'design-review-detector-shim-dom',
|
|
'design-review-plugin-handoff',
|
|
'review-design-lite',
|
|
];
|
|
|
|
test('a helper-only edit selects every paid consumer without global expansion', () => {
|
|
const result = selectTests([helper], E2E_TOUCHFILES);
|
|
expect(result.selected.slice().sort()).toEqual(consumers);
|
|
expect(result.reason).toBe('diff');
|
|
expect(result.skipped).toContain('design-consultation-core');
|
|
expect(GLOBAL_TOUCHFILES).not.toContain(helper);
|
|
expect(selectTests([helper], LLM_JUDGE_TOUCHFILES).selected).toEqual([]);
|
|
});
|
|
|
|
test('the fake executable and captured output retain the same consumers and tiers', () => {
|
|
for (const changed of ['test/fixtures/fake-impeccable.ts', 'test/fixtures/impeccable-detect-sample.json']) {
|
|
expect(selectTests([changed], E2E_TOUCHFILES).selected.slice().sort()).toEqual(consumers);
|
|
}
|
|
expect(consumers.map(name => [name, E2E_TIERS[name]])).toEqual([
|
|
['design-html-slop-gate', 'periodic'],
|
|
['design-review-detector-shim', 'gate'],
|
|
['design-review-detector-shim-dom', 'gate'],
|
|
['design-review-plugin-handoff', 'gate'],
|
|
['review-design-lite', 'periodic'],
|
|
]);
|
|
});
|
|
});
|