doccorpus

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 25 Imported by: 0

Documentation

Overview

Package doccorpus compiles the proposed DCP-V1 documentation evidence profile. Identity validation does not establish semantic truth or accepted intent.

Index

Constants

View Source
const (
	BehaviorAdapterRequestSchema = "corvint-behavior-adapter-request/1"
	BehaviorAdapterResultSchema  = "corvint-behavior-adapter-result/1"
)
View Source
const (
	StabilitySchema                 = "corvint-playwright-stability/1"
	BehaviorStabilityProviderSchema = "corvint-corpus-behavior-stability-provider/1"
	StabilityTopologySchema         = "corvint-playwright-stability-topology/1"
)
View Source
const (
	Schema         = "corvint-evidence-corpus/1"
	ManifestSchema = "corvint-corpus-input/1"
	ProviderSchema = "corvint-corpus-provider/1"
	ReceiptSchema  = "corvint-corpus-receipt/1"
	MaxBytes       = 4 << 20
	MaxRecords     = 4096
	MaxResults     = 256
)
View Source
const BehaviorProviderSchema = "corvint-corpus-behavior-provider/1"

BehaviorProviderSchema is experimental: declarations never authorize narrowing.

Variables

This section is empty.

Functions

func CEMProjection

func CEMProjection(ctx context.Context, root string, a *Artifact, data []byte, claimID string) (map[string]any, error)

CEMProjection preserves the immutable original span and carries corpus provenance beside the frozen wire. It never cites generated prose as intent.

func CapabilityFor

func CapabilityFor(operation string) string

func Digest

func Digest(data []byte) string

func Encode

func Encode(value any) ([]byte, error)

func Freshness

func Freshness(ctx context.Context, root string, a *Artifact) (string, []string, error)

Freshness is a live overlay; it never rewrites the immutable artifact.

func Impact

func Impact(a *Artifact, paths []string, freshness string) map[string]any

Impact connects exact path/symbol anchors to subjects and explicit directed relations. It does not infer a dependency from shared citations.

func ReadFile

func ReadFile(root, path string) ([]byte, error)

Types

type Anchor

type Anchor struct {
	Repository string `json:"repository"`
	Revision   string `json:"revision"`
	Path       string `json:"path"`
	Blob       string `json:"blob"`
	SHA256     string `json:"sha256"`
	Start      int    `json:"start_line"`
	End        int    `json:"end_line"`
	SpanSHA256 string `json:"span_sha256"`
	Symbol     string `json:"symbol"`
	Region     string `json:"region"`
	Authority  string `json:"authority"`
	Kind       string `json:"evidence_kind"`
	Reason     string `json:"reason"`
}

type Artifact

type Artifact struct {
	BehaviorContracts []BehaviorReport  `json:"behavior_contracts,omitempty"`
	StabilityEvidence []StabilityReport `json:"stability_evidence,omitempty"`
	Schema            string            `json:"schema"`
	Builder           Builder           `json:"builder"`
	Manifest          Manifest          `json:"manifest"`
	ManifestSHA256    string            `json:"manifest_sha256"`
	ProfileSHA256     string            `json:"profile_sha256"`
	Tree              string            `json:"tree"`
	Subjects          []Subject         `json:"subjects"`
	Claims            []Claim           `json:"claims"`
	Relations         []Relation        `json:"relations"`
	Journeys          []Journey         `json:"journeys"`
	Observations      []Observation     `json:"observations"`
	Capabilities      []Capability      `json:"capabilities"`
	Gaps              []Gap             `json:"gaps"`
	SHA256            string            `json:"sha256"`
}

func Build

func Build(ctx context.Context, root string, m Manifest) (*Artifact, error)

Build compiles only original immutable inputs. No output is written to disk.

func Open

func Open(ctx context.Context, root string, data []byte) (*Artifact, error)

Open reconstructs all derived records before allowing a query.

func ParseArtifact

func ParseArtifact(data []byte) (*Artifact, error)

func (*Artifact) HasCapability

func (a *Artifact) HasCapability(name string) bool

type BehaviorAdapterArtifact

