Versions in this module Expand all Collapse all v0 v0.6.1 Sep 21, 2026 v0.6.0 Sep 21, 2026 v0.5.0 Sep 5, 2026 Changes in this version + const CgroupNote + const DropCounterWitness + const GiB + const HorizonWindows + const LedgerSchema + const MiB + const RecoveryLogMarker + const Schema + const TasksetNote + const TierAggregate + const TierDLQ + const TierMain + const TierUnclassifid + const TierWALTempTLS + const WindowSecs + var ErrTooFewSamples = errors.New("gatecore: too few samples to fit") + func Count(v int64) string + func DefaultMetrics() []string + func DefaultRequiredMetrics() []string + func DefaultServerEnv() map[string]string + func Dur(d time.Duration) string + func FindStringField(v any, key string) (string, bool) + func Float(v float64) string + func HumanBytes(b int64) string + func MainTierPhysicalBytes(entries []FileEntry, spec ClassifySpec) int64 + func MetricDelta(samples []MetricSample, phase, key string) (float64, bool) + func MetricDeltaPrefix(samples []MetricSample, phase, name string) (float64, bool) + func MetricLast(samples []MetricSample, phase, key string) (float64, bool) + func Ms(v float64) string + func ParseCgroupProcs(s string) ([]int, error) + func ParseMemTotal(meminfo string) (int64, error) + func ParseMemoryEvents(s string) (map[string]int64, error) + func ParseMemoryMax(s string) (bytes int64, bounded bool, err error) + func ParseMemoryPeak(s string) (int64, error) + func ParseProcSelfCgroup(s string) (string, error) + func ParseVmHWM(status string) (int64, error) + func Pct(v float64) string + func Rate(v float64) string + func RenderMarkdown(r *Result, jsonName string) string + func ReportBaseName(day time.Time) string + func ScanTruncated(v any) (found bool, isTrue bool) + func Secs(v float64) string + func TopLevelScalars(v any, keys []string) map[string]float64 + func WindowCoverage(pts []WindowPoint, expected []int64, windowSecs int64) (returned, missing, extra int) + func WindowStartFor(t time.Time, windowSecs int64) int64 + func WindowTotals(pts []WindowPoint, field string, windowSecs int64) map[int64]int64 + func WriteLedger(path string, l AckLedger) error + func WriteReports(dir string, day time.Time, r *Result) (jsonPath, mdPath string, err error) + type APICheck struct + ExpectCoverage string + Name string + Path string + PerWindow bool + Range string + ScalarKeys []string + func DefaultAPIChecks() []APICheck + type AckLedger struct + Final bool + FlushIntervalSec float64 + FlushedAt time.Time + Schema string + StartedAt time.Time + Totals LedgerCounts + TotalsBySignal map[string]LedgerCounts + WindowSecs int64 + Windows []LedgerWindow + func LoadLedger(path string) (AckLedger, error) + func (l *AckLedger) Summary(path string) LedgerSummary + func (l *AckLedger) Window(start int64) (LedgerWindow, bool) + func (l *AckLedger) WindowsIn(from, to int64) []LedgerWindow + type Assertion struct + Actual string + Basis string + Category string + Comparator string + Degraded bool + Description string + Detail string + ID string + Pass bool + Threshold string + func Evaluate(r *Result) []Assertion + type BacklogTrend struct + AllowanceRows float64 + EndpointGrowth float64 + Error string + Evaluated bool + First float64 + FittedGrowth float64 + Flat bool + Last float64 + Max float64 + Metric string + Min float64 + R2 float64 + Samples int + SlopePerMinute float64 + SpanMinutes float64 + func EvaluateBacklog(metric string, samples []TimedValue, allowanceFraction, allowanceFloor float64, ...) BacklogTrend + type Binaries struct + Loadsim string + Prefill string + Server string + type CPUMax struct + CPUs float64 + PeriodUsec int64 + QuotaUsec int64 + Raw string + Unbounded bool + func ParseCPUMax(s string) (CPUMax, error) + type CertificationConfig struct + Required bool + type Classification struct + Bytes map[string]int64 + Files map[string][]string + Total int64 + Unclassified int64 + UnclassifiedFiles []string + func Classify(entries []FileEntry, spec ClassifySpec) Classification + type ClassifySpec struct + AggregateDBFile string + DLQDir string + MainDBFile string + TLSDir string + func DefaultClassifySpec() ClassifySpec + type Command struct + Argv []string + Dir string + DurationSec float64 + Error string + ExitCode int + LogPath string + Phase string + StartedAt time.Time + type Config struct + APIKey string + Binaries Binaries + Certification CertificationConfig + Classify TierSpecConfig + Confinement ConfinementConfig + DataDir string + GRPCAddr string + HTTPAddr string + Load LoadConfig + MCPPath string + Prefill PrefillConfig + Queries QueryConfig + ReadyTimeoutSec float64 + RepoRoot string + ReportDir string + RunID string + Sampling SamplingConfig + ServerEnv map[string]string + ShutdownTimeoutSec float64 + Thresholds Thresholds + WorkDir string + func DefaultConfig() Config + func LoadConfigFile(path string) (Config, error) + func (c Config) Validate() error + type Confinement struct + CPUMaxRaw string + CPUPeriodUsec int64 + CPUQuotaUsec int64 + EffectiveCPUs float64 + GOMAXPROCS int + MemoryMaxByte int64 + MemoryMaxRaw string + Mode ConfinementMode + Note string + ScopePath string + TasksetCPUs string + Unit string + type ConfinementConfig struct + AllowFallback bool + CPUQuotaPercent int + Enabled bool + FallbackCPUs string + FallbackGOMAXPROCS int + MemoryMax string + UnitPrefix string + type ConfinementMode string + const ConfinementCgroup + const ConfinementTaskset + type Contribution map[int64]int64 + func (c Contribution) Add(t time.Time, windowSecs int64) + func (c Contribution) Points() int64 + type CrashBoundReport struct + AckedLossPoints int64 + AmbiguityPoints int64 + CompareFromUnix int64 + CompareToUnix int64 + CrashEndUnix int64 + CrashStartUnix int64 + Error string + Evaluated bool + Pass bool + Signal string + TotalAcked int64 + TotalAttempted int64 + TotalObserved int64 + WindowSecs int64 + Windows []WindowBound + WindowsAboveUpper int + WindowsBelowLower int + WindowsCompared int + WindowsCrashAffected int + WindowsExact int + WindowsFailed int + WindowsMissing int + func EvaluateCrashBounds(l *AckLedger, signal string, observed map[int64]int64, ...) CrashBoundReport + type DiskResult struct + DataDir string + FreeBytes int64 + FreeMinBytes int64 + GaugeBytes map[string]float64 + GaugeHighWater map[string]float64 + MeasuredAt time.Time + Tiers []DiskTier + TotalBytes int64 + TotalLimit int64 + UnclassifiedB int64 + UnclassifiedFs []string + type DiskSample struct + At time.Time + ChargedBytes int64 + PhysicalBytes int64 + Windows float64 + type DiskTier struct + Bytes int64 + Files []string + LimitBytes int64 + Name string + Projected bool + type FileEntry struct + Bytes int64 + RelPath string + type Fit struct + Intercept float64 + N int + R2 float64 + Slope float64 + SlopeStdErr float64 + XSpan float64 + YMax float64 + YMin float64 + func FitLine(pts []Point, minSamples int) (Fit, error) + func (f Fit) UpperSlope(z float64) float64 + type HostInfo struct + Arch string + CgroupV2 bool + DataDir string + DataDirDevice string + DataDirFSType string + DataDirFreeMin int64 + DataDirMount string + DataDirTotal int64 + Hostname string + Kernel string + NumCPU int + OS string + TotalMemBytes int64 + type LatencySentinelProof struct + LowCount int + LowMS float64 + Service string + Surfaces []LatencySurface + TailCount int + TailMS float64 + type LatencySurface struct + Collapsed bool + Degraded bool + Error string + Method string + Name string + RelativeErrorBound float64 + SampleCount uint64 + Saturations uint64 + SketchScale uint8 + Status string + ValueMS float64 + type LedgerCounts struct + AckedPoints int64 + AckedRequests int64 + AttemptedPoints int64 + AttemptedRequests int64 + func (c *LedgerCounts) Add(o LedgerCounts) + func (c LedgerCounts) Exact() bool + type LedgerRecorder struct + func NewLedgerRecorder(windowSecs int64, flushInterval time.Duration, now time.Time) *LedgerRecorder + func (r *LedgerRecorder) Ack(c Contribution, signal string) + func (r *LedgerRecorder) Attempt(c Contribution, signal string) + func (r *LedgerRecorder) Snapshot(now time.Time, final bool) AckLedger + type LedgerSummary struct + Final bool + FirstWindow int64 + FlushIntervalSec float64 + FlushedAt time.Time + LastWindow int64 + PreKillCopyAt time.Time + PreKillCopyBytes int64 + PreKillCopyPath string + Present bool + Schema string + Totals LedgerCounts + WindowSecs int64 + Windows int + type LedgerWindow struct + BySignal map[string]LedgerCounts + Counts LedgerCounts + WindowStart int64 + func (w LedgerWindow) SignalCounts(signal string) LedgerCounts + type LoadConfig struct + BatchIntervalMs int + BurstSpec string + CallTimeoutSec float64 + CrashAtSec float64 + CrashRunSec float64 + CrashRunSettleSec float64 + LedgerFlushSec float64 + PostBurstAllowanceSec float64 + PostBurstProofSec float64 + Profile string + QuietGapSec float64 + Services int + SettleSec float64 + SustainedSec float64 + TenantID string + type LoadPhase struct + DurationSec float64 + Exhausted int64 + FirstErr string + MaxMs float64 + OtherErrors int64 + P50Ms float64 + P90Ms float64 + P999Ms float64 + P99Ms float64 + Phase string + PointsAcked int64 + PointsPerSec float64 + PointsSent int64 + Present bool + RequestsErr int64 + RequestsOK int64 + Samples int64 + Source string + Unavailable int64 + func (p LoadPhase) AckRatio() float64 + type LoadResults struct + Burst LoadPhase + CrashRun LoadPhase + Ledger LedgerSummary + LedgerPath string + PostBurstAllowance LoadPhase + PostBurstProof LoadPhase + ReportPaths map[string]string + Sustained LoadPhase + type LoadsimLatency struct + MaxMs float64 + MeanMs float64 + MinMs float64 + P50Ms float64 + P90Ms float64 + P95Ms float64 + P999Ms float64 + P99Ms float64 + Samples int64 + type LoadsimPhase struct + All LoadsimLatency + BySignal map[string]LoadsimLatency + DurationSec float64 + Exhausted int64 + OtherErrors int64 + Phase string + PointsAcked int64 + PointsPerSec float64 + PointsSent int64 + RequestsErr int64 + RequestsOK int64 + Unavailable int64 + type LoadsimReport struct + Config map[string]any + EndedAt string + FirstErr string + Phases []LoadsimPhase + StartedAt string + func LoadLoadsimReport(path string) (LoadsimReport, error) + func (rep LoadsimReport) PhaseNamed(source, phase string) LoadPhase + type MCPToolCall struct + Arguments string + DurationSec float64 + Error string + PrimaryText string + RPCError string + ResultBytes int + Status int + Tool string + TruncatedFound bool + TruncatedTrue bool + type MCPToolSpec struct + Arguments map[string]any + EndArg string + Name string + SinceArg string + StartArg string + func AggregateMCPTools() []MCPToolSpec + type MemoryIncarnate struct + Label string + OOMKills int64 + PID int + PeakBytes int64 + ScopePath string + VmHWMBytes int64 + type MemoryResult struct + Basis string + LimitBytes int64 + OOMKills int64 + OOMObserved bool + OOMSource string + PeakBytes int64 + PeakSource string + PerIncarnation []MemoryIncarnate + VmHWMBytes int64 + type MetricSample struct + At time.Time + Phase string + Values map[string]float64 + type MetricVerdict int + const MetricAbsent + const MetricEmptyVector + const MetricPresent + func MetricDeltaWitnessed(samples []MetricSample, phase, key, witness string) (float64, MetricVerdict) + type Phase struct + Completed bool + Detail string + DurationSec float64 + EndedAt time.Time + Error string + Name string + StartedAt time.Time + type Point struct + X float64 + Y float64 + type PrefillConfig struct + DBPath string + Enabled bool + Windows int + Workers int + type Projection struct + AmplificationFactor float64 + AmplificationMeasured bool + BytesPerWindow float64 + ChargedBytesPerWindow float64 + Error string + Evaluated bool + FirstAt time.Time + Fit Fit + HorizonWinds int + Label string + LastAt time.Time + MetricNote string + ObservedMax int64 + ObservedMin int64 + ProjectedBytes int64 + ProjectedUpperBytes int64 + SampleCount int + Samples []DiskSample + UpperBytesPerWinds float64 + WindowsSpan float64 + ZScore float64 + func FitProjection(samples []DiskSample, horizonWindows int, z float64, minSamples int) Projection + type PromSample struct + Labels map[string]string + Name string + Value float64 + func (s PromSample) Key() string + type PromSamples []PromSample + func ParsePrometheusText(body string) (PromSamples, error) + func (ps PromSamples) ByLabel(name, label string) map[string]float64 + func (ps PromSamples) Flatten(names []string) map[string]float64 + func (ps PromSamples) Get(name string, labels map[string]string) (float64, bool) + func (ps PromSamples) Sum(name string) (total float64, found bool) + type Provenance struct + ArchivePath string + ArchiveSHA256 string + BinarySHA256 map[string]string + Branch string + BuiltAt time.Time + CandidateTag string + CommitSHA string + ConfigPath string + ConfigSHA256 string + DirtyFiles []string + DirtyTree bool + ExpectedArchiveSHA256 string + ExpectedCommitSHA string + ExpectedServerSHA256 string + GoVersion string + OrchestratorPID int + ServerVersion string + TagCommitSHA string + type QueryCheck struct + BodyBytes int + Coverage string + CoverageExpected string + CoverageSource string + DurationSec float64 + Error string + ExpectedScalars map[string]float64 + ExtraWindows int + MissingWindows int + Name string + Scalars map[string]float64 + Status int + TruncatedFound bool + TruncatedTrue bool + URL string + WindowsExpected int + WindowsReturned int + type QueryConfig struct + API []APICheck + MCPTools []MCPToolSpec + Timeout float64 + type QueryLatencyCheck struct + ColdCache string + ColdSeconds float64 + Error string + Name string + Status int + URL string + WarmCacheHits int + WarmMax float64 + WarmP50 float64 + WarmP95 float64 + WarmSeconds []float64 + type QueryResults struct + Checks []QueryCheck + LatencyChecks []QueryLatencyCheck + LatencySentinel LatencySentinelProof + MCPTools []MCPToolCall + PrefillRangeEnd time.Time + PrefillRangeStart time.Time + PrefillSeries int + PrefillServices int + PrefillWindows int + type RecoveryLogStats struct + Duration time.Duration + FinalizedWindows int + Found bool + Line string + Path string + ReplayedRows int + ReplayedSeries int + SeededBaselines int + SkippedSeries int + func ParseRecoveryLog(body string) (RecoveryLogStats, error) + type RecoveryResult struct + Bounds CrashBoundReport + CrashIntervalSec float64 + DurationSec float64 + FinalizedWindows int + KillSignal string + KilledAt time.Time + KilledPID int + ReadyAt time.Time + ReadyObserved bool + ReplayedRows int + ReplayedSeries int + RestartedAt time.Time + SeededBaselines int + SkippedSeries int + StatsFound bool + StatsSource string + TimeToReadySec float64 + type Result struct + Assertions []Assertion + Backlog BacklogTrend + Commands []Command + Config Config + Confinement Confinement + Disk DiskResult + DurabilityClaim string + DurationSec float64 + EndedAt time.Time + Failures []string + Gaps []string + GateVersion string + Host HostInfo + Load LoadResults + Memory MemoryResult + MetricSeries []MetricSample + Passed bool + Phases []Phase + Projection Projection + Provenance Provenance + Queries QueryResults + Recovery RecoveryResult + RunID string + Schema string + ServerEnv map[string]string + StartedAt time.Time + func (r *Result) Finalize() + type SamplingConfig struct + BacklogMetric string + ChargedBytesMetric string + IntervalSec float64 + Metrics []string + RequiredMetrics []string + SteadyStartOffsetSec float64 + type Thresholds struct + AckP99MaxMs float64 + AckRatioMin float64 + BacklogAllowanceFloorRows float64 + BacklogAllowanceFraction float64 + BacklogMinSamples int + BurstPointsPerSec float64 + BurstRecoverySeconds float64 + BurstSeconds float64 + ColdQueryMaxSeconds float64 + DiskAggregateMaxBytes int64 + DiskDLQMaxBytes int64 + DiskFreeMinBytes int64 + DiskMainMaxBytes int64 + DiskTotalMaxBytes int64 + DiskWALTempTLSMaxBytes int64 + MCPQueryMaxSeconds float64 + MaxAdmissionRejectedDelta float64 + MaxIdentityOverflowDelta float64 + MaxIngestPipelineDropDelta float64 + MaxLatePointsDelta float64 + MaxOOMKills int64 + MaxResourceExhausted int64 + MaxSkippedSeries int + MemoryPeakMaxBytes int64 + PrefillSeries int + PrefillServices int + PrefillWindows int + ProbeMaxSeconds float64 + ProjectionHorizonWindows int + ProjectionMinSamples int + ProjectionMinWindowSpan float64 + ProjectionZ float64 + ReadySeconds float64 + RequiredCoverage string + SevenDayQueryMaxSeconds float64 + SustainedHours float64 + SustainedPointsPerSec float64 + SustainedRateTolerance float64 + WarmQueryP95MaxSeconds float64 + func DefaultThresholds() Thresholds + type TierSpecConfig struct + AggregateDBFile string + DLQDir string + MainDBFile string + TLSDir string + func (t TierSpecConfig) Spec() ClassifySpec + type TimedValue struct + OffsetSec float64 + Value float64 + func MetricSeriesIn(samples []MetricSample, phase, key string) []TimedValue + type WindowBound struct + Acked int64 + Attempted int64 + CrashAffected bool + Exact bool + Observed int64 + ObservedFound bool + Pass bool + Reason string + WindowStart int64 + type WindowPoint struct + Count int64 + ErrorCount int64 + RequestErrors int64 + Requests int64 + SpanErrors int64 + Spans int64 + Timestamp time.Time + func ParseWindowPoints(body []byte) ([]WindowPoint, error) v0.5.0-rc.3 Sep 4, 2026 v0.5.0-rc.2 Sep 4, 2026 v0.5.0-rc.1 Sep 4, 2026 v0.4.0-rc.3 Sep 3, 2026 v0.4.0-rc.2 Sep 3, 2026 v0.4.0-rc.1 Sep 3, 2026 v0.4.0-beta.2 Aug 24, 2026