From c3a710ee14569b736aef23a0e733adbf1c673660 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Wed, 12 Nov 2025 08:19:16 -0800 Subject: [PATCH] chore: verify boolean values can be parsed as config overrides (#6516) This is important to ensure that this: ``` codex --enable unified_exec ``` and this: ``` codex --config features.unified_exec=true ``` are equivalent. Also that when it is passed programmatically: https://github.com/openai/codex/blob/807e2c27f0a9f2e85c50e7e6df5533f0d9b853c7/codex-rs/app-server-protocol/src/protocol/v1.rs#L55 then this should work for `config`: ```json {"features": {"shell_command_tool": true}} ``` though I believe also this: ```json {"features.shell_command_tool": true} ``` --- codex-rs/common/src/config_override.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/codex-rs/common/src/config_override.rs b/codex-rs/common/src/config_override.rs index 597ec11cd..59dde92a2 100644 --- a/codex-rs/common/src/config_override.rs +++ b/codex-rs/common/src/config_override.rs @@ -151,6 +151,15 @@ mod tests { assert_eq!(v.as_integer(), Some(42)); } + #[test] + fn parses_bool() { + let true_literal = parse_toml_value("true").expect("parse"); + assert_eq!(true_literal.as_bool(), Some(true)); + + let false_literal = parse_toml_value("false").expect("parse"); + assert_eq!(false_literal.as_bool(), Some(false)); + } + #[test] fn fails_on_unquoted_string() { assert!(parse_toml_value("hello").is_err());