Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

chore: prep memories for AB (#18973)

jif-oai65420737e807
diff --git a/codex-rs/app-server/src/config_api.rs b/codex-rs/app-server/src/config_api.rs
index 5fac8d8386..df4ad24d63 100644
--- a/codex-rs/app-server/src/config_api.rs
+++ b/codex-rs/app-server/src/config_api.rs
@@ -38,6 +38,7 @@ use tracing::warn;
const SUPPORTED_EXPERIMENTAL_FEATURE_ENABLEMENT: &[&str] = &[
"apps",
+ "memories",
"plugins",
"tool_search",
"tool_suggest",
diff --git a/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs b/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs
index 3f7e6989f8..0c681e7fb9 100644
--- a/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs
+++ b/codex-rs/app-server/tests/suite/v2/experimental_feature_list.rs
@@ -129,18 +129,20 @@ async fn experimental_feature_enablement_set_does_not_override_user_config() ->
let codex_home = TempDir::new()?;
std::fs::write(
codex_home.path().join("config.toml"),
- "[features]\napps = false\n",
+ "[features]\nmemories = false\n",
)?;
let mut mcp = McpProcess::new(codex_home.path()).await?;
timeout(DEFAULT_TIMEOUT, mcp.initialize()).await??;
- let actual =
- set_experimental_feature_enablement(&mut mcp, BTreeMap::from([("apps".to_string(), true)]))
- .await?;
+ let actual = set_experimental_feature_enablement(
+ &mut mcp,
+ BTreeMap::from([("memories".to_string(), true)]),
+ )
+ .await?;
assert_eq!(
actual,
ExperimentalFeatureEnablementSetResponse {
- enablement: BTreeMap::from([("apps".to_string(), true)]),
+ enablement: BTreeMap::from([("memories".to_string(), true)]),
}
);
@@ -150,7 +152,7 @@ async fn experimental_feature_enablement_set_does_not_override_user_config() ->
config
.additional
.get("features")
- .and_then(|features| features.get("apps")),
+ .and_then(|features| features.get("memories")),
Some(&json!(false))
);
@@ -168,6 +170,7 @@ async fn experimental_feature_enablement_set_only_updates_named_features() -> Re
let actual = set_experimental_feature_enablement(
&mut mcp,
BTreeMap::from([
+ ("memories".to_string(), true),
("plugins".to_string(), true),
("tool_search".to_string(), true),
("tool_suggest".to_string(), true),
@@ -180,6 +183,7 @@ async fn experimental_feature_enablement_set_only_updates_named_features() -> Re
actual,
ExperimentalFeatureEnablementSetResponse {
enablement: BTreeMap::from([
+ ("memories".to_string(), true),
("plugins".to_string(), true),
("tool_search".to_string(), true),
("tool_suggest".to_string(), true),
@@ -197,6 +201,13 @@ async fn experimental_feature_enablement_set_only_updates_named_features() -> Re
.and_then(|features| features.get("apps")),
Some(&json!(true))
);
+ assert_eq!(
+ config
+ .additional
+ .get("features")
+ .and_then(|features| features.get("memories")),
+ Some(&json!(true))
+ );
assert_eq!(
config
.additional
@@ -285,9 +296,9 @@ async fn experimental_feature_enablement_set_rejects_non_allowlisted_feature() -
error.message
);
assert!(
- error
- .message
- .contains("apps, plugins, tool_search, tool_suggest, tool_call_mcp_elicitation"),
+ error.message.contains(
+ "apps, memories, plugins, tool_search, tool_suggest, tool_call_mcp_elicitation"
+ ),
"{}",
error.message
);