Package-level declarations

Types

Link copied to clipboard
data class Bundle(val id: String, val members: List<String>)

Candidates the data cannot separate: same tier, same support, same history counts.

Link copied to clipboard
data class Candidate(val path: String, val tier: Tier, val score: Long, val evidence: List<EvidenceItem>, val matches: List<RuleMatch>, val basis: Basis, val spectrum: Spectrum?, val coverage: Long?, val bundle: String?, val probability: Long? = null)

A changed attribute and the case for it. Candidate.score is the sum of the Candidate.evidence weights, for ordering within a tier only. Candidate.matches holds the rule matches with their mechanism text; Candidate.basis is verified exactly for a known candidate. Candidate.coverage is the lowest per-run coverage of the history behind the spectrum (null without one). A candidate with a Candidate.bundle id cannot be told apart from the other members by the data, so it is never the cause on its own. Candidate.probability (micro-units) is the candidate's share of the posterior read through the isotonic map of Weights.probabilities, fit on the dev scenarios and not held out; it is null unless every candidate of the ranking rests on its attribute change alone.

Link copied to clipboard
data class Evidence(val ref: String)

A fact a rule match touched: an attribute path, probe:<id> or run:<field>.

Link copied to clipboard

mechanistic evidence carries a symptom that matches the observed failure; everything else a ranking read is observational. Only a ranking conditioned on a failure sets a class.

Link copied to clipboard
data class EvidenceItem(val kind: EvidenceKind, val ref: String, val weight: Long, val id: String, val cls: EvidenceClass? = null)

One independent piece of support. EvidenceItem.ref is an attribute path, probe:<id> or rule:<id>; EvidenceItem.weight is its log-odds in micro-units and EvidenceItem.id names the Weights row it came from.

Link copied to clipboard
Link copied to clipboard
object ProbeLinks

The attribute paths each probe's output depends on, keyed by probe id. A probe that differs between two captures supports a changed attribute only when the attribute path starts with one of the probe's prefixes; a probe with an empty list informs no captured attribute. The kotlin. probes carry no dimension and no entry.

Link copied to clipboard

The symptoms a failure caused by what a probe measures can show, keyed by probe id: lowercase ASCII phrases that may appear in a failure line, and exit codes. A probe that differs explains an observed failure only when the failure mentions one of its phrases or carries one of its exit codes (see FailureSignature); otherwise the difference is observational.

Link copied to clipboard
object Ranker

Ranks the changed attributes of a green-to-red pair. Each candidate collects independent evidence items (its attribute change, probes that differ, rule matches, the Ochiai score of its red value over a history) and the combiner adds their log-odds. The weights are hand-set and uncalibrated, see Weights. Neither the order of attributes, probes, runs or rules nor a vacuous green changes the result.

Link copied to clipboard
data class Ranking(val candidates: List<Candidate>, val bundles: List<Bundle>, val unattached: List<RuleMatch>, val excluded: List<Exclusion>, val transition: TransitionNote?)

The full result: Ranking.candidates best first, the Ranking.bundles among them, rule matches that touch no changed attribute (Ranking.unattached), runs left out of the spectrum (Ranking.excluded) and the Ranking.transition when the input was one. Weights are hand-set and uncalibrated; the probability of a candidate is calibrated only where Weights.toJson says it is.

Link copied to clipboard
data class Spectrum(val ef: Int, val nf: Int, val ep: Int, val score: Long)

Ochiai counts and score (micro-units) of a candidate's red value over the included runs.

Link copied to clipboard
enum Tier : Enum<Tier>

Strength of the case for a candidate, weakest first; the rules are in Ranker.

Link copied to clipboard
data class TransitionNote(val kind: TransitionKind, val steps: List<StepChange>)

What a green-to-red transition holds beyond the ranked attributes: its TransitionNote.kind and the TransitionNote.steps added or removed, which no capsule shows.

Link copied to clipboard
data class Weight(val id: String, val ratio: Long, val reason: String)

A likelihood ratio in micro-units: 2_000_000 says the item makes a candidate twice as likely to be the cause as it was before. logOdds is what the combiner adds up.

Link copied to clipboard
object Weights

Every number the ranker uses to compare candidates, in one place. The evidence weights are hand-set guesses and are NOT calibrated: they order candidates and a score is not a probability. The fit on the DriftBench dev split (bench/data/calibration/fit.json) tried fitted dimension priors, a fitted probe and rule ratio, a fitted NONE and isotonic maps, and no fitted weight replaced these values, so they stay.