qualification

package
v0.1.0-alpha.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package qualification runs operational checks and records evidence for releases.

It is separate from storage tests so reports come from the same executable that performs the checks and records its source revision.

Index

Constants

View Source
const MaxAnchorHistoryOperations = 24

MaxAnchorHistoryOperations bounds the number of operations searched by the history checker.

View Source
const RaceEnabled = false

RaceEnabled reports whether this binary was built with the race detector.

View Source
const SoakReceiptSchemaVersion uint32 = 4

SoakReceiptSchemaVersion identifies the storage soak report format.

Variables

This section is empty.

Functions

func ValidateSoakOptions

func ValidateSoakOptions(options SoakOptions) error

ValidateSoakOptions checks workload limits and the environment evidence required by the selected profile.

Types

type AnchorHistory

type AnchorHistory struct {
	Initial    AnchorHistoryValue       `json:"initial"`
	Operations []AnchorHistoryOperation `json:"operations"`
}

AnchorHistory contains an initial anchor state and the operations to check.

type AnchorHistoryCheck

type AnchorHistoryCheck struct {
	Linearizable   bool                `json:"linearizable"`
	ExploredStates uint64              `json:"exploredStates"`
	Linearization  []AnchorHistoryStep `json:"linearization"`
	Violation      string              `json:"violation,omitempty"`
}

AnchorHistoryCheck reports whether a history admits a valid sequential ordering.

func CheckAnchorHistory

func CheckAnchorHistory(history AnchorHistory) (AnchorHistoryCheck, error)

CheckAnchorHistory checks whether anchor operations can be ordered without violating monotonic updates.

A failed advance may have taken effect or left the anchor unchanged. Failed loads leave it unchanged. Invoke and Return are unique controller-assigned event numbers rather than wall-clock timestamps.

type AnchorHistoryOperation

type AnchorHistoryOperation struct {
	ID      string                     `json:"id"`
	Kind    AnchorHistoryOperationKind `json:"kind"`
	Outcome AnchorHistoryOutcome       `json:"outcome"`
	Invoke  uint64                     `json:"invoke"`
	Return  uint64                     `json:"return"`
	Value   AnchorHistoryValue         `json:"value"`
}

AnchorHistoryOperation records an operation's observed result and invocation interval.

type AnchorHistoryOperationKind

type AnchorHistoryOperationKind string

AnchorHistoryOperationKind identifies an anchor read or advance.

const (
	// AnchorHistoryLoad marks an anchor read.
	AnchorHistoryLoad AnchorHistoryOperationKind = "load"
	// AnchorHistoryAdvance marks an attempted anchor advance.
	AnchorHistoryAdvance AnchorHistoryOperationKind = "advance"
)

type AnchorHistoryOutcome

type AnchorHistoryOutcome string

AnchorHistoryOutcome records whether an operation reported success or failure.

const (
	// AnchorHistorySucceeded marks an operation that reported success.
	AnchorHistorySucceeded AnchorHistoryOutcome = "succeeded"
	// AnchorHistoryFailed marks an operation that reported failure.
	AnchorHistoryFailed AnchorHistoryOutcome = "failed"
)

type AnchorHistoryStep

type AnchorHistoryStep struct {
	OperationID      string `json:"operationId"`
	AmbiguousApplied bool   `json:"ambiguousApplied"`
}

AnchorHistoryStep identifies an operation in a valid ordering and whether an uncertain write took effect.

type AnchorHistoryValue

type AnchorHistoryValue struct {
	Exists         bool     `json:"exists"`
	DatabaseID     [16]byte `json:"databaseId"`
	CommitSequence uint64   `json:"commitSequence"`
	Generation     uint64   `json:"generation"`
}

AnchorHistoryValue represents a stored anchor or its absence in the reference model.

type SoakOptions

type SoakOptions struct {
	TargetDirectory  string
	Profile          string
	Seconds          int
	Documents        int
	Reopens          int
	SourceRevision   string
	BuildRevision    string
	BuildModified    bool
	Volume           VolumeIdentity
	ProgressInterval time.Duration
	Progress         func(SoakProgress)
}

SoakOptions configures the target volume, workload, build evidence, and progress reporting.

type SoakPhaseReceipt

type SoakPhaseReceipt struct {
	Ordinal              int           `json:"ordinal"`
	Duration             time.Duration `json:"durationNanos"`
	ConcurrentDuration   time.Duration `json:"concurrentDurationNanos"`
	Writes               uint64        `json:"writes"`
	SnapshotReads        uint64        `json:"snapshotReads"`
	IndexBuildBatches    uint64        `json:"indexBuildBatches"`
	ReclamationAttempts  uint64        `json:"reclamationAttempts"`
	ReclamationConflicts uint64        `json:"reclamationConflicts"`
	CommitSequence       uint64        `json:"commitSequence"`
	PhysicalPages        uint64        `json:"physicalPages"`
	ReusablePages        uint64        `json:"reusablePages"`
	IndexBuildPhase      uint8         `json:"indexBuildPhase"`
}