type BehaviorAdapterArtifact struct {
	Role     string `json:"role"`
	Input    string `json:"input"`
	Anchor   Anchor `json:"anchor"`
	SHA256   string `json:"sha256"`
	Document string `json:"document"`
}

type BehaviorAdapterClaimRecord

type BehaviorAdapterClaimRecord struct {
	TestID string                   `json:"test_id"`
	Claim  BehaviorAdapterTestClaim `json:"claim"`
}

type BehaviorAdapterCoverage

type BehaviorAdapterCoverage struct {
	Metric      string   `json:"metric"`
	Value       int      `json:"value"`
	Denominator int      `json:"denominator"`
	Defined     bool     `json:"defined"`
	State       string   `json:"state"`
	Revision    string   `json:"revision"`
	Rule        string   `json:"rule"`
	Limitations []string `json:"limitations"`
}

type BehaviorAdapterDelta

type BehaviorAdapterDelta struct {
	AddedCriteria     []string `json:"added_criteria"`
	RemovedCriteria   []string `json:"removed_criteria"`
	ChangedCriteria   []string `json:"changed_criteria"`
	LostReverseLinks  []string `json:"lost_reverse_links"`
	PreviousAvailable bool     `json:"previous_available"`
}

type BehaviorAdapterDiagnostic

type BehaviorAdapterDiagnostic struct {
	Kind       string `json:"kind"`
	Subject    string `json:"subject"`
	Input      string `json:"input"`
	Field      string `json:"field"`
	Revision   string `json:"revision"`
	Digest     string `json:"digest"`
	Detail     string `json:"detail"`
	Correction string `json:"correction"`
}

type BehaviorAdapterInput

type BehaviorAdapterInput struct {
	ID       string `json:"id"`
	Anchor   Anchor `json:"anchor"`
	Document string `json:"document"`
}

type BehaviorAdapterMapping

type BehaviorAdapterMapping struct {
	Kind    string            `json:"kind"`
	Input   string            `json:"input"`
	Records string            `json:"records"`
	Fields  map[string]string `json:"fields"`
}

type BehaviorAdapterOutcome

type BehaviorAdapterOutcome struct {
	ID       string `json:"id"`
	Behavior string `json:"behavior"`
	Matcher  string `json:"matcher"`
	Locator  string `json:"locator"`
	Value    string `json:"value"`
}

type BehaviorAdapterRequest

type BehaviorAdapterRequest struct {
	Schema                string                   `json:"schema"`
	ProviderID            string                   `json:"provider_id"`
	ProviderVersion       string                   `json:"provider_version"`
	ContractID            string                   `json:"contract_id"`
	Source                Repository               `json:"source"`
	Revisions             BehaviorRevisions        `json:"revisions"`
	SourceRevision        string                   `json:"source_revision"`
	DocumentationRevision string                   `json:"documentation_revision"`
	MigrationInput        string                   `json:"migration_input"`
	DiscoveryInput        string                   `json:"discovery_input"`
	Inputs                []BehaviorAdapterInput   `json:"inputs"`
	Mappings              []BehaviorAdapterMapping `json:"mappings"`
	Observations          []ObservationLink        `json:"observations"`
}

type BehaviorAdapterResult

type BehaviorAdapterResult struct {
	Schema      string                       `json:"schema"`
	Provider    ProviderRecord               `json:"provider"`
	Variations  []BehaviorAdapterVariation   `json:"variations"`
	Claims      []BehaviorAdapterClaimRecord `json:"claims"`
	Artifacts   []BehaviorAdapterArtifact    `json:"artifacts"`
	Coverage    []BehaviorAdapterCoverage    `json:"coverage"`
	Frontier    []BehaviorAdapterDiagnostic  `json:"frontier"`
	Delta       BehaviorAdapterDelta         `json:"delta"`
	Fallback    string                       `json:"fallback"`
	Limitations []string                     `json:"limitations"`
}

func BuildBehaviorAdapter

func BuildBehaviorAdapter(requestRaw, previousRaw []byte) (BehaviorAdapterResult, error)

