Documentation
¶
Overview ¶
Package tracerecordrepo binds trace recording to stable Git repository authority.
Index ¶
- func DogfoodFailureReason(err error) string
- func Read(ctx context.Context, root string, index *contextindex.Index) ([]trace.Record, string, error)
- func ReadObserved(ctx context.Context, root string, index *contextindex.Index, ...) ([]trace.Record, string, error)
- func TruncatedAncestryOf(err error) (int, bool)
- type DogfoodResult
- type Input
- type ReadFailure
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DogfoodFailureReason ¶
DogfoodFailureReason returns the bounded coordination reason retained by the hidden dogfood producer. It is empty for errors outside that transaction.
func Read ¶
func Read(ctx context.Context, root string, index *contextindex.Index) ([]trace.Record, string, error)
Read returns the pinned local traces without creating or changing trace state.
func ReadObserved ¶
func ReadObserved(ctx context.Context, root string, index *contextindex.Index, opening contextindex.Observation) ([]trace.Record, string, error)
ReadObserved is Read checking stability against the observation the index was loaded under instead of spawning the pair before and after its files. The opening comparison is the concurrent path's first check verbatim; the closing one is deferred to the query's shared bracket (contextindex.EvalQueryShared), which closes the same window once.
func TruncatedAncestryOf ¶
TruncatedAncestryOf returns the number of ancestry rows omitted from the bounded Git result attached to a failed read. It also reaches through a *contextindex.Error that a downstream mapper rebuilt from this package's error (via its Cause field), so the count survives that flattening without parsing it back out of formatted error text.
Types ¶
type DogfoodResult ¶
type DogfoodResult struct {
Base, Target, Tree string
CandidateSHA256, AdmittedSHA256 string
Candidates, Admitted []string
State string
Recorded *Result
}
DogfoodResult binds the complete Git change set to the exact subset supplied to the shared record producer.
func RecordDogfood ¶
func RecordDogfood(ctx context.Context, root, baseArg, targetArg string, input Input) (DogfoodResult, error)
RecordDogfood classifies and records one base-to-target change under a single pinned authority. It returns no-source-paths without opening the trace store.
type Input ¶
type Input struct {
Task string
OpenedPaths []string
ChangedPaths []string
Verification []string
Outcome string
}
Input is the public record command payload after argument parsing.
type ReadFailure ¶
type ReadFailure string
ReadFailure classifies a failed trace read without changing its diagnostic bytes. The query adapter maps these categories to its stable refusal codes.
const ( ReadFailureTraceState ReadFailure = "trace-state" ReadFailureReplayWindow ReadFailure = "replay-window" ReadFailureDrift ReadFailure = "drift" ReadFailureHistory ReadFailure = "history" ReadFailureRepository ReadFailure = "repository" )
func ReadFailureOf ¶
func ReadFailureOf(err error) (ReadFailure, bool)
ReadFailureOf returns the stable failure category attached by Read.
type Result ¶
Result is the canonical trace, its resolved store path, and the number of ancestry rows the bounded replay probe truncated while binding revisions. A non-zero count discloses that candidate revisions beyond the window were not examined; it is derived disclosure, never an input to admission.