{"record":{"id":"ed90cd856b5f2c6b","repo":"Hmbown/CodeWhale","slug":"full-access-cannot-override-change-that-contro","errorCode":null,"errorMessage":"Full Access cannot override {}; change that controlling source first","messagePattern":"Full Access cannot override (.+?); change that controlling source first","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/tui/ui/apply.rs","lineNumber":2860,"sourceCode":"    state: codewhale_config::SetupState,\n) -> Result<String> {\n    if let Some(source) = config.runtime_preset_blocker(\n        app.config_path.as_deref(),\n        app.config_profile.as_deref(),\n        &app.workspace,\n    ) {\n        anyhow::bail!(\n            \"Runtime presets cannot override {source}; change that controlling source first\"\n        );\n    }\n    if preset == crate::tui::setup::SetupRuntimePreset::HighTrustLocal {\n        let approval = config.approval_policy_control(\n            app.config_path.as_deref(),\n            app.config_profile.as_deref(),\n            &app.workspace,\n        );\n        if !approval.editable_root() {\n            anyhow::bail!(\n                \"Full Access cannot override {}; change that controlling source first\",\n                approval.label()\n            );\n        }\n    }\n\n    let settings_path = Settings::path().context(\"failed to resolve settings path\")?;\n    let settings_snapshot = RuntimePresetFileSnapshot::capture(settings_path)?;\n    // The preset's settings read, its config-document write, and its settings\n    // write are one durable transaction with file-snapshot rollback. Hold the\n    // settings transaction lock across all of it so a concurrent writer (a queued\n    // mode/thinking drain, the Shift+Tab posture write) can neither be lost by\n    // this save nor be reverted by the rollback.\n    // Every durable write happens inside this closure, so the settings lock is\n    // released before live state moves below.\n    crate::settings::with_settings_transaction(|settings_transaction| {\n        let mut settings = settings_transaction\n            .load()","sourceCodeStart":2842,"sourceCodeEnd":2878,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/tui/ui/apply.rs#L2842-L2878","documentation":"When applying the HighTrustLocal runtime preset, the code additionally checks whether the approval policy is controlled by a non-editable root (e.g. a managed or enterprise policy source). If `approval_policy_control(...).editable_root()` is false, Full Access cannot be granted from the runtime and the controlling source label is reported.","triggerScenarios":"Applying `SetupRuntimePreset::HighTrustLocal` when the approval policy's controlling source is not an editable root — typically a managed config, policy file, or CLI-level control.","commonSituations":"Corporate/enterprise-managed installs where approval policy is locked by administrators; running with security flags that fix the approval policy; trying to self-elevate Full Access in a managed environment.","solutions":["Inspect `approval.label()` in the message and change the approval policy at that controlling source (admin/policy owner action)","Ask your administrator to grant Full Access through the managed configuration instead","Apply a preset other than HighTrustLocal that does not require overriding the approval policy"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let approval = config.approval_policy_control(\n    config_path.as_deref(), profile.as_deref(), &workspace);\nif preset == SetupRuntimePreset::HighTrustLocal && !approval.editable_root() {\n    eprintln!(\"Full Access is locked by {}\", approval.label());\n    return;\n}","typeGuard":null,"tryCatchPattern":"match apply_preset(SetupRuntimePreset::HighTrustLocal) {\n    Err(e) if e.to_string().starts_with(\"Full Access cannot override\") => {\n        // direct the user to the controlling source named in the message\n    }\n    r => r,\n}","preventionTips":["Grant Full Access via the managed/policy configuration rather than the runtime in managed installs","Verify `approval_policy_control(...).editable_root()` before attempting HighTrustLocal","Document to users that enterprise-managed approval policy cannot be self-elevated"],"tags":["rust","config","security","approval-policy"],"backgroundTag":"conflicting-config-options","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}