refactor: deduplicate Codex prompt snapshot fixtures (#117476)

This commit is contained in:
Peter Steinberger
2026-08-01 09:02:43 -07:00
committed by GitHub
parent 5ae401d908
commit faaeebe208
8 changed files with 336 additions and 3258 deletions
@@ -829,7 +829,9 @@ function renderModelBoundPromptLayers(params: {
"",
"### Tools: Dynamic Tool Catalog",
"",
`Full JSON: \`${params.scenario.toolSnapshotFile}\``,
params.scenario.toolSnapshotFile === "codex-dynamic-tools.telegram-direct.json"
? `Full JSON: \`${params.scenario.toolSnapshotFile}\``
: `Full tool overrides: \`${params.scenario.toolSnapshotFile}\` (base: \`codex-dynamic-tools.telegram-direct.json\`)`,
"",
];
}
@@ -971,6 +973,17 @@ function renderReadme(scenarios: PromptScenario[]): string {
"",
"The tool catalog is pinned to the canonical happy-path OpenClaw tools so optional locally installed plugin tools do not create fixture churn.",
"",
"The Telegram JSON is the complete shared tool catalog. Discord and heartbeat JSON fixtures contain readable, complete replacements for their changed top-level tools or namespaces; their `base` field points to the Telegram catalog.",
"",
"Materialize the complete, formatted tool catalog for a scenario with:",
"",
markdownFence(
"sh",
"node --import tsx scripts/generate-prompt-snapshots.ts --materialize discord-group",
),
"",
"Replace `discord-group` with `heartbeat-turn` to inspect the complete heartbeat catalog.",
"",
"The Codex model prompt fixture is generated from the same Codex model catalog/cache shape that the Codex runtime uses for remote model metadata. Regenerate it from Codex's runtime cache or, when present, a local Codex checkout with:",
"",
markdownFence("sh", "pnpm prompt:snapshots:sync-codex-model"),