SoakPhaseReceipt records workload activity and storage state for one completed phase.

type SoakProgress

type SoakProgress struct {
	Stage                SoakProgressStage
	Phase                int
	TotalPhases          int
	Elapsed              time.Duration
	ConcurrentDuration   time.Duration
	Writes               uint64
	SnapshotReads        uint64
	IndexBuildBatches    uint64
	ReclamationAttempts  uint64
	ReclamationConflicts uint64
}

SoakProgress reports the current stage, elapsed time, and workload counters.

type SoakProgressStage

type SoakProgressStage string

SoakProgressStage identifies the current step of a storage soak run.

const (
	// SoakProgressStarted marks the start of the soak run.
	SoakProgressStarted SoakProgressStage = "started"
	// SoakProgressPhaseRunning marks an active concurrent workload phase.
	SoakProgressPhaseRunning SoakProgressStage = "phase_running"
	// SoakProgressPhaseVerifying marks verification after a workload phase.
	SoakProgressPhaseVerifying SoakProgressStage = "phase_verifying"
	// SoakProgressPhaseVerified marks successful phase verification.
	SoakProgressPhaseVerified SoakProgressStage = "phase_verified"
	// SoakProgressShadowVerifying marks shadow index verification.
	SoakProgressShadowVerifying SoakProgressStage = "shadow_verifying"
	// SoakProgressShadowVerified marks successful shadow index verification.
	SoakProgressShadowVerified SoakProgressStage = "shadow_verified"
	// SoakProgressFinalVerifying marks verification of the final database file.
	SoakProgressFinalVerifying SoakProgressStage = "final_verifying"
	// SoakProgressComplete marks completion of the soak run.
	SoakProgressComplete SoakProgressStage = "complete"
)

type SoakReceipt

type SoakReceipt struct {
	SchemaVersion         uint32             `json:"schemaVersion"`
	FormatRevision        uint16             `json:"formatRevision"`
	Engine                string             `json:"engine"`
	Profile               string             `json:"profile"`
	RaceEnabled           bool               `json:"raceEnabled"`
	GOOS                  string             `json:"goos"`
	GOARCH                string             `json:"goarch"`
	GoVersion             string             `json:"goVersion"`
	SourceRevision        string             `json:"sourceRevision,omitempty"`
	BuildRevision         string             `json:"buildRevision,omitempty"`
	BuildModified         bool               `json:"buildModified"`
	Device                uint64             `json:"device"`
	FilesystemType        string             `json:"filesystemType"`
	FilesystemName        string             `json:"filesystemName"`
	BlockSize             uint64             `json:"blockSize"`
	StartedAt             time.Time          `json:"startedAt"`
	FinishedAt            time.Time          `json:"finishedAt"`
	RequestedSeconds      int                `json:"requestedSeconds"`
	ConcurrentDuration    time.Duration      `json:"concurrentDurationNanos"`
	ActualDuration        time.Duration      `json:"actualDurationNanos"`
	Documents             int                `json:"documents"`
	RequestedReopens      int                `json:"requestedReopens"`
	CompletedReopens      int                `json:"completedReopens"`
	Writes                uint64             `json:"writes"`
	SnapshotReads         uint64             `json:"snapshotReads"`
	IndexBuildBatches     uint64             `json:"indexBuildBatches"`
	ReclamationAttempts   uint64             `json:"reclamationAttempts"`
	ReclamationConflicts  uint64             `json:"reclamationConflicts"`
	FinalCommitSequence   uint64             `json:"finalCommitSequence"`
	FinalFileBytes        uint64             `json:"finalFileBytes"`
	FinalPhysicalPages    uint64             `json:"finalPhysicalPages"`
	FinalReachablePages   uint64             `json:"finalReachablePages"`
	FinalReclaimablePages uint64             `json:"finalReclaimablePages"`
	FinalFileSHA256       string             `json:"finalFileSha256"`
	PersistentFreeSpace   bool               `json:"persistentFreeSpace"`
	FreeSpaceValid        bool               `json:"freeSpaceValid"`
	SemanticIndexes       bool               `json:"semanticIndexesVerified"`
	SemanticIndexBuilds   bool               `json:"semanticIndexBuildsVerified"`
	FinalIndexBuildAbsent bool               `json:"finalIndexBuildAbsent"`
	Phases                []SoakPhaseReceipt `json:"phases"`
}

SoakReceipt records the environment, workload totals, and final verification evidence for a soak run.

func RunStorageSoak

func RunStorageSoak(ctx context.Context, options SoakOptions) (_ SoakReceipt, resultErr error)

RunStorageSoak runs and verifies a concurrent storage workload across repeated reopens and returns its evidence report.

type VolumeIdentity

type VolumeIdentity struct {
	Device         uint64
	FilesystemType string
	FilesystemName string
	BlockSize      uint64
}

VolumeIdentity describes the device and filesystem used for qualification.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL