Skip to content

generate an internal json schema for RolloutLine#14434

Merged
keyz merged 18 commits intomainfrom
keyz/codegen
Mar 17, 2026
Merged

generate an internal json schema for RolloutLine#14434
keyz merged 18 commits intomainfrom
keyz/codegen

Conversation

@keyz
Copy link
Copy Markdown
Member

@keyz keyz commented Mar 12, 2026

Why

i'm working on something that parses and analyzes codex rollout logs, and i'd like to have a schema for generating a parser/validator.

codex app-server generate-internal-json-schema writes an RolloutLine.json file

while doing this, i noticed we have a writer <> reader mismatch issue on FunctionCallOutputPayload and reasoning item ID -- added some schemars annotations to fix those

Test

$ just codex app-server generate-internal-json-schema --out ./foo

generates an RolloutLine.json file, which i validated against jsonl files on disk

just codex app-server --help doesn't expose the generate-internal-json-schema option by default, but you can do just codex app-server generate-internal-json-schema --help if you know the command

everything else still works

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@keyz
Copy link
Copy Markdown
Member Author

keyz commented Mar 12, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Mar 12, 2026
@keyz keyz enabled auto-merge (squash) March 12, 2026 06:24
@keyz keyz changed the title internal: command to generate json schema and ts for RolloutLine Mar 13, 2026
@keyz
Copy link
Copy Markdown
Member Author

keyz commented Mar 13, 2026

@codex review

@keyz keyz disabled auto-merge March 13, 2026 07:18
@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Mar 13, 2026
Comment on lines +237 to +240
// internal only (not a public stable interface)
let internal_out_dir = out_dir.join("internal");
ensure_dir(&internal_out_dir)?;
write_json_schema::<RolloutLine>(&internal_out_dir, "RolloutLine")?;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here

},
FunctionCallOutput {
call_id: String,
#[schemars(with = "FunctionCallOutputBody")]
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// NOTE: The `output` field for `function_call_output` uses a dedicated payload type with
// custom serialization. On the wire it is either:
// - a plain string (`content`)
// - an array of structured content items (`content_items`)
// We keep this behavior centralized in `FunctionCallOutputPayload`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apanasenko-oai want to double-check the change in this PR is ok with codex cloud?

@keyz keyz requested review from bolinfest and jif-oai March 13, 2026 15:46
@keyz
Copy link
Copy Markdown
Member Author

keyz commented Mar 13, 2026

discussed with @owenlin0 offline -- going to switch this to a separate command

@keyz keyz marked this pull request as draft March 13, 2026 16:18
@keyz keyz force-pushed the keyz/codegen branch 3 times, most recently from 4679910 to a19f8cf Compare March 14, 2026 00:56
@keyz keyz marked this pull request as ready for review March 14, 2026 01:01
@keyz keyz requested a review from owenlin0 March 14, 2026 01:01
Copy link
Copy Markdown
Collaborator

@owenlin0 owenlin0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks! let's double-check the removal of FunctionCallOutputPayload with @apanasenko-oai though

keyz added a commit that referenced this pull request Mar 16, 2026
Co-authored-by: Codex <noreply@openai.com>
keyz added a commit that referenced this pull request Mar 16, 2026
Align TypeScript codegen with the existing JSON Schema wire override for function and custom tool call outputs.

Co-authored-by: Codex <noreply@openai.com>
@keyz keyz merged commit 904dbd4 into main Mar 17, 2026
33 of 37 checks passed
@keyz keyz deleted the keyz/codegen branch March 17, 2026 18:19
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

oai PRs contributed by OpenAI employees

3 participants