Update roster fixtures and redact live provider keys (T90)

This commit is contained in:
2026-11-12 08:56:03 +00:00
parent d6e3158b80
commit 7d22f03b63
8 changed files with 29 additions and 34 deletions
+8 -2
View File
@@ -148,7 +148,8 @@ pub async fn run_module_with_input(
receiver: input::Receiver,
source: &str,
) -> anyhow::Result<()> {
let provider_config = config::Config::read(&world.root).await?;
let config_root = world.root.clone();
let provider_config = config::Config::read(&config_root).await?;
let loader = std::rc::Rc::new(loader::Loader {
root: world.root.clone(),
modules: Default::default(),
@@ -232,9 +233,14 @@ pub async fn run_module_with_input(
Ok::<_, anyhow::Error>(())
}
.await;
let current_config = config::Config::read(&config_root).await.unwrap_or_default();
result.map_err(|error| {
let mut text = error.to_string();
for provider in provider_config.providers.values() {
for provider in provider_config
.providers
.values()
.chain(current_config.providers.values())
{
if !provider.api_key.is_empty() {
text = text.replace(&provider.api_key, "[redacted]");
}