logical.touchedfunctionno test imports itfunction touched(change: Change): readonly Subject[]The subjects a change adds or alters: those in after that before does not have, or has with other attributes.
Evaluating a change against rules (0002-policy-gate FR-002 to FR-005, FR-007): only the subjects a change adds or alters are checked (one that is removed or untouched is not), each rule applies to the kinds it names, a violation that has a live waiver for its rule and subject does not block and is listed as waived, a waiver that has expired does not count, and the verdict passes only where nothing blocks. A rule that throws is a violation of its own, never a silent pass. Everything is a pure function of the change, the rules, the waivers and the instant.
import { evaluate } from "./gate.ts";
evaluate({ before: [], after: [] }, [], [], "2026-11-21T00:00:00Z").pass; // truelogical.touchedfunctionno test imports itfunction touched(change: Change): readonly Subject[]The subjects a change adds or alters: those in after that before does not have, or has with other attributes.
logical.waiverProblemsfunctionno test imports itfunction waiverProblems(w: readonly Waiver[]): readonly string[]The rules a waiver list problems are refused for: a waiver needs a reason, a person, and an end after which it does not count.
logical.evaluatefunctionno test imports itfunction evaluate(change: Change, rules: readonly Rule[], waivers: readonly Waiver[], now: string): VerdictThe verdict of a change against rules and waivers at an instant.
touchedfunctionfunction touched(change: Change): readonly Subject[]The subjects a change adds or alters: those in after that before does not have, or has with other attributes.
waiverProblemsfunctionfunction waiverProblems(w: readonly Waiver[]): readonly string[]The rules a waiver list problems are refused for: a waiver needs a reason, a person, and an end after which it does not count.
evaluatefunctionfunction evaluate(change: Change, rules: readonly Rule[], waivers: readonly Waiver[], now: string): VerdictThe verdict of a change against rules and waivers at an instant.