From 16204acf0dbb0af3bff93bc921780da9fe932003 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Thu, 9 Apr 2026 10:19:18 -0400 Subject: [PATCH] fix(effective_settings): keep cli/server stanzas from user settings.toml LocalDaemon and RemoteServer modes were stripping owner-specific domains (cli, server) from the user layer as well as from fabro.toml and workflow.toml. Per the plan's trust boundary rule, owner-specific domains should only be consumed from ~/.fabro/settings.toml, so the user layer is the one place they MUST survive. Strip only the workflow and project layers. --- lib/crates/fabro-config/src/effective_settings.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/crates/fabro-config/src/effective_settings.rs b/lib/crates/fabro-config/src/effective_settings.rs index f0d66e415..8afccfb3b 100644 --- a/lib/crates/fabro-config/src/effective_settings.rs +++ b/lib/crates/fabro-config/src/effective_settings.rs @@ -66,17 +66,18 @@ pub fn resolve_settings( let server_settings = server_settings.ok_or_else(|| { anyhow!("server settings are required for server-targeted settings resolution") })?; + // Owner-specific domains (cli, server) may only come from the + // local ~/.fabro/settings.toml, never from fabro.toml or + // workflow.toml. The user layer keeps its cli/server fields. strip_owner_domains(workflow.as_v2_mut()); strip_owner_domains(project.as_v2_mut()); - let mut stripped_user = user; - strip_owner_domains(stripped_user.as_v2_mut()); let server_defaults = server_defaults_layer(server_settings); let mut settings = args .combine(workflow) .combine(project) - .combine(stripped_user) + .combine(user) .resolve(); match mode {