Skip to content

Add config bundle transport types#24617

Merged
joeflorencio-openai merged 1 commit into
mainfrom
dev/joeflorencio/cloud-config-bundle-types
May 31, 2026
Merged

Add config bundle transport types#24617
joeflorencio-openai merged 1 commit into
mainfrom
dev/joeflorencio/cloud-config-bundle-types

Conversation

@joeflorencio-openai
Copy link
Copy Markdown
Contributor

@joeflorencio-openai joeflorencio-openai commented May 26, 2026

Summary

PR 1 of 5 in the cloud-managed config client stack.

Adds the generated backend models and client transport surface for the config bundle endpoint. This bundle endpoint is the replacement backend surface for legacy cloud requirements; the final PR in the stack switches runtime consumers over to it.

Details

  • This is transport-only plumbing: no runtime config behavior changes in this PR.
  • The bundle endpoint is the new shared backend surface for cloud-delivered config and requirements data.
  • Both supported path styles are wired here: /api/codex/config/bundle and /wham/config/bundle.
  • The response types come from generated backend models so later PRs consume the backend contract directly instead of maintaining hand-written mirror structs.

Validation

Validated through the targeted stack checks after rebasing onto current main:

  • Rust crate tests for config/hooks/cloud-config/backend-client/app-server-protocol
  • Filtered codex-core and codex-app-server cloud_config_bundle tests
  • Python generated-file contract test
  • cargo shear --deny-warnings
  • Targeted argument-comment-lint for config/hooks

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

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

@joeflorencio-openai
Copy link
Copy Markdown
Contributor Author

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

github-actions Bot added a commit that referenced this pull request May 26, 2026
@joeflorencio-openai joeflorencio-openai force-pushed the dev/joeflorencio/cloud-config-bundle-types branch from e9202e5 to 015b89b Compare May 26, 2026 20:20
@joeflorencio-openai joeflorencio-openai marked this pull request as ready for review May 26, 2026 21:32
@bolinfest bolinfest self-requested a review May 27, 2026 17:31
@joeflorencio-openai joeflorencio-openai force-pushed the dev/joeflorencio/cloud-config-bundle-types branch from 015b89b to aefd558 Compare May 28, 2026 22:20
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest left a comment

Choose a reason for hiding this comment

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

There appear to be some non-idiomatic things here.

Is this how things are normally done in this crate?

use serde::Deserialize;
use serde::Serialize;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
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.

I think you want:

#[serde(rename_all = "snake_case")]

can drop the individual rename on each field?

#[serde(
rename = "config_toml",
default,
with = "::serde_with::rust::double_option",
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.

why the double option?

*
* The version of the OpenAPI document: 0.0.1
*
* Generated by: https://openapi-generator.tech
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.

What's the deal with this?

pub requirements_toml: Option<Option<Box<models::DeliveredRequirementsToml>>>,
}

impl ConfigBundleResponse {
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.

Can omit this and also use ::default()?

@joeflorencio-openai
Copy link
Copy Markdown
Contributor Author

There appear to be some non-idiomatic things here.

Is this how things are normally done in this crate?

Yes, everything in this models module is code generated (besides mod.rs that is hand curated exports). We generate an openapi.json spec from the codex-backend routes, and then the codex-backend script openapi_generate_rust_types.sh generates this rust model code from that spec.

Since this is codegen and the other files follow the same patterns, I'm assuming it's OK we leave it as is?

Add curated generated OpenAPI models for the codex-backend config bundle response and re-export them through codex-backend-client.

Expose Client::get_config_bundle() for both Codex API and ChatGPT /wham path styles. This is transport-only wiring for the first cloud config bundle checkpoint; it does not replace the existing requirements loader or change runtime config behavior.
@joeflorencio-openai joeflorencio-openai force-pushed the dev/joeflorencio/cloud-config-bundle-types branch from aefd558 to 1fde72a Compare May 29, 2026 20:46
@bolinfest
Copy link
Copy Markdown
Collaborator

@joeflorencio-openai I suppose it is, though I feel like the codegen logic could be improved to generate more canonical Rust...

@bolinfest bolinfest self-requested a review May 31, 2026 18:08
@joeflorencio-openai joeflorencio-openai merged commit e93dc98 into main May 31, 2026
31 checks passed
@joeflorencio-openai joeflorencio-openai deleted the dev/joeflorencio/cloud-config-bundle-types branch May 31, 2026 18:52
@github-actions github-actions Bot locked and limited conversation to collaborators May 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants