Package-level declarations

Types

Link copied to clipboard
data class Ask(val family: String, val command: List<String>, val why: String)

A check the report does not answer. family is an attribute family key prefix (tool.node, limits.nofile, os.release), command the fixed command to run where it fails and why what the report leaves out. CAPTURE is the family of the whole-machine capture.

Link copied to clipboard
object Asks

Derives the checks a report leaves open from its text and facts. Every ask comes from a row of a fixed table, so no other command is ever printed, and a family the report already states on the failing side is never asked for. The tool rows repeat the argument vectors of the scanners (Scanners.all, ToolRegistry); a test in scan keeps the two in step.

Link copied to clipboard
data class AtlasRef(val probe: String, val left: String, val right: String) : Knowledge

left and right are Atlas targets that print different results for probe at 2.4.20.

Link copied to clipboard
class BrierScore(val facts: Long, squares: Long)

Squares and count of the facts scored in one slice; the Brier score is their ratio.

Link copied to clipboard
object Calibrate

Recalibrates the starting confidence of each path on a team's own corpus. Issue bodies that are issue-form output (### Label sections) state their environment under labelled headings; those section facts are the truth, the sections are cut out, and the extractor reads what is left. A path's base is scaled by its accuracy over its mean confidence on the dev side of a seeded split, and the held-out side scores the result.

Link copied to clipboard
class Calibration(val bases: Map<Via, Int>, val seed: String, val issues: Int, val dev: Map<Via, Long>, val before: BrierScore, val after: BrierScore)
Link copied to clipboard
data class Claim(val id: String, val phrases: List<List<String>>, val says: String, val knowledge: String, val source: Knowledge, val needs: String? = null, val affirm: Boolean = true)

A statement Drift can contradict. Every list of phrases needs one hit in the same sentence; an affirm claim fires on a sentence without a negation. needs is a detect tree over the failing facts (written as JSON, side b); a missing fact leaves it unknown and the claim silent.

Link copied to clipboard
data class ClaimHit(val id: String, val line: Int, val excerpt: String, val says: String, val knowledge: String, val source: String, val confidence: Confidence)

A sentence of the issue that a Claim contradicts. line is 1-based.

Link copied to clipboard
object Claims
Link copied to clipboard

How the output of a clean run relates to the failure in the report.

Link copied to clipboard
object CleanRun

The clean-run check: run the report's own command in the official image of its toolchain, with nothing of the reporter's machine around it, and compare what it prints with the failure in the report. Drift prints the command and never runs it.

Link copied to clipboard
class CleanRunReading(val match: CleanMatch, val seen: String?, val wanted: String?)

seen is the first failing line of the output and wanted the failure of the report, both normalised and clipped; neither is stored.

Link copied to clipboard
data class Confidence(val permille: Int) : Comparable<Confidence>

A confidence in thousandths, 0 to 1000, printed as 0.870. Integers keep the arithmetic and the text identical on every target.

Link copied to clipboard

The starting confidence of each Via path: what triage calibrate writes.

Link copied to clipboard

DRAFT goes to a person; PUBLISH met the configured threshold and passed every rule check.

Link copied to clipboard
data class DraftRule(val id: String, val disposition: Disposition, val confidence: Confidence, val key: String, val yaml: String, val notes: List<String>, val rule: Rule? = null)

A rule suggested by the report. yaml is the rule file text in the schema of rules/; a Disposition.DRAFT carries status: draft, which is not a rule status, so it cannot load into the catalog by accident. confidence is the weakest of the two version facts and the symptom signature the rule is built from. notes says why a draft was not published, and rule is the rule to store when it was.

Link copied to clipboard
data class Fact(val key: String, val value: String, val side: Side, val confidence: Confidence, val via: Via, val span: Span, val agreed: Int = 0, val alternatives: List<String> = emptyList())

One environment fact as a Drift attribute key and value (tool.node.version, run:signature). agreed counts the other spans that gave the same value; alternatives holds other values seen for the same key and side, which lower confidence.

Link copied to clipboard
enum Grade : Enum<Grade>

How far a rule's detect tree holds on the stated facts. MATCH: every condition holds on facts the issue states. FAILING_SIDE: every condition on the failing side holds and the passing side is not stated, reported only with the rule's symptom text in the issue. SYMPTOM: the failing-side conditions that can be checked hold, some are not stated, and the issue carries the rule's symptom text.

Link copied to clipboard
sealed interface Knowledge

What a claim is checked against: a rule of the catalog or two Atlas columns of one probe.

Link copied to clipboard
data class NotEnvironment(val signal: NotEnvSignal, val line: Int, val frame: String?, val text: String)

A line that puts the failure in the program: a stack frame in project code (NotEnvSignal.FRAME, frame is file:line), an expected and an actual value that differ, the word regression, or a crash reported with an exception or a stack trace (NotEnvSignal.CRASH), or a statement from ProgramFault that the program's own logic or text is at fault. line is 1-based in the text that was read; text is that line, trimmed and clipped.

Link copied to clipboard

The signal behind a NotEnvironment reading, in the order they are tried.

Link copied to clipboard

The failure a report shows: the normalised lines of its error symptoms and run:signature fact, and the signal and transport symptoms as kind:value. first is the 0-based line of the earliest one, or -1.

Link copied to clipboard
data class RuleHit(val ruleId: String, val title: String, val grade: Grade, val tier: Tier?, val severity: Severity, val status: Status, val confidence: Confidence, val facts: List<String>, val symptoms: List<String>, val mechanism: String)

A rule that applies to the report. tier is the ranker's known for a rule whose symptoms are all verified and plausible otherwise, and only a Grade.MATCH has one: the other grades lack the two-sided difference a tier describes. confidence is the weakest fact the match rests on, scaled by 0.7 for Grade.SYMPTOM; it is not the chance that the rule is the cause.

Link copied to clipboard
data class RuleRef(val ruleId: String) : Knowledge
Link copied to clipboard
enum Side : Enum<Side>

PASSING is the environment where the report says it worked, FAILING where it broke.

Link copied to clipboard
data class Span(val line: Int, val col: Int, val length: Int)

A place in the redacted issue text: 1-based line and column, and the length of the value.

Link copied to clipboard
object Triage
Link copied to clipboard
data class TriageOptions(val publishThreshold: Confidence? = null, val author: String? = null, val date: String? = null, val bases: Map<Via, Int> = emptyMap(), val worksElsewhere: Boolean = false)

publishThreshold is the confidence at which a draft rule is published instead of drafted (null: drafts only). author is hashed before it is stored. date is the day the report was read, yyyy-mm-dd, written into the provenance; a rule is never published without it. bases replaces the starting confidence of a Via (see ConfidenceTable). worksElsewhere says the program is known to work on another machine, as for a reporter who has only the error text: no program-side reading is made from the text alone and the capture is asked for.

Link copied to clipboard
data class TriageResult(val body: String, val author: String?, val truncated: Boolean, val facts: List<Fact>, val rules: List<RuleHit>, val claims: List<ClaimHit>, val draft: DraftRule?, val notEnvironment: NotEnvironment? = null, val ask: List<Ask> = emptyList())

Everything drift triage found in one issue body. body is the SHA-256 of the redacted text and author the hashed login; neither the text nor a login is kept. truncated is true when the body was longer than Triage.MAX_BODY.

Link copied to clipboard
object TriageText

The text form of a TriageResult: tables for facts, rules and claims, then the draft rule.

Link copied to clipboard
enum Via : Enum<Via>

How a value was found. base is the confidence before agreement, conflict and hedging. The table is documented in ADVANCED_USAGE.md; tool-output, key-value and pattern were set from the dev split of the triage corpus (evalTriage), section is the starting value.