Package-level declarations

Types

Link copied to clipboard
enum Basis : Coded, Enum<Basis>

verified means the source states the symptom; inferred means only the mechanism is cited; range means the source lists a tested or compatible range and states no failure.

Link copied to clipboard
data class Bound(val op: Op, val version: Version)
Link copied to clipboard
data class ConstraintReport(val rules: Int, val violations: List<Violation>, val pending: List<String>)

ConstraintReport.pending lists pending-scanner rules: visible debt, not a failure.

Link copied to clipboard
Link copied to clipboard
object Detect
Link copied to clipboard
data class Env(val attrs: Map<String, String> = emptyMap(), val probes: Map<String, String> = emptyMap(), val run: Map<String, String> = emptyMap())

One side of a comparison: static attributes, usable probe transcripts and run symptom fields.

Link copied to clipboard
data class Fixture(val name: String, val a: Env, val b: Env)
Link copied to clipboard
data class Fixtures(val positive: List<Fixture>, val negative: List<Fixture>)
Link copied to clipboard
object Learned

The learned-rule store: one canonical JSON file, learned.json, in a directory the user names. It holds rules in the schema of rules/, each checked by RuleCompiler on every read. A learned rule never replaces a shipped one, so an id that a shipped rule already uses is refused.

Link copied to clipboard
sealed interface Node
Link copied to clipboard
enum Op : Enum<Op>
Link copied to clipboard
sealed interface Pred
Link copied to clipboard
data class Rule(val id: String, val title: String, val applies: List<String>, val difference: String, val symptoms: List<Symptom>, val mechanism: String, val probe: String?, val detect: Node, val severity: Severity, val provenance: List<Source>, val fixtures: Fixtures, val status: Status = Status.ACTIVE)

Rule.applies holds dimension ids; Rule.detect reads a as passing and b as failing.

Link copied to clipboard
Link copied to clipboard
class RuleException(val violation: Violation) : Exception
Link copied to clipboard
data class RuleMatch(val ruleId: String, val title: String, val tier: RuleTier, val severity: Severity, val evidence: List<Evidence>, val mechanism: String, val basis: Basis)

A rule match with everything a renderer may want; verbosity is a presentation choice.

Link copied to clipboard
data class RuleOutcome(val verdict: Verdict, val match: RuleMatch?)
Link copied to clipboard

known is a rule match with its fixture-backed mechanism; confirmed needs an experiment.

Link copied to clipboard
Link copied to clipboard
data class Source(val url: String, val kind: SourceKind, val verified: String, val section: String?)
Link copied to clipboard
Link copied to clipboard

A pending-scanner rule names an attribute no scanner emits yet; the gate lists it.

Link copied to clipboard
data class Symptom(val text: String, val basis: Basis)
Link copied to clipboard

Three-valued result: a missing fact or an unparsed version is UNKNOWN, never NO_MATCH.

Link copied to clipboard
data class Violation(val ruleId: String, val path: String, val reason: String)

Where a rule decode or check failed: the rule id and the field path inside the rule.

Link copied to clipboard
enum Which : Enum<Which>

Functions

Link copied to clipboard