type BehaviorAdapterTestClaim

type BehaviorAdapterTestClaim struct {
	VariationID     string   `json:"variation_id"`
	Preconditions   []string `json:"preconditions"`
	Actions         []string `json:"actions"`
	ObservableFacts []string `json:"observable_facts"`
}

type BehaviorAdapterVariation

type BehaviorAdapterVariation struct {
	ID               string                   `json:"variation_id"`
	Flow             string                   `json:"flow"`
	Preconditions    []string                 `json:"preconditions"`
	Actions          []string                 `json:"actions"`
	ObservableFacts  []string                 `json:"observable_facts"`
	ExpectedOutcomes []BehaviorAdapterOutcome `json:"expected_outcomes"`
	Projects         []string                 `json:"projects"`
	Tests            []string                 `json:"tests"`
}

type BehaviorAssertion

type BehaviorAssertion struct {
	ID         string `json:"id"`
	Behavior   string `json:"behavior"`
	Criterion  string `json:"criterion"`
	Annotation Anchor `json:"reviewed_annotation"`
	Matcher    string `json:"matcher"`
	Locator    string `json:"locator"`
	Value      string `json:"value"`
}

type BehaviorDiscovery

type BehaviorDiscovery struct {
	Schema     string              `json:"schema"`
	Mode       string              `json:"mode"`
	Revisions  BehaviorRevisions   `json:"revisions"`
	Config     Anchor              `json:"config"`
	Executions []BehaviorExecution `json:"executions"`
}

type BehaviorEvent

type BehaviorEvent struct {
	Context    string `json:"browser_context"`
	Page       string `json:"page"`
	Frame      string `json:"frame"`
	Navigation string `json:"navigation"`
	ParentPage string `json:"parent_page"`
	Behavior   string `json:"behavior"`
	Criterion  string `json:"criterion"`
	Matcher    string `json:"matcher"`
	Locator    string `json:"locator"`
	Value      string `json:"value"`
	Sequence   int    `json:"sequence"`
	Kind       string `json:"kind"`
	ID         string `json:"id"`
	Passed     bool   `json:"passed"`
}

type BehaviorExecution

type BehaviorExecution struct {
	ID       string `json:"id"`
	Project  string `json:"project"`
	Evidence Anchor `json:"evidence"`
}

type BehaviorFlow

type BehaviorFlow struct {
	Derivation       string          `json:"derivation"`
	ID               string          `json:"id"`
	Evidence         Anchor          `json:"evidence"`
	Criteria         []string        `json:"criteria"`
	Tests            []string        `json:"tests"`
	RequiredPages    []string        `json:"required_pages"`
	NegativeControls []string        `json:"negative_controls"`
	OrderedEvents    []BehaviorEvent `json:"ordered_events"`
	MissingReview    *Anchor         `json:"missing_e2e_review,omitempty"`
}

type BehaviorLegacyCase

type BehaviorLegacyCase struct {
	ID             string                    `json:"id"`
	Suite          string                    `json:"suite"`
	Case           string                    `json:"case"`
	Evidence       Anchor                    `json:"evidence"`
	State          string                    `json:"state"`
	Fixtures       []string                  `json:"fixtures"`
	Roles          []string                  `json:"roles"`
	Criteria       []BehaviorLegacyCriterion `json:"criteria"`
	Runtime        *BehaviorRuntime          `json:"runtime,omitempty"`
	RuntimeTestID  string                    `json:"runtime_test_id,omitempty"`
	RuntimeProject string                    `json:"runtime_project,omitempty"`
}

Legacy criteria describe observables, not test-name similarity or inferred intent.

type BehaviorLegacyCriterion

type BehaviorLegacyCriterion struct {
	ID       string `json:"id"`
	Evidence Anchor `json:"evidence"`
	Matcher  string `json:"matcher"`
	Locator  string `json:"locator"`
	Value    string `json:"value"`
}

type BehaviorLegacyMapping

