From 2feb41a94d1be9a4e79bea2394b86495e875e21b Mon Sep 17 00:00:00 2001 From: Malik Salim Date: Sun, 22 Mar 2026 18:52:10 -0400 Subject: [PATCH] fix: use codex co-author trailer in /ship --- .agents/skills/gstack-ship/SKILL.md | 2 +- scripts/gen-skill-docs.ts | 8 ++++++++ ship/SKILL.md.tmpl | 2 +- test/gen-skill-docs.test.ts | 10 ++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.agents/skills/gstack-ship/SKILL.md b/.agents/skills/gstack-ship/SKILL.md index e53d02d8c..a69c6a3e3 100644 --- a/.agents/skills/gstack-ship/SKILL.md +++ b/.agents/skills/gstack-ship/SKILL.md @@ -1189,7 +1189,7 @@ Save this summary — it goes into the PR body in Step 8. git commit -m "$(cat <<'EOF' chore: bump version and changelog (vX.Y.Z.W) -Co-Authored-By: Claude Opus 4.6 +Co-Authored-By: OpenAI Codex EOF )" ``` diff --git a/scripts/gen-skill-docs.ts b/scripts/gen-skill-docs.ts index 08c388f69..c40988909 100644 --- a/scripts/gen-skill-docs.ts +++ b/scripts/gen-skill-docs.ts @@ -2167,6 +2167,13 @@ in the decision tree below. If you want to persist deploy settings for future runs, suggest the user run \`/setup-deploy\`.`; } +function generateCoauthorTrailer(ctx: TemplateContext): string { + if (ctx.host === 'codex') { + return 'Co-Authored-By: OpenAI Codex '; + } + return 'Co-Authored-By: Claude Opus 4.6 '; +} + const RESOLVERS: Record string> = { COMMAND_REFERENCE: generateCommandReference, SNAPSHOT_FLAGS: generateSnapshotFlags, @@ -2185,6 +2192,7 @@ const RESOLVERS: Record string> = { TEST_FAILURE_TRIAGE: generateTestFailureTriage, SPEC_REVIEW_LOOP: generateSpecReviewLoop, DESIGN_SKETCH: generateDesignSketch, + COAUTHOR_TRAILER: generateCoauthorTrailer, BENEFITS_FROM: generateBenefitsFrom, CODEX_REVIEW_STEP: generateAdversarialStep, ADVERSARIAL_STEP: generateAdversarialStep, diff --git a/ship/SKILL.md.tmpl b/ship/SKILL.md.tmpl index bd74c197a..d13e92a09 100644 --- a/ship/SKILL.md.tmpl +++ b/ship/SKILL.md.tmpl @@ -405,7 +405,7 @@ Save this summary — it goes into the PR body in Step 8. git commit -m "$(cat <<'EOF' chore: bump version and changelog (vX.Y.Z.W) -Co-Authored-By: Claude Opus 4.6 +{{COAUTHOR_TRAILER}} EOF )" ``` diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.ts index d1d907a01..99724e57e 100644 --- a/test/gen-skill-docs.test.ts +++ b/test/gen-skill-docs.test.ts @@ -834,6 +834,16 @@ describe('Codex generation (--host codex)', () => { expect(content).toContain('.agents/skills/gstack'); }); + test('ship co-author trailer is host-specific', () => { + const claudeShip = fs.readFileSync(path.join(ROOT, 'ship', 'SKILL.md'), 'utf-8'); + expect(claudeShip).toContain('Co-Authored-By: Claude Opus 4.6 '); + expect(claudeShip).not.toContain('Co-Authored-By: OpenAI Codex '); + + const codexShip = fs.readFileSync(path.join(AGENTS_DIR, 'gstack-ship', 'SKILL.md'), 'utf-8'); + expect(codexShip).toContain('Co-Authored-By: OpenAI Codex '); + expect(codexShip).not.toContain('Co-Authored-By: Claude Opus 4.6 '); + }); + // ─── Path rewriting regression tests ───────────────────────── test('sidecar paths point to .agents/skills/gstack/review/ (not gstack-review/)', () => {