Documentation
¶
Overview ¶
Package finding is Veritix's report currency: one problem found in a dataset, with the evidence that proves it.
Every finding carries a re-runnable query. That is the whole design: a deterministic check and an agent-authored observation produce the same kind of object, and both can be verified by running their evidence again. A finding whose evidence no longer reproduces is dropped rather than reported, which is what makes an agentic auditor trustworthy instead of merely plausible.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evidence ¶
type Evidence struct {
// CountQuery re-measures the finding. Required.
CountQuery string
// RowQuery retrieves the affected rows for a human to inspect.
RowQuery string
// Expected describes what should have been true, in words.
Expected string
// Observed describes what was actually found, in words.
Observed string
}
Evidence is the proof behind a finding.
CountQuery must return exactly one row and one integer column: the number of affected rows or values. It is what Verify re-runs. RowQuery, when set, returns the offending rows themselves; it is never run automatically, because its results are raw customer data.
type Finding ¶
type Finding struct {
// Rule identifies the check, e.g. "column.mixed_date_formats". Stable
// across releases so that findings can be suppressed and tracked.
Rule string
Severity Severity
Origin Origin
// Title is one specific line: what is wrong, with numbers.
Title string
// Detail explains why it matters, in terms of what will go wrong
// downstream rather than in terms of the check that fired.
Detail string
// Remedy is what to do about it.
Remedy string
Location Location
// Count is how many rows or values are affected, and Total is how many
// there were. Both feed the report and Verify.
Count int64
Total int64
Evidence Evidence
// Verified records that the evidence was re-run and reproduced.
Verified bool
}
Finding is one problem, with its evidence.
func (Finding) ID ¶
ID is a stable, URL-safe handle for a finding.
It is a digest of the same key that de-duplicates findings, so it depends on what the finding is about and not on where it landed in a list. That matters because the API addresses findings by id — `/findings/{id}/rows` — and a positional id would point at a different problem after a re-run that found one more error. It is a digest rather than the key itself because the key contains customer column names, and an id ends up in URLs and access logs.
type Location ¶
type Location struct {
// Table is the SQL name of the table.
Table string
// Display is the human-readable origin, e.g. "sales.xlsx#Q1".
Display string
// Column is the column, when the finding is about one.
Column string
// File is the path relative to the dataset root.
File string
// Line is a line number in the source file, where one applies.
Line int64
}
Location says where in the dataset a finding sits.
type Origin ¶
type Origin string
Origin records what produced a finding, so a reader can weigh it.
const ( // OriginCheck is one of Veritix's built-in deterministic checks. OriginCheck Origin = "check" // OriginRule is a rule the customer wrote. OriginRule Origin = "rule" // OriginAgent is a model-proposed finding. It is still backed by // evidence, and that evidence is re-run before it is reported. OriginAgent Origin = "agent" )
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set accumulates findings and keeps them ordered and unique.
func (*Set) All ¶
All returns the findings, most severe first, then by location so that two runs over the same data produce the same report.
func (*Set) Max ¶
Max returns the highest severity present, and whether there were any findings at all.
func (*Set) Verify ¶
Verify re-runs every finding's count query and marks those that reproduce.
Findings that no longer reproduce are removed. This is what lets Veritix accept observations from a language model without accepting its arithmetic: the model chooses what to look at, but a number only reaches the report if the engine produces it.
type Severity ¶
type Severity int
Severity is how much a finding matters.
func ParseSeverity ¶
ParseSeverity reads a severity name, for the --fail-on flag and rule files.
func (Severity) MarshalText ¶
MarshalText renders a severity in JSON.
func (*Severity) UnmarshalText ¶
UnmarshalText parses a severity from JSON or YAML.