mirror of
https://github.com/openai/codex.git
synced 2026-11-22 07:13:50 +00:00
Add tool registry collision policy configuration (#36954)
## What changed - Add `features.tool_registry.error_on_tool_collisions`, defaulting to `false`, to the TOML model, generated schema, and resolved runtime configuration. - Treat `tool_registry` as structured configuration rather than a feature toggle, including in strict config validation and profile configuration. - Preserve the resolved collision policy in session config lockfiles when it is enabled or explicitly configured. ## Testing - Cover deserialization, strict validation, default and enabled resolution, feature materialization, and config lockfile serialization. GitOrigin-RevId: 2c27109dcf2a3d1e51064cc60088703e36a0f85a
This commit is contained in:
1 parent
b87981a510
commit
9952933c1d
11 files changed
+151
-6
No files matched your search
@@ -88,6 +88,29 @@ foo = true"#;
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strict_config_accepts_tool_registry_config() {
|
||||
let path = Path::new("/tmp/config.toml");
|
||||
|
||||
for contents in [
|
||||
"[features.tool_registry]\nerror_on_tool_collisions = true\n",
|
||||
"[profiles.work.features.tool_registry]\nerror_on_tool_collisions = true\n",
|
||||
] {
|
||||
assert_eq!(
|
||||
config_error_from_ignored_toml_fields::<ConfigToml>(path, contents),
|
||||
None
|
||||
);
|
||||
}
|
||||
|
||||
assert!(
|
||||
config_error_from_ignored_toml_fields::<ConfigToml>(
|
||||
path,
|
||||
"[features.tool_registry]\nunknown = true\n",
|
||||
)
|
||||
.is_some()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strict_config_rejects_unknown_profile_feature_key() {
|
||||
let path = Path::new("/tmp/config.toml");
|
||||
|
||||
Reference in new issue
Block a user