Documentation
¶
Overview ¶
Package lrf implements the frozen Lexical Relevance Floor V0 projection.
Index ¶
Constants ¶
const ( Profile = "lrf/0" AuthorityClass = "producer-declared" OCMSpec = "ocm/0.1-experimental" )
Variables ¶
This section is empty.
Functions ¶
func CanonicalBytes ¶
CanonicalBytes returns sorted-key compact UTF-8 JSON with one terminal LF.
Types ¶
type Context ¶
type Context struct {
CEMSpec string
CEMMapSHA256 string
PatchSource string
BaseRevision string
TargetRevision *string
PatchSHA256 string
ExcludedPath *string
OCMSpec *string
OCMMapSHA256 *string
IntentPath *string
IntentBlobOID *string
IntentStart *int64
IntentEnd *int64
IntentSpanSHA256 *string
}
Context is the successful structural-verification envelope bound into every LRF result.
type Error ¶
Error is a structural, compatibility, or operational failure for which no LRF result bytes may be emitted.
type Hunk ¶
type Hunk struct {
ID string
OldPath *string
NewPath *string
Added []byte
Disposition string
Basis []wire.Basis
Ordinal int
}
Hunk is a verified patch hunk paired with its admitted added payload. Basis reuses the CEM wire relation type.
type IssueTuple ¶
type IssueTuple [5]string
type Limits ¶
type Limits struct {
LexicalBytes int
Terms int
Edges int
Results int
Issues int
OutputBytes int
EvidenceBytes int
EvidenceLines int
}
Limits are the frozen deterministic evaluation bounds. Values may be tightened by internal conformance callers but never raised above DefaultLimits.
func DefaultLimits ¶
func DefaultLimits() Limits
DefaultLimits returns a fresh copy of the frozen profile maxima.
type Obligation ¶
type Obligation struct {
ID string
Statement []byte
HunkIDs []string
ClaimPaths []string
Ordinal int
}
Obligation is one verified linked OCM obligation projection.
type Request ¶
type Request struct {
Context Context
Hunks []Hunk
Evidence []Evidence
Obligations []Obligation
}
Request is an immutable post-structural projection; it performs no Git or network access.
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Result is the complete canonical LRF result.
func EvaluateWithLimits ¶
EvaluateWithLimits is the internal conformance seam. Limits may only be tightened relative to the frozen defaults.
func (Result) BoundExceeded ¶
BoundExceeded reports whether this is the single-issue aggregate bound document.
func (Result) CanonicalBytes ¶
CanonicalBytes returns a copy of the sealed canonical document. A zero, caller-constructed Result has no issued bytes.
func (Result) Issues ¶
func (r Result) Issues() []IssueTuple
Issues returns a copy of the canonical issue tuples.
func (Result) Results ¶
func (r Result) Results() []ResultTuple
Results returns a copy of the canonical result tuples.
type ResultTuple ¶
type ResultTuple [6]string