type BehaviorLegacyMapping struct {
	Criterion       string `json:"criterion"`
	LegacyCase      string `json:"legacy_case"`
	LegacyCriterion string `json:"legacy_criterion"`
	Relation        string `json:"relation"`
	Review          Anchor `json:"review"`
}

type BehaviorLegacyRun

type BehaviorLegacyRun struct {
	Schema         string                    `json:"schema"`
	ContractSHA256 string                    `json:"contract_sha256"`
	Revisions      BehaviorRevisions         `json:"revisions"`
	CaseID         string                    `json:"case_id"`
	SourceSHA256   string                    `json:"source_sha256"`
	RunSHA256      string                    `json:"run_sha256"`
	TestID         string                    `json:"test_id"`
	Project        string                    `json:"project"`
	Retry          int                       `json:"retry"`
	Cleanup        string                    `json:"cleanup"`
	Fixtures       []string                  `json:"fixtures"`
	Roles          []string                  `json:"roles"`
	Criteria       []BehaviorLegacyCriterion `json:"criteria"`
}

type BehaviorMigration

type BehaviorMigration struct {
	Revisions             BehaviorRevisions `json:"revisions"`
	Schema                int               `json:"schema"`
	ContractID            string            `json:"contract_id"`
	SourceRevision        string            `json:"source_revision"`
	DocumentationRevision string            `json:"documentation_revision"`
}

type BehaviorRegistry

type BehaviorRegistry struct {
	Revisions             BehaviorRevisions    `json:"revisions"`
	Discovery             Anchor               `json:"discovery"`
	Schema                int                  `json:"schema"`
	ContractID            string               `json:"contract_id"`
	ContractSHA256        string               `json:"contract_sha256"`
	SourceRevision        string               `json:"source_revision"`
	DocumentationRevision string               `json:"documentation_revision"`
	Manifest              Anchor               `json:"migration_manifest"`
	Flows                 []BehaviorFlow       `json:"flows"`
	Behaviors             []BehaviorSource     `json:"source_behaviors"`
	Tests                 []BehaviorTest       `json:"tests"`
	Legacy                []BehaviorLegacyCase `json:"legacy,omitempty"`
	Stability             *StabilityRegistry   `json:"stability,omitempty"`
}

type BehaviorReport

type BehaviorReport struct {
	Discovery           BehaviorDiscovery `json:"discovery"`
	Provider            string            `json:"provider"`
	Registry            BehaviorRegistry  `json:"registry"`
	VerifiedTests       []string          `json:"verified_tests"`
	LinkedFlows         []string          `json:"linked_flows"`
	LinkedBehaviors     []string          `json:"linked_behaviors"`
	VerifiedFlows       []string          `json:"verified_flows"`
	Fallback            string            `json:"fallback"`
	Limitations         []string          `json:"limitations"`
	LegacyRuntimeParity []string          `json:"legacy_runtime_parity"`
}

type BehaviorRevisions

type BehaviorRevisions struct {
	App  Repository `json:"app"`
	E2E  Repository `json:"golf_e2e"`
	Docs Repository `json:"docs_corpus"`
}

type BehaviorRun

type BehaviorRun struct {
	Fixtures              []string          `json:"fixtures,omitempty"`
	Roles                 []string          `json:"roles,omitempty"`
	Revisions             BehaviorRevisions `json:"revisions"`
	Schema                string            `json:"schema"`
	ContractID            string            `json:"contract_id"`
	ContractSHA256        string            `json:"contract_sha256"`
	SourceRevision        string            `json:"source_revision"`
	DocumentationRevision string            `json:"documentation_revision"`
	RunSHA256             string            `json:"run_sha256"`
	TestID                string            `json:"test_id"`
	Project               string            `json:"project"`
	Retry                 int               `json:"retry"`
	Cleanup               string            `json:"cleanup"`
	Events                []BehaviorEvent   `json:"events"`
}

BehaviorRun is a separate, digest-pinned ordered witness, not a passing-test claim.

type BehaviorRuntime

type BehaviorRuntime struct {
	Evidence    Anchor `json:"evidence"`
	Observation string `json:"observation"`
}

type BehaviorSource

