report

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const SchemaVersion = "1"

Variables

This section is empty.

Functions

func WriteVerificationReport

func WriteVerificationReport(path string, result VerificationReport) error

WriteVerificationReport writes report JSON to a file with stable formatting.

Types

type Derived added in v0.2.5

type Derived struct {
	NetVoltages         []NetVoltage        `json:"net_voltages,omitempty"`
	InferredNetVoltages []NetVoltage        `json:"inferred_net_voltages"`
	UnknownVoltageNets  []UnknownVoltageNet `json:"unknown_voltage_nets"`
	// RailInferences records deterministic voltage provenance and confidence for rails.
	RailInferences []infer.VoltageInference  `json:"rail_inferences"`
	RailCoverage   rails.RailCoverageSummary `json:"rail_coverage"`
	Conflicts      []string                  `json:"conflicts,omitempty"`
}

Derived stores non-authoritative analysis data that supports findings.

type InferenceProvenance added in v0.2.7

type InferenceProvenance struct {
	NetName         string  `json:"net_name"`
	Source          string  `json:"source"`
	ConfidenceScore float64 `json:"confidence_score"`
	ConfidenceLevel string  `json:"confidence_level"`
	Reason          string  `json:"reason,omitempty"`
}

InferenceProvenance links a voltage-based finding back to rail inference.

type NetVoltage added in v0.2.5

type NetVoltage struct {
	Net        string  `json:"net"`
	Voltage    float64 `json:"voltage"`
	Source     string  `json:"source"`
	Confidence string  `json:"confidence,omitempty"`
	Reason     string  `json:"reason,omitempty"`
}

NetVoltage is report-facing voltage evidence for a net.

type RuleResult

type RuleResult struct {
	ID                  string                `json:"id"`
	RuleID              string                `json:"rule_id,omitempty"`
	Severity            string                `json:"severity"`
	Net                 string                `json:"net,omitempty"`
	Message             string                `json:"message"`
	Provider            string                `json:"provider,omitempty"`
	Consumer            string                `json:"consumer,omitempty"`
	Ref                 string                `json:"ref,omitempty"`
	ComponentRef        string                `json:"component_ref,omitempty"`
	Pin                 string                `json:"pin,omitempty"`
	BusID               string                `json:"bus_id,omitempty"`
	BusType             string                `json:"bus_type,omitempty"`
	BusNets             *contracts.I2CBusNets `json:"bus_nets,omitempty"`
	EffectivePullupOhms *float64              `json:"effective_pullup_ohms,omitempty"`
	MinPullupOhms       *float64              `json:"min_pullup_ohms,omitempty"`
	MaxPullupOhms       *float64              `json:"max_pullup_ohms,omitempty"`
	PullupResistors     []string              `json:"pullup_resistors,omitempty"`
	Source              string                `json:"source,omitempty"`
	ContractID          string                `json:"contract_id,omitempty"`
	ContractSource      string                `json:"contract_source,omitempty"`
	ContractFile        string                `json:"contract_file,omitempty"`
	Requirement         string                `json:"requirement,omitempty"`
	Provenance          *contracts.Provenance `json:"provenance,omitempty"`
	Fix                 string                `json:"fix,omitempty"`
	WhyThisMatters      string                `json:"why_this_matters,omitempty"`
	Inference           *InferenceProvenance  `json:"inference,omitempty"`
}

RuleResult is the report-facing shape of a rule finding. The legacy id field is kept alongside rule_id for compatibility.

type Summary

type Summary struct {
	Source                         string   `json:"source"`
	SourceImporter                 string   `json:"source_importer,omitempty"`
	InputFile                      string   `json:"input_file"`
	Parts                          int      `json:"parts"`
	Pins                           int      `json:"pins,omitempty"`
	Rules                          int      `json:"rules"`
	HasFailures                    bool     `json:"has_failures"`
	Delimiter                      string   `json:"delimiter,omitempty"`
	ParseErrorsCount               int      `json:"parse_errors_count"`
	ParseWarningsCount             int      `json:"parse_warnings_count"`
	ParseErrors                    []string `json:"parse_errors"`
	ParseWarnings                  []string `json:"parse_warnings"`
	NextSteps                      []string `json:"next_steps,omitempty"`
	Nets                           int      `json:"nets,omitempty"`
	PartsMatched                   int      `json:"parts_matched"`
	UserContractsLoaded            int      `json:"user_contracts_loaded"`
	BuiltInContractsLoaded         int      `json:"built_in_contracts_loaded"`
	ActiveUserRequirements         int      `json:"active_user_requirements"`
	AvailableContractRules         int      `json:"available_contract_rules"`
	RequirementsEnabled            int      `json:"requirements_enabled"` // Compatibility alias for ActiveUserRequirements.
	PartContractCoveragePercentage float64  `json:"part_contract_coverage_percentage"`
	ContractsApplied               int      `json:"contracts_applied"`
	ContractCoveragePercentage     float64  `json:"contract_coverage_percentage"`
	UnknownPowerCriticalRefs       []string `json:"unknown_power_critical_refs,omitempty"`
	EnabledContractRules           []string `json:"enabled_contract_rules,omitempty"`
}

Summary is the compact report header used by both JSON and CLI output.

type UnknownVoltageNet added in v0.2.6

type UnknownVoltageNet struct {
	Net    string `json:"net"`
	Reason string `json:"reason"`
}

UnknownVoltageNet explains why a rail-like net could not be assigned voltage.

type VerificationReport

type VerificationReport struct {
	ReportVersion    string                     `json:"report_version"`
	Summary          Summary                    `json:"summary"`
	DesignIR         *ir.DesignIR               `json:"design_ir"`
	Findings         []RuleResult               `json:"findings"` // Canonical; future Studio consumers should use findings.
	Rules            []RuleResult               `json:"rules"`    // Deprecated alias kept only for backward compatibility.
	ContractCoverage *contracts.CoverageSummary `json:"contract_coverage,omitempty"`
	Derived          *Derived                   `json:"derived,omitempty"`
}

VerificationReport is the output schema for scan results.

func CanonicalizeVerificationReport added in v0.4.0

func CanonicalizeVerificationReport(result VerificationReport) VerificationReport

CanonicalizeVerificationReport keeps findings canonical while preserving rules as a deprecated alias for one compatibility window.

func NewVerificationReport

func NewVerificationReport(design *ir.DesignIR) VerificationReport

NewVerificationReport builds the deterministic JSON payload for scan.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL