fix(recovery): harden shared commands startup recovery

This commit is contained in:
Tam Nhu Tran committed 2026-04-08 11:00:18 -04:00
1 parent 894a8ea15f
commit 103f0547c9
3 files changed
+209 -2

No files matched your search

@@ -231,6 +231,14 @@ describe('web-server shared-routes', () => {
]);
});
it('returns an empty command list when shared commands directory is missing', async () => {
const payload = await getJson<{
items: Array<{ name: string; type: string; description: string; path: string }>;
}>(baseUrl, '/api/shared/commands');
expect(payload.items).toEqual([]);
});
it('returns full content for a shared command markdown file', async () => {
const commandsDir = path.join(ccsDir, 'shared', 'commands');
fs.mkdirSync(commandsDir, { recursive: true });