mirror of
https://github.com/openai/codex.git
synced 2026-04-25 15:15:15 +00:00
Stabilize protocol schema fixture generation (#13886)
## What changed - TypeScript schema fixture generation now goes through in-memory tree helpers rather than a heavier on-disk generation path. - The comparison logic normalizes generated banner and path differences that are not semantically relevant to the exported schema. - TypeScript and JSON fixture coverage are split into separate tests, and the expensive schema-export tests are serialized in `nextest`. ## Why this fixes the flake - The original fixture coverage mixed several heavy codegen paths into one monolithic test and then compared generated output that included incidental banner/path differences. - On Windows CI, that combination created both runtime pressure and output variance unrelated to the schema shapes we actually care about. - Splitting the coverage isolates failures by format, in-memory generation reduces filesystem churn, normalization strips generator noise, and serializing the heavy tests removes parallel resource contention. ## Scope - Production helper change plus test changes.
This commit is contained in:
@@ -171,6 +171,12 @@ macro_rules! client_request_definitions {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) fn visit_client_response_types(v: &mut impl ::ts_rs::TypeVisitor) {
|
||||
$(
|
||||
v.visit::<$response>();
|
||||
)*
|
||||
}
|
||||
|
||||
#[allow(clippy::vec_init_then_push)]
|
||||
pub fn export_client_response_schemas(
|
||||
out_dir: &::std::path::Path,
|
||||
@@ -549,6 +555,12 @@ macro_rules! server_request_definitions {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) fn visit_server_response_types(v: &mut impl ::ts_rs::TypeVisitor) {
|
||||
$(
|
||||
v.visit::<$response>();
|
||||
)*
|
||||
}
|
||||
|
||||
#[allow(clippy::vec_init_then_push)]
|
||||
pub fn export_server_response_schemas(
|
||||
out_dir: &Path,
|
||||
|
||||
Reference in New Issue
Block a user