Skip to main content

resolve_require_check

Function resolve_require_check 

Source
pub fn resolve_require_check(
    force_on: bool,
    force_off: bool,
    config_default: bool,
) -> bool
Expand description

Single source of truth for the requires_trust_check arming decision made on promotion to Trusted/Verified (#6087).

force_on (--require-check) always wins; otherwise force_off (--no-require-check) wins; otherwise falls back to config_default ([skills.trust] require_integrity_check_on_promote). Used identically by the CLI (zeph skill trust, binary crate) and in-session (/skill trust, crate::agent::trust_commands) promotion handlers — both already gate the call on matches!(level, SkillTrustLevel::Trusted | SkillTrustLevel::Verified) before consulting this function; promotion to Quarantined/Blocked must never call it.

§Examples

use zeph_core::resolve_require_check;

assert!(resolve_require_check(true, true, false), "force_on always wins");
assert!(!resolve_require_check(false, true, true), "force_off wins over the default");
assert!(resolve_require_check(false, false, true), "falls back to the config default");