Documentation
¶
Overview ¶
Package stableidmigration builds deterministic old-to-new finding-ID reports from canonical goplint finding streams.
Index ¶
Constants ¶
const SchemaVersion = 2
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PopulationChange ¶
type PopulationChangeReview ¶
type PopulationChangeReview struct {
Status string `json:"status"`
Category string `json:"category"`
Population int `json:"population"`
CanonicalSHA256 string `json:"canonical_sha256"`
Reason string `json:"reason"`
Evidence string `json:"evidence"`
}
PopulationChangeReview binds an intentionally changed scan population to its exact semantic-finding set. Counts alone are insufficient: the digest prevents a same-sized but different addition/removal set from inheriting a prior review.
type Report ¶
type Report struct {
SchemaVersion int `json:"schema_version"`
Deterministic bool `json:"deterministic"`
Accepted bool `json:"accepted"`
OldScan ScanSummary `json:"old_scan"`
NewScan ScanSummary `json:"new_scan"`
RepeatScan ScanSummary `json:"repeat_scan"`
Counts Counts `json:"counts"`
Migrations []Migration `json:"migrations"`
PopulationChanges []PopulationChange `json:"population_changes"`
Collisions []Collision `json:"collisions"`
Duplicates []Duplicate `json:"duplicates"`
Failures []string `json:"failures"`
}
func Build ¶
Build parses an old scan and two independently executed new scans. It accepts a migration only when the repeated new scans are byte-identical after canonical sorting, every shared semantic finding maps one-to-one, no ID collision or duplicate report remains, and every added/removed population is bound to an exact reviewed digest.
func BuildReviewed ¶
func BuildReviewed( oldData, newData, repeatData []byte, reviews []PopulationChangeReview, ) (Report, error)
BuildReviewed is Build with exact reviewed population changes. Reviews do not weaken collision, duplicate, determinism, or ambiguous-mapping checks.