flowcoverage

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 23 Imported by: 0

Documentation

Overview

Package flowcoverage binds accepted variation inventories to retained /3 observations.

Index

Constants

View Source
const DenominatorSchema = "application-flow-coverage-denominator/1"
View Source
const MaxPageBytes = 300 << 10
View Source
const MaxReportBytes = 64 << 20
View Source
const MaxRows = 8192
View Source
const ReportSchema = "application-flow-coverage/1"
View Source
const RunsSchema = "application-flow-coverage-runs/1"
View Source
const WritebackSchema = "application-flow-coverage-writeback/1"

Variables

This section is empty.

Functions

func Encode

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

Types

type Citation

type Citation struct {
	Anchors     []doccorpus.Anchor `json:"anchors"`
	IDs         []string           `json:"ids"`
	Unavailable string             `json:"unavailable"`
}

type Citations

type Citations struct {
	Docs            Citation `json:"docs"`
	Claims          Citation `json:"claims"`
	SourceBranches  Citation `json:"source_branches"`
	LegacyTests     Citation `json:"legacy_tests"`
	DownstreamFlows Citation `json:"downstream_flows"`
}

type Denominator

type Denominator struct {
	Schema     string               `json:"schema"`
	Source     doccorpus.Repository `json:"source"`
	Intents    IntentDirectory      `json:"intents"`
	Inventory  Inventory            `json:"documented_inventory"`
	Flows      []Mapping            `json:"flows"`
	Variations []Variation          `json:"variations"`
}

type Entry

type Entry struct {
	Locator    appflows.NavLocator `json:"locator"`
	Acceptance doccorpus.Anchor    `json:"acceptance"`
}

type ExactTest

type ExactTest struct {
	File       string             `json:"file"`
	FullTitle  string             `json:"full_title"`
	Project    *string            `json:"project"`
	Anchor     doccorpus.Anchor   `json:"anchor"`
	Assertions []doccorpus.Anchor `json:"assertions"`
}

type IntentDirectory

type IntentDirectory struct {
	Directory string `json:"directory"`
	Revision  string `json:"revision"`
}

type Inventory

type Inventory struct {
	Kind string `json:"kind"`
	Ref
}

type Mapping

type Mapping struct {
	DocumentedID  string   `json:"documented_id"`
	IntentFlowIDs []string `json:"intent_flow_ids"`
}

type Observation

type Observation struct {
	HistoryGroup      string    `json:"history_group"`
	Historical        bool      `json:"historical"`
	BindingGroup      string    `json:"binding_group"`
	Receipt           string    `json:"receipt_sha256"`
	Kind              string    `json:"kind"`
	Test              ExactTest `json:"test"`
	State             string    `json:"state"`
	Attempts          int       `json:"attempts"`
	ConfiguredRetries []int     `json:"configured_retries"`
	Qualified         bool      `json:"qualified"`
	Reasons           []string  `json:"reasons"`
	SourceRevision    string    `json:"source_revision"`
}

type Options

type Options struct{ Denominator, Receipts, Revision string }

type Page

type Page struct {
	Schema       string   `json:"schema"`
	Revision     string   `json:"revision"`
	ReportSHA256 string   `json:"report_sha256"`
	Passed       bool     `json:"passed"`
	Gaps         int      `json:"gaps"`
	Total        int      `json:"total"`
	Offset       int      `json:"offset"`
	Next         *int     `json:"next_offset"`
	Rows         []Row    `json:"rows"`
	Limitations  []string `json:"limitations"`
}

type Ref

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

type Report

type Report struct {
	Schema            string   `json:"schema"`
	Revision          string   `json:"revision"`
	DenominatorSHA256 string   `json:"denominator_sha256"`
	RunsSHA256        string   `json:"runs_sha256"`
	Passed            bool     `json:"passed"`
	Gaps              int      `json:"gaps"`
	Rows              []Row    `json:"rows"`
	Limitations       []string `json:"limitations"`
}

type Result

type Result struct {
	Report     Report
	Generation *flowdocs.Result
	Documented []string
}

func Compile

func Compile(ctx context.Context, root string, o Options) (*Result, error)

func (*Result) Check

func (r *Result) Check(destination string) ([]string, error)

func (*Result) Files

func (r *Result) Files() (map[string][]byte, error)

func (*Result) Page

func (r *Result) Page(offset, limit int) ([]byte, error)

func (*Result) Write

func (r *Result) Write(destination string) error

type Row

type Row struct {
	DocumentedID         string                 `json:"documented_id"`
	FlowID               string                 `json:"intent_flow_id"`
	VariationID          string                 `json:"variation_id"`
	Status               string                 `json:"status"`
	Actor                string                 `json:"actor"`
	Preconditions        []string               `json:"preconditions"`
	Entry                *appflows.NavLocator   `json:"entry"`
	Actions              []appflows.FlowStep    `json:"actions"`
	Facts                []string               `json:"observable_facts"`
	Outcomes             []appflows.FlowOutcome `json:"outcomes"`
	Citations            Citations              `json:"citations"`
	Tests                []Test                 `json:"tests"`
	Observations         []Observation          `json:"observations"`
	Reasons              []string               `json:"reasons"`
	LastVerifiedRevision string                 `json:"last_verified_revision"`
	Skeleton             *Skeleton              `json:"skeleton,omitempty"`
}

type Run

type Run struct {
	Ref
	Kind                string            `json:"kind"`
	SourceRevision      string            `json:"source_revision"`
	TestRevision        string            `json:"test_revision"`
	Paths               map[string]string `json:"paths"`
	PackagePaths        []string          `json:"package_paths"`
	BuildScope          string            `json:"build_scope"`
	ApplicationIdentity string            `json:"application_identity"`
	Environment         map[string]string `json:"environment"`
}

type Runs

type Runs struct {
	Schema    string `json:"schema"`
	Directory string `json:"directory"`
	Revision  string `json:"revision"`
	Runs      []Run  `json:"runs"`
}

type Skeleton

type Skeleton struct {
	Entry       *appflows.NavLocator   `json:"entry"`
	Outcomes    []appflows.FlowOutcome `json:"outcomes"`
	Fixtures    []doccorpus.Anchor     `json:"fixtures"`
	PageObjects []doccorpus.Anchor     `json:"page_objects"`
	Unknown     []string               `json:"unknown"`
}

type Test

type Test struct {
	ExactTest
	Mode        string             `json:"mode"`
	Outcomes    []string           `json:"outcomes"`
	Controls    []ExactTest        `json:"controls"`
	Fixtures    []doccorpus.Anchor `json:"fixtures"`
	PageObjects []doccorpus.Anchor `json:"page_objects"`
	Acceptance  doccorpus.Anchor   `json:"acceptance"`
}

type Variation

type Variation struct {
	FlowID    string    `json:"intent_flow_id"`
	ID        string    `json:"variation_id"`
	Entry     *Entry    `json:"entry,omitempty"`
	Citations Citations `json:"citations"`
	Tests     []Test    `json:"tests"`
	Exclusion *Ref      `json:"exclusion,omitempty"`
}

Directories

Path Synopsis
Package testfixture supplies a real committed, uncovered denominator for adapter parity tests.
Package testfixture supplies a real committed, uncovered denominator for adapter parity tests.

Jump to

Keyboard shortcuts

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