type BehaviorSource struct {
	ID       string   `json:"id"`
	Evidence Anchor   `json:"evidence"`
	Flows    []string `json:"flows"`
}

type BehaviorTest

type BehaviorTest struct {
	ID         string                  `json:"id"`
	Project    string                  `json:"project"`
	Title      string                  `json:"title"`
	Evidence   Anchor                  `json:"evidence"`
	Flows      []string                `json:"flows"`
	Criteria   []string                `json:"criteria"`
	Assertions []BehaviorAssertion     `json:"assertions"`
	Runtime    *BehaviorRuntime        `json:"runtime,omitempty"`
	Legacy     []BehaviorLegacyMapping `json:"legacy_criteria,omitempty"`
	Fixtures   []string                `json:"fixtures,omitempty"`
	Roles      []string                `json:"roles,omitempty"`
}

type Builder

type Builder struct {
	Version  string `json:"version"`
	Revision string `json:"revision"`
	Engine   string `json:"engine"`
}

type Capability

type Capability struct {
	Name        string   `json:"name"`
	State       string   `json:"state"`
	Reason      string   `json:"reason"`
	Records     []string `json:"records"`
	Providers   []string `json:"providers"`
	Tools       []string `json:"tools"`
	Count       int      `json:"count"`
	Denominator int      `json:"denominator"`
	Rule        string   `json:"rule"`
}

type CapabilityDeclaration

type CapabilityDeclaration struct {
	Name   string `json:"name"`
	State  string `json:"state"`
	Reason string `json:"reason"`
}

type Claim

type Claim struct {
	ID       string   `json:"id"`
	Subject  string   `json:"subject"`
	Text     string   `json:"text"`
	Provider string   `json:"provider"`
	Evidence Evidence `json:"evidence"`
}

type Error

type Error struct {
	Code    string
	Message string
}

func (*Error) Error

func (e *Error) Error() string

type Evidence

type Evidence struct {
	ReportedTrust string   `json:"reported_trust"`
	Derivation    string   `json:"derivation"`
	Trust         string   `json:"trust"`
	State         string   `json:"state"`
	Freshness     string   `json:"freshness"`
	Anchors       []Anchor `json:"anchors"`
	Unknown       string   `json:"unknown"`
	Limitations   []string `json:"limitations"`
}

type Gap

type Gap struct {
	Subject string `json:"subject"`
	Kind    string `json:"kind"`
	Reason  string `json:"reason"`
}

type Input

type Input struct {
	Path     string `json:"path"`
	Revision string `json:"revision"`
	Blob     string `json:"blob"`
	SHA256   string `json:"sha256"`
	Provider string `json:"provider"`
	Purpose  string `json:"purpose"`
}

type Journey

type Journey struct {
	ID            string   `json:"id"`
	Subject       string   `json:"subject"`
	Provider      string   `json:"provider"`
	Status        string   `json:"status"`
	Preconditions []string `json:"preconditions"`
	Cleanup       string   `json:"cleanup"`
	Steps         []Step   `json:"steps"`
	Evidence      Evidence `json:"evidence"`
}

type JourneyRun

type JourneyRun struct {
	Schema         string            `json:"schema"`
	RunSHA256      string            `json:"run_sha256"`
	SourceRevision string            `json:"source_revision"`
	Package        string            `json:"package"`
	Test           string            `json:"test"`
	Cleanup        string            `json:"cleanup"`
	Steps          []StepObservation `json:"steps"`
}

JourneyRun is independently retained step observation data. A native passing test alone cannot populate these ordered expected/observed records.

type Maintenance

type Maintenance struct {
	Schema         string `json:"schema"`
	ArtifactSHA256 string `json:"artifact_sha256"`
	Page           string `json:"page"`
	Before         string `json:"before_sha256"`
	After          string `json:"after_sha256"`
	Recovery       string `json:"recovery_path"`
	Applied        bool   `json:"applied"`
	Proposed       string `json:"proposed"`
}

func Maintain

func Maintain(root, page string, a *Artifact, apply bool) (Maintenance, error)

Maintain derives the proposal in-process. It never accepts caller-authored replacement bytes or a serialized preview as write authority.

type Manifest

type Manifest struct {
	BehaviorRevisions *BehaviorRevisions `json:"behavior_revisions,omitempty"`
	Schema            string             `json:"schema"`
	Repository        Repository         `json:"repository"`
	BuiltAt           string             `json:"built_at"`
	Profile           Profile            `json:"profile"`
	Scopes            []Scope            `json:"scopes"`
	Inputs            []Input            `json:"inputs"`
	Providers         []Provider         `json:"providers"`
	MergeRule         string             `json:"merge_rule"`
}

func Inventory

func Inventory(ctx context.Context, root, revision, scope, timestamp string) (Manifest, error)

Inventory creates an explicit manifest candidate; it grants no authority.

func ParseManifest

func ParseManifest(data []byte) (Manifest, error)

type Observation

type Observation struct {
	Trust       string                   `json:"trust"`
	Limitations []string                 `json:"limitations"`
	Link        ObservationLink          `json:"link"`
	InputSHA256 string                   `json:"input_sha256"`
	Document    testvaliditydoc.Document `json:"document"`
}
type ObservationLink struct {
	TestID         string            `json:"test_id,omitempty"`
	Project        string            `json:"project,omitempty"`
	StepInput      string            `json:"step_input"`
	StepRevision   string            `json:"step_revision"`
	SourcePaths    map[string]string `json:"source_paths"`
	ID             string            `json:"id"`
	Subject        string            `json:"subject"`
	Input          string            `json:"input"`
	InputRevision  string            `json:"input_revision"`
	SourceRevision string            `json:"source_revision"`
	RunID          string            `json:"run_id"`
	Package        string            `json:"package"`
	Test           string            `json:"test"`
	StepEvidence   []Anchor          `json:"step_evidence"`
}

ObservationLink refers to a retained native receipt by immutable input path. Its package/name join is exact, and StepEvidence proves only the provider's recorded expected observation, not an independently assessed assertion.

type Profile

type Profile struct {
	ID       string   `json:"id"`
	Revision string   `json:"revision"`
	Title    string   `json:"title"`
	Format   string   `json:"format"`
	Groups   []string `json:"groups"`
}

type Provider

type Provider struct {
	ID       string `json:"id"`
	Kind     string `json:"kind"`
	Version  string `json:"version"`
	Revision string `json:"revision"`
	Record   string `json:"record"`
}

type ProviderRecord

type ProviderRecord struct {
	BehaviorContracts *BehaviorRegistry       `json:"behavior_contracts,omitempty"`
	Schema            string                  `json:"schema"`
	ID                string                  `json:"id"`
	Version           string                  `json:"version"`
	Source            Repository              `json:"source"`
	Subjects          []Subject               `json:"subjects"`
	Claims            []Claim                 `json:"claims"`
	Relations         []Relation              `json:"relations"`
	Journeys          []Journey               `json:"journeys"`
	Observations      []ObservationLink       `json:"observations"`
	Capabilities      []CapabilityDeclaration `json:"capabilities"`
}

type Receipt

type Receipt struct {
	Schema         string       `json:"schema"`
	Operation      string       `json:"operation"`
	ArtifactSHA256 string       `json:"artifact_sha256"`
	Repository     Repository   `json:"repository"`
	Tree           string       `json:"tree"`
	Trust          string       `json:"trust"`
	Freshness      string       `json:"freshness"`
	State          string       `json:"state"`
	Miss           string       `json:"miss"`
	Results        []any        `json:"results"`
	Citations      []Anchor     `json:"citations"`
	Capabilities   []Capability `json:"capabilities"`
	Limitations    []string     `json:"limitations"`
	Omitted        int          `json:"omitted"`
}

func Query

func Query(a *Artifact, request Request, freshness string, limitations []string) (Receipt, error)

Query consumes an already validated artifact. Entry points must call Open; pure callers can use the artifact returned by Build in the same operation.

func ReadQuery

func ReadQuery(ctx context.Context, root string, data []byte, request Request) (Receipt, error)

type Relation

type Relation struct {
	ID       string   `json:"id"`
	From     string   `json:"from"`
	To       string   `json:"to"`
	Type     string   `json:"type"`
	Provider string   `json:"provider"`
	Evidence Evidence `json:"evidence"`
}

type Rendered

type Rendered struct {
	Schema         string            `json:"schema"`
	ArtifactSHA256 string            `json:"artifact_sha256"`
	ProfileSHA256  string            `json:"profile_sha256"`
	Derivation     string            `json:"derivation"`
	Files          map[string]string `json:"files"`
}

func Render

func Render(a *Artifact) (Rendered, error)

type Repository

type Repository struct {
	ID       string `json:"id"`
	Revision string `json:"revision"`
}

type Request

type Request struct {
	Operation string `json:"operation"`
	Query     string `json:"query"`
	ID        string `json:"id"`
	Path      string `json:"path"`
	Limit     int    `json:"limit"`
}

type Scope

type Scope struct {
	Path     string `json:"path"`
	Revision string `json:"revision"`
}

type StabilityAggregate

type StabilityAggregate struct {
	ID             string                  `json:"id"`
	Scope          string                  `json:"scope"`
	PolicyID       string                  `json:"policy_id"`
	Planned        int                     `json:"planned"`
	TestID         string                  `json:"test_id"`
	Project        string                  `json:"project"`
	ContractID     string                  `json:"contract_id"`
	ContractSHA256 string                  `json:"contract_sha256"`
	Contributions  []StabilityContribution `json:"contributions"`
}

type StabilityAttempt

type StabilityAttempt struct {
	Retry        int                              `json:"retry"`
	State        string                           `json:"state"`
	FailureClass string                           `json:"failure_class"`
	Artifacts    []jstestprovider.FailureArtifact `json:"artifacts"`
	Cleanup      string                           `json:"cleanup"`
}

type StabilityContribution

type StabilityContribution struct {
	RunKind     string                   `json:"run_kind"`
	Repetition  int                      `json:"repetition"`
	ManualRunID string                   `json:"manual_run_id,omitempty"`
	Receipt     StabilityReceiptInput    `json:"receipt"`
	SourcePaths map[string]string        `json:"source_paths"`
	Identity    StabilityIdentity        `json:"identity"`
	Topology    StabilityTopologyBinding `json:"topology"`
	Cleanup     string                   `json:"cleanup"`
	Attempts    []StabilityAttempt       `json:"attempts"`
}

type StabilityCounts

type StabilityCounts struct {
	Planned              int `json:"planned"`
	Started              int `json:"started"`
	Completed            int `json:"completed"`
	Passed               int `json:"passed"`
	Failed               int `json:"failed"`
	TimedOut             int `json:"timed_out"`
	Interrupted          int `json:"interrupted"`
	InfrastructureFailed int `json:"infrastructure_failed"`
	Skipped              int `json:"skipped"`
	Flaky                int `json:"flaky"`
	RetryConsumed        int `json:"retry_consumed"`
	CleanupFailed        int `json:"cleanup_failed"`
	ManualReruns         int `json:"manual_reruns"`
}

type StabilityIdentity

type StabilityIdentity struct {
	ApplicationRevision string `json:"application_revision"`
	TestRevision        string `json:"test_revision"`
	ConfigSHA256        string `json:"config_sha256"`
	ContractSHA256      string `json:"contract_sha256"`
	Runner              string `json:"runner"`
	RunnerVersion       string `json:"runner_version"`
	Browser             string `json:"browser"`
	Project             string `json:"project"`
	WorkerPolicy        string `json:"worker_policy"`
	RetryPolicy         string `json:"retry_policy"`
	EnvironmentClass    string `json:"environment_class"`
	EnvironmentSHA256   string `json:"environment_sha256"`
	FixtureSchema       string `json:"fixture_schema"`
	FixtureSHA256       string `json:"fixture_sha256"`
}

type StabilityPolicy

type StabilityPolicy struct {
	ID               string                   `json:"id"`
	SHA256           string                   `json:"sha256"`
	Topology         StabilityTopologyBinding `json:"topology"`
	MatrixDimensions []string                 `json:"matrix_dimensions"`
	Thresholds       []StabilityThreshold     `json:"thresholds"`
}

type StabilityReceiptInput

type StabilityReceiptInput struct {
	Path     string `json:"path"`
	Revision string `json:"revision"`
	SHA256   string `json:"sha256"`
}

type StabilityRegistry

type StabilityRegistry struct {
	Schema     string               `json:"schema"`
	Policy     StabilityPolicy      `json:"policy"`
	Aggregates []StabilityAggregate `json:"aggregates"`
}

type StabilityReport

type StabilityReport struct {
	ID                   string                   `json:"id"`
	Provider             string                   `json:"provider"`
	Scope                string                   `json:"scope"`
	PolicyID             string                   `json:"policy_id"`
	PolicySHA256         string                   `json:"policy_sha256"`
	Topology             StabilityTopologyBinding `json:"topology"`
	MatrixDimensions     []string                 `json:"matrix_dimensions"`
	TestID               string                   `json:"test_id"`
	Project              string                   `json:"project"`
	ContractID           string                   `json:"contract_id"`
	ContractSHA256       string                   `json:"contract_sha256"`
	Counts               StabilityCounts          `json:"counts"`
	Verdict              string                   `json:"verdict"`
	ContributingReceipts []StabilityContribution  `json:"contributing_receipts"`
	Limitations          []string                 `json:"limitations"`
}

type StabilityThreshold

type StabilityThreshold struct {
	Scope                       string `json:"scope"`
	RequiredRepetitions         int    `json:"required_repetitions"`
	MinimumPassed               int    `json:"minimum_passed"`
	MaximumFailed               int    `json:"maximum_failed"`
	MaximumTimedOut             int    `json:"maximum_timed_out"`
	MaximumInterrupted          int    `json:"maximum_interrupted"`
	MaximumInfrastructureFailed int    `json:"maximum_infrastructure_failed"`
	MaximumSkipped              int    `json:"maximum_skipped"`
	MaximumFlaky                int    `json:"maximum_flaky"`
	MaximumRetryConsumed        int    `json:"maximum_retry_consumed"`
}

type StabilityTopology

type StabilityTopology struct {
	CINodes                  int      `json:"ci_nodes"`
	CIShards                 int      `json:"ci_shards"`
	PlaywrightWorkersPerNode int      `json:"playwright_workers_per_node"`
	DatabaseMode             string   `json:"database_mode"`
	Projects                 []string `json:"projects"`
	SplitAlgorithm           string   `json:"split_algorithm"`
	SplitVersion             string   `json:"split_version"`
	ResourceClass            string   `json:"resource_class"`
}

type StabilityTopologyBinding

type StabilityTopologyBinding struct {
	Evidence Anchor            `json:"evidence"`
	Value    StabilityTopology `json:"value"`
}

type StabilityTopologyDocument

type StabilityTopologyDocument struct {
	Schema        string            `json:"schema"`
	Kind          string            `json:"kind"`
	PolicyID      string            `json:"policy_id"`
	ReceiptSHA256 string            `json:"receipt_sha256,omitempty"`
	Topology      StabilityTopology `json:"topology"`
}

type Step

type Step struct {
	ID          string   `json:"id"`
	Action      string   `json:"action"`
	Operation   string   `json:"operation"`
	Expected    string   `json:"expected"`
	Observation string   `json:"observation"`
	Evidence    Evidence `json:"evidence"`
}

type StepObservation

type StepObservation struct {
	ID        string `json:"id"`
	Action    string `json:"action"`
	Operation string `json:"operation"`
	Expected  string `json:"expected"`
	Observed  string `json:"observed"`
	Passed    bool   `json:"passed"`
}

type Subject

type Subject struct {
	ID       string   `json:"id"`
	Kind     string   `json:"kind"`
	Name     string   `json:"name"`
	Provider string   `json:"provider"`
	Evidence Evidence `json:"evidence"`
}

Jump to

Keyboard shortcuts

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