1 Commits
Author SHA1 Message Date
yetone 65924a8927 gateway: Codex's commit message and PR text come back in the shape its schema asks for (makenxis on X)
The Codex app's "generate commit message" is an ephemeral side turn
(thread_source commit_message; pull_request_message and
commit_pull_request_message likewise) whose answer must be {"message"}
or {"title","body"}. A model behind the Chat or Anthropic API never sees
that schema and answers in plain text, which the app turned down, so the
button failed for Codex on a magpie model. Titles, descriptions,
summaries and predictions were wrapped for this reason; these three kinds
were not. codexCommit now routes them through codexShaped: commitJSON
keeps the model's own JSON when it gave every required string, else makes
the object from its text (subject cut to the schema's 72 characters,
title from the first line, body from the rest).

Run (wsl-run, Linux): TestCodexCommitMessageOnMagpieProvider,
TestCommitJSON, TestCodexSide*, TestCodexSummary* green; go vet for
linux, windows and darwin; gofmt clean.
Broken by hand: with codexCommitsTo returning "" the new test is red
(the plain text "Fix login redirect loop" goes out unwrapped).
Not tried: the real Codex app against magpie (the request shape was read
from the app.asar on the Windows box, not captured); the full suite.
2026-11-11 17:08:15 +08:00