Documentation
¶
Overview ¶
Package confidence computes a deterministic evidence-health tier for distilled proposals (RFC-002 §6) — a leaf package, because both the distiller's surfaces and the report layer must reach one answer and neither may import the other.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Assess ¶
func Assess(p model.Proposal, byID map[int64]model.Finding, root string, now time.Time) (Tier, Facts)
Assess computes a proposal's tier and the facts behind it. byID is the current finding table (AllFindings keyed by id); root locates the workspace for path liveness; now anchors ages so tests are exact.
Types ¶
type Facts ¶
type Facts struct {
// Cited is how many findings the proposal cited when distilled;
// Living how many still exist in the store (findings age out with
// the mining window).
Cited, Living int
// Events is the distinct-event count over the LIVING citations,
// under the same collapse rule as the recurrence bar.
Events int
// Sources are the distinct evidence kinds among living citations,
// fix tiers folded ("review", "fix"), sorted.
Sources []string
// NewestAge is the age of the newest living citation; zero when
// nothing lives. Meaningful only when AgeKnown.
NewestAge time.Duration
// AgeKnown is false when no living citation carries a usable
// timestamp — recency is then unknown, which is not the same as
// "brand new".
AgeKnown bool
// DeadPaths counts living citations whose file no longer exists in
// the workspace — guidance about deleted code.
DeadPaths int
}
Facts are the measured inputs behind a tier — printed next to it, so the tier is an argument, not a verdict.
Click to show internal directories.
Click to hide internal directories.