Skip to main content

Module policy_checks

Module policy_checks 

Source
Expand description

The shipped policies as checks over rule cores and repository facts. What: The shipped policies as the engine sees them: one check per policy, built from the pure rule cores and the repository facts they ask for. Why: The engine owns order, severity and stopping; the rule cores own decisions from arguments; this module joins them and fetches a repository fact only when a core asks. The content policies read the lifecycle’s candidates: they report nothing where a lifecycle has none. The Markdown policy checks the candidates it is given with the native Markdown linter.

In TS you’d write (pseudocode):

// const findings = await policy.check({ context });

Structs§

ShippedChecks
What: The shipped policies over one invocation. <F: RepositoryFacts> says the record works with any one type F that provides the facts interface, chosen where the record is built: real Git in the executable, a script in tests. Why: Holding the provider by value keeps its remembered answers and its query count for the whole invocation, and lets a test read them back afterwards.

Functions§

shipped_checks
What: The shipped checks for one invocation, with no candidates yet prepared. <F: RepositoryFacts> accepts any facts provider. Why: Every lifecycle builds its checks the same way; it only chooses what the content policies may read.