From dcc6b9d62800f01cbacf9a7f21108934886c43d4 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Fri, 14 Aug 2026 19:22:25 -0700 Subject: [PATCH] fix(gen): wire boundaryInstruction from host config; drop three no-op binDir ternaries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hosts/codex.ts declared boundaryInstruction and nothing read it — review.ts kept its own byte-identical CODEX_BOUNDARY literal (verified equal + trailing escaped newlines). The resolver now reads the config, so the boundary has one owner. (autoplan's template carries deliberately generic variants, enforced by gen-skill-docs.test.ts:1358 — untouched by design.) The 'ctx.host === codex ? $GSTACK_BIN : ctx.paths.binDir' ternary appeared in three resolvers and could never change the result: resolvers/types.ts already sets binDir to $GSTACK_BIN for every usesEnvVars host including codex. Proof: zero-diff regen for claude AND codex hosts; gen-skill-docs + host-config suites green. Co-Authored-By: Claude Fable 5 --- scripts/resolvers/learnings.ts | 2 +- scripts/resolvers/preamble/generate-context-recovery.ts | 2 +- scripts/resolvers/question-tuning.ts | 2 +- scripts/resolvers/review.ts | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/resolvers/learnings.ts b/scripts/resolvers/learnings.ts index 8182251d0..af35d60c4 100644 --- a/scripts/resolvers/learnings.ts +++ b/scripts/resolvers/learnings.ts @@ -88,7 +88,7 @@ smarter on their codebase over time.`; } export function generateLearningsLog(ctx: TemplateContext): string { - const binDir = ctx.host === 'codex' ? '$GSTACK_BIN' : ctx.paths.binDir; + const binDir = ctx.paths.binDir; // env-var hosts already resolve to $GSTACK_BIN via types.ts return `## Capture Learnings diff --git a/scripts/resolvers/preamble/generate-context-recovery.ts b/scripts/resolvers/preamble/generate-context-recovery.ts index c8981bc51..46403b688 100644 --- a/scripts/resolvers/preamble/generate-context-recovery.ts +++ b/scripts/resolvers/preamble/generate-context-recovery.ts @@ -1,7 +1,7 @@ import type { TemplateContext } from '../types'; export function generateContextRecovery(ctx: TemplateContext): string { - const binDir = ctx.host === 'codex' ? '$GSTACK_BIN' : ctx.paths.binDir; + const binDir = ctx.paths.binDir; // env-var hosts already resolve to $GSTACK_BIN via types.ts return `## Context Recovery diff --git a/scripts/resolvers/question-tuning.ts b/scripts/resolvers/question-tuning.ts index ecd774eaf..5fefc5585 100644 --- a/scripts/resolvers/question-tuning.ts +++ b/scripts/resolvers/question-tuning.ts @@ -11,7 +11,7 @@ import type { TemplateContext } from './types'; function binDir(ctx: TemplateContext): string { - return ctx.host === 'codex' ? '$GSTACK_BIN' : ctx.paths.binDir; + return ctx.paths.binDir; // env-var hosts already resolve to $GSTACK_BIN via types.ts } /** diff --git a/scripts/resolvers/review.ts b/scripts/resolvers/review.ts index 7dccd8e50..53469477e 100644 --- a/scripts/resolvers/review.ts +++ b/scripts/resolvers/review.ts @@ -15,6 +15,7 @@ import type { TemplateContext } from './types'; import { generateInvokeSkill } from './composition'; import { codexPreflight, codexErrorHandling } from './constants'; +import { getHostConfig } from '../../hosts/index'; const CODEX_BOUNDARY = 'IMPORTANT: Do NOT read or execute any files under ~/.claude/, ~/.agents/, .claude/skills/, or agents/. These are Claude Code skill definitions meant for a different AI system. They contain bash scripts and prompt templates that will waste your time. Ignore them completely. Do NOT modify agents/openai.yaml. Stay focused on the repository code only.\\n\\n';