From 4a1f1df8ce2686fc067d0cd84b85c5b2a229a0a0 Mon Sep 17 00:00:00 2001 From: Casey Chow Date: Thu, 14 May 2026 11:41:04 -0700 Subject: [PATCH] [codex] fix plugin CLI active user layer compile (#22666) ## Why PR #21396 merged after #17141 removed the old `ConfigLayerStack::get_user_layer()` API. The new plugin CLI call sites still used that stale API, which caused `main` to fail compilation. ## What Changed - update `codex plugin marketplace list` to read configured marketplaces through `get_active_user_layer()` - update the plugin snapshot validation helper to use `get_active_user_layer()` This preserves the intended active writable user-layer behavior from the profile-aware config API while fixing the stale call sites. ## Validation - `cargo check -p codex-cli` - `cargo test -p codex-cli --test plugin_cli` - `git diff --check` --- codex-rs/cli/src/marketplace_cmd.rs | 2 +- codex-rs/cli/src/plugin_cmd.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codex-rs/cli/src/marketplace_cmd.rs b/codex-rs/cli/src/marketplace_cmd.rs index b4132a0127..2ec948eacb 100644 --- a/codex-rs/cli/src/marketplace_cmd.rs +++ b/codex-rs/cli/src/marketplace_cmd.rs @@ -152,7 +152,7 @@ async fn run_list(overrides: Vec<(String, toml::Value)>) -> Result<()> { .context("failed to load configuration")?; let configured_marketplaces = config .config_layer_stack - .get_user_layer() + .get_active_user_layer() .and_then(|layer| layer.config.get("marketplaces")) .and_then(toml::Value::as_table); let Some(configured_marketplaces) = configured_marketplaces else { diff --git a/codex-rs/cli/src/plugin_cmd.rs b/codex-rs/cli/src/plugin_cmd.rs index dba06313e5..593fe644b2 100644 --- a/codex-rs/cli/src/plugin_cmd.rs +++ b/codex-rs/cli/src/plugin_cmd.rs @@ -349,7 +349,7 @@ fn configured_marketplace_snapshot_issues( load_errors: &[MarketplaceListError], marketplace_name: Option<&str>, ) -> Vec { - let Some(user_layer) = plugins_input.config_layer_stack.get_user_layer() else { + let Some(user_layer) = plugins_input.config_layer_stack.get_active_user_layer() else { return Vec::new(); }; let Some(configured_marketplaces) = user_layer