From 18bb25557c00da84a7f5c4d70c355a10499f2c37 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Fri, 6 Feb 2026 22:30:57 -0800 Subject: [PATCH] fix: use expected line ending in codex-rs/core/config.schema.json (#10977) Fixes a line ending that was altered in https://github.com/openai/codex/pull/10861. This is breaking the release due to: https://github.com/openai/codex/blob/a118494323a46c2e7181fb7b0a7c19178fba6578/.github/workflows/rust-release.yml#L54-L55 This PR updates the test to check for this so we should catch it in CI (or when running tests locally): https://github.com/openai/codex/blob/a118494323a46c2e7181fb7b0a7c19178fba6578/codex-rs/core/src/config/schema.rs#L105-L131 --- codex-rs/core/config.schema.json | 2 +- codex-rs/core/src/config/schema.rs | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.json index 4025e3a2b..53ab77249 100644 --- a/codex-rs/core/config.schema.json +++ b/codex-rs/core/config.schema.json @@ -1629,4 +1629,4 @@ }, "title": "ConfigToml", "type": "object" -} +} \ No newline at end of file diff --git a/codex-rs/core/src/config/schema.rs b/codex-rs/core/src/config/schema.rs index 0d54c1391..d5a02c8c6 100644 --- a/codex-rs/core/src/config/schema.rs +++ b/codex-rs/core/src/config/schema.rs @@ -99,8 +99,11 @@ pub fn write_config_schema(out_path: &Path) -> anyhow::Result<()> { mod tests { use super::canonicalize; use super::config_schema_json; + use super::write_config_schema; + use pretty_assertions::assert_eq; use similar::TextDiff; + use tempfile::TempDir; #[test] fn config_schema_matches_fixture() { @@ -128,5 +131,16 @@ mod tests { Run `just write-config-schema` to overwrite with your changes.\n\n{diff}" ); } + + // Make sure the version in the repo matches exactly: https://github.com/openai/codex/pull/10977. + let tmp = TempDir::new().expect("create temp dir"); + let tmp_path = tmp.path().join("config.schema.json"); + write_config_schema(&tmp_path).expect("write config schema to temp path"); + let tmp_contents = + std::fs::read_to_string(&tmp_path).expect("read back config schema from temp path"); + assert_eq!( + fixture, tmp_contents, + "fixture should match exactly with generated schema" + ); } }