mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-06 21:46:40 +02:00
fix: resolve all 7 test failures — version sync, zsh glob guard, symlink-aware codex tests
1. package.json version synced with VERSION file (0.13.3.0)
2. design-shotgun/SKILL.md.tmpl: added setopt +o nomatch guard to
bash block with variant-*.png glob
3. Codex generation tests: skip skills where .agents/skills/{name}
is a symlink back to repo root (vendored dev mode). These can't
have proper codex content since gen-skill-docs skips the write
to avoid overwriting the Claude SKILL.md.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1276,16 +1276,27 @@ describe('Codex generation (--host codex)', () => {
|
||||
});
|
||||
|
||||
// Dynamic discovery of expected Codex skills: all templates except /codex
|
||||
// Also excludes skills where .agents/skills/{name} is a symlink back to the repo root
|
||||
// (vendored dev mode — gen-skill-docs skips these to avoid overwriting Claude SKILL.md)
|
||||
const CODEX_SKILLS = (() => {
|
||||
const skills: Array<{ dir: string; codexName: string }> = [];
|
||||
const isSymlinkLoop = (codexName: string): boolean => {
|
||||
const agentSkillDir = path.join(ROOT, '.agents', 'skills', codexName);
|
||||
try {
|
||||
return fs.realpathSync(agentSkillDir) === fs.realpathSync(ROOT);
|
||||
} catch { return false; }
|
||||
};
|
||||
if (fs.existsSync(path.join(ROOT, 'SKILL.md.tmpl'))) {
|
||||
skills.push({ dir: '.', codexName: 'gstack' });
|
||||
if (!isSymlinkLoop('gstack')) {
|
||||
skills.push({ dir: '.', codexName: 'gstack' });
|
||||
}
|
||||
}
|
||||
for (const entry of fs.readdirSync(ROOT, { withFileTypes: true })) {
|
||||
if (!entry.isDirectory() || entry.name.startsWith('.') || entry.name === 'node_modules') continue;
|
||||
if (entry.name === 'codex') continue; // /codex is excluded from Codex output
|
||||
if (!fs.existsSync(path.join(ROOT, entry.name, 'SKILL.md.tmpl'))) continue;
|
||||
const codexName = entry.name.startsWith('gstack-') ? entry.name : `gstack-${entry.name}`;
|
||||
if (isSymlinkLoop(codexName)) continue;
|
||||
skills.push({ dir: entry.name, codexName });
|
||||
}
|
||||
return skills;
|
||||
|
||||
Reference in New Issue
Block a user