Metakit / @doeixd/metakit/policy
checkImplication
function · packages/metakit/src/policy.ts:162
function checkImplication<
Row,
Principal,
Rules extends Readonly<
Record<string, Expr.Expr<PolicyEnv<Row, Principal>, boolean>>
>,
>(
policy: Definition<Row, Principal, Rules>,
from: NoInfer<RuleOf<Rules>>,
to: NoInfer<RuleOf<Rules>>,
): Verdict.Verdict<never>Tier 3 synchronous check: does rule from of policy (together with row
and principal schema invariants) entail its rule to?
Typical use: non-disclosure (policy.rules.Update entails
policy.rules.Read). Returns Verdict.True when proved synchronously in
Zone/Interval, or Verdict.Unknown when Z3 is needed
(Prove.policyImplies). A rule of another policy throws.