MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / apply_project_config_patch

Function apply_project_config_patch

src/automation/config.rs:282–292  ·  view source on GitHub ↗

Canonical load -> merge -> validate -> save pipeline for the project automation sidecar. Returns the merged project patch and the validated effective config; nothing is saved when validation fails.

(
    dashboard_root: &Path,
    global: &AutomationConfig,
    patch: AutomationConfigPatch,
)

Source from the content-addressed store, hash-verified

280/// automation sidecar. Returns the merged project patch and the validated
281/// effective config; nothing is saved when validation fails.
282pub async fn apply_project_config_patch(
283 dashboard_root: &Path,
284 global: &AutomationConfig,
285 patch: AutomationConfigPatch,
286) -> Result<(AutomationConfigPatch, AutomationConfig)> {
287 let current = load_project_config(dashboard_root).await?;
288 let project = merge_project_config(current, patch);
289 let effective = effective_config(global, Some(&project))?;
290 save_project_config(dashboard_root, &project).await?;
291 Ok((project, effective))
292}
293
294pub fn validate_config(config: &AutomationConfig) -> Result<()> {
295 if config.timeout_secs == 0 {

Calls 4

load_project_configFunction · 0.85
merge_project_configFunction · 0.85
effective_configFunction · 0.85
save_project_configFunction · 0.85

Tested by

no test coverage detected