fix(codex): load qa-only from gstack root in ship

This commit is contained in:
spacegeologist 2026-05-28 14:56:52 +08:00
parent 19770ea8b4
commit 67af98fc06
2 changed files with 9 additions and 2 deletions

View File

@ -29,6 +29,7 @@ const codex: HostConfig = {
{ from: '.claude/skills/gstack', to: '.agents/skills/gstack' },
{ from: '.claude/skills/review', to: '.agents/skills/gstack/review' },
{ from: '.claude/skills', to: '.agents/skills' },
{ from: '${CLAUDE_SKILL_DIR}/../qa-only/SKILL.md', to: '$GSTACK_ROOT/../gstack-qa-only/SKILL.md' },
],
suppressedResolvers: [

View File

@ -1737,6 +1737,12 @@ describe('Codex generation (--host codex)', () => {
expect(reviewContent).not.toContain('CODEX_REVIEWS');
});
test('Codex ship plan verification loads qa-only from gstack root', () => {
const shipContent = fs.readFileSync(path.join(AGENTS_DIR, 'gstack-ship', 'SKILL.md'), 'utf-8');
expect(shipContent).toContain('$GSTACK_ROOT/../gstack-qa-only/SKILL.md');
expect(shipContent).not.toContain('${CLAUDE_SKILL_DIR}/../qa-only/SKILL.md');
});
test('--host codex --dry-run freshness', () => {
const result = Bun.spawnSync(['bun', 'run', 'scripts/gen-skill-docs.ts', '--host', 'codex', '--dry-run'], {
cwd: ROOT,
@ -1842,8 +1848,8 @@ describe('Codex generation (--host codex)', () => {
}
});
test('all four path rewrite rules produce correct output', () => {
// Test each of the 4 path rewrite rules individually
test('Codex path rewrite rules produce correct output', () => {
// Test host-configured path rewrite rules individually
const content = fs.readFileSync(path.join(AGENTS_DIR, 'gstack-review', 'SKILL.md'), 'utf-8');
// Rule 1: ~/.claude/skills/gstack → $GSTACK_ROOT