fix: add no-hooks minimal install path

This commit is contained in:
Affaan Mustafa
2026-04-30 01:48:31 -04:00
committed by Affaan Mustafa
parent d26d66fd3b
commit 5881554a1c
5 changed files with 96 additions and 0 deletions

View File

@@ -79,6 +79,7 @@ function runTests() {
if (test('lists install profiles from the real project', () => {
const profiles = listInstallProfiles();
assert.ok(profiles.some(profile => profile.id === 'minimal'), 'Should include minimal profile');
assert.ok(profiles.some(profile => profile.id === 'core'), 'Should include core profile');
assert.ok(profiles.some(profile => profile.id === 'full'), 'Should include full profile');
})) passed++; else failed++;
@@ -212,6 +213,22 @@ function runTests() {
assert.strictEqual(plan.targetRoot, path.join(projectRoot, '.agent'));
})) passed++; else failed++;
if (test('resolves minimal profile without the hook runtime', () => {
const plan = resolveInstallPlan({
profileId: 'minimal',
target: 'claude',
projectRoot: '/workspace/app',
});
assert.deepStrictEqual(
plan.selectedModuleIds,
['rules-core', 'agents-core', 'commands-core', 'platform-configs', 'workflow-quality']
);
assert.ok(!plan.selectedModuleIds.includes('hooks-runtime'),
'minimal profile should not install hooks-runtime');
assert.ok(plan.operations.length > 0, 'Should include install operations');
})) passed++; else failed++;
if (test('resolves explicit modules with dependency expansion', () => {
const plan = resolveInstallPlan({ moduleIds: ['security'] });
assert.ok(plan.selectedModuleIds.includes('security'), 'Should include requested module');