Documentation
¶
Overview ¶
Package doccorpus compiles the proposed DCP-V1 documentation evidence profile. Identity validation does not establish semantic truth or accepted intent.
Index ¶
- Constants
- func BuildIncremental(ctx context.Context, root string, m Manifest, ids []ShardIdentity, ...) (*Artifact, *IncrementalCache, IncrementalStats, error)
- func BuildIncrementalVerified(ctx context.Context, root string, m Manifest, ids []ShardIdentity, ...) (VerifiedCorpus, *IncrementalCache, IncrementalStats, error)
- func CEMProjection(ctx context.Context, root string, a *Artifact, data []byte, claimID string) (map[string]any, error)
- func CapabilityFor(operation string) string
- func Digest(data []byte) string
- func EligibilityDigest(ids []ShardIdentity) (string, error)
- func Encode(value any) ([]byte, error)
- func EncodeIncrementalCache(cache IncrementalCache) ([]byte, error)
- func Freshness(ctx context.Context, root string, a *Artifact) (string, []string, error)
- func Impact(a *Artifact, paths []string, freshness string) map[string]any
- func NegativeStabilityThreshold(t StabilityThreshold) bool
- func OpenIncrementalVerified(ctx context.Context, root string, raw []byte, ids []ShardIdentity, ...) (VerifiedCorpus, IncrementalStats, error)
- func OperationInput(op string) string
- func ReadCorpusFile(root, path string) ([]byte, error)
- func ReadFile(root, path string) ([]byte, error)
- func RetirementInputSchema() map[string]any
- func StabilityThresholdPassed(counts StabilityCounts, threshold StabilityThreshold) bool
- func ValidateBehaviorProviderV2(p ProviderRecord) error
- func ValidateEligibility(ids []ShardIdentity) error
- type Anchor
- type Artifact
- type BehaviorAdapterArtifact
- type BehaviorAdapterClaimRecord
- type BehaviorAdapterCoverage
- type BehaviorAdapterDelta
- type BehaviorAdapterDiagnostic
- type BehaviorAdapterInput
- type BehaviorAdapterMapping
- type BehaviorAdapterOutcome
- type BehaviorAdapterRequest
- type BehaviorAdapterResult
- type BehaviorAdapterTestClaim
- type BehaviorAdapterVariation
- type BehaviorAssertion
- type BehaviorDiscovery
- type BehaviorEvent
- type BehaviorExecution
- type BehaviorFlow
- type BehaviorLegacyCase
- type BehaviorLegacyCriterion
- type BehaviorLegacyMapping
- type BehaviorLegacyRun
- type BehaviorMigration
- type BehaviorProviderRequestV2
- type BehaviorRegistry
- type BehaviorReport
- type BehaviorRepository
- type BehaviorRevisions
- type BehaviorRun
- type BehaviorRuntime
- type BehaviorSource
- type BehaviorTest
- type Builder
- type CachedShard
- type Capability
- type CapabilityDeclaration
- type Claim
- type CoverageDetails
- type DependencyEdge
- type Error
- type Evidence
- type FlowDetails
- type FlowSection
- type Gap
- type ImportParity
- type IncrementalCache
- type IncrementalStats
- type Input
- type IntentComparisonDetails
- type Journey
- type JourneyRun
- type Maintenance
- type MaintenanceFile
- type MaintenancePublication
- type Manifest
- type NavigationSelector
- type Observation
- type ObservationLink
- type ParagraphDetails
- type Profile
- type Provider
- type ProviderRecord
- type QueryIndex
- type Receipt
- func Query(a *Artifact, request Request, freshness string, limitations []string) (Receipt, error)
- func QueryContext(ctx context.Context, a *Artifact, request Request, freshness string, ...) (Receipt, error)
- func ReadQuery(ctx context.Context, root string, data []byte, request Request) (Receipt, error)
- type RecordDetails
- type RecordRef
- type Relation
- type Rendered
- type Repository
- type Request
- type RestrictedFinding
- type RestrictedSummary
- type RetirementPolicy
- type RetirementStatus
- type Scope
- type ShardContribution
- type ShardIdentity
- type StabilityAggregate
- type StabilityAttempt
- type StabilityContribution
- type StabilityCounts
- type StabilityIdentity
- type StabilityPolicy
- type StabilityReceiptInput
- type StabilityRegistry
- type StabilityReport
- type StabilityThreshold
- type StabilityTopology
- type StabilityTopologyBinding
- type StabilityTopologyDocument
- type Step
- type StepObservation
- type Subject
- type TestLinkDetails
- type TestRecommendation
- type TicketDetails
- type TicketHistory
- type TrustEnvelope
- type VerifiedCorpus
Constants ¶
const ( BehaviorAdapterRequestSchema = "corvint-behavior-adapter-request/1" BehaviorAdapterResultSchema = "corvint-behavior-adapter-result/1" )
const ( MaxProviderBytes = 64 << 20 SchemaV2 = "corvint-evidence-corpus/2" ManifestSchemaV2 = "corvint-corpus-input/2" AdoptionProviderSchema = "corvint-corpus-adoption-provider/1" MaxCorpusBytes = 128 << 20 MaxCorpusRecords = 100000 MaxCorpusJourneys = 4096 )
const ( StabilitySchema = "corvint-playwright-stability/1" BehaviorStabilityProviderSchema = "corvint-corpus-behavior-stability-provider/1" StabilityTopologySchema = "corvint-playwright-stability-topology/1" )
const ( Schema = "corvint-evidence-corpus/1" ManifestSchema = "corvint-corpus-input/1" ProviderSchema = "corvint-corpus-provider/1" ReceiptSchema = "corvint-corpus-receipt/2" MaxBytes = 4 << 20 MaxRecords = 4096 MaxResults = 256 )
const BehaviorProviderRequestSchemaV2 = "corvint-behavior-provider-request/2"
const BehaviorProviderSchema = "corvint-corpus-behavior-provider/1"
BehaviorProviderSchema is experimental: declarations never authorize narrowing.
const BehaviorProviderSchemaV2 = "corvint-corpus-behavior-provider/2"
BehaviorProviderSchemaV2 names every participating repository in the registry's repositories list instead of the three fixed revisions members (AFU-V1-006). Corpus ingestion keeps /2 declarations separate from /1 runtime reconciliation.
const IncrementalSchema = "corvint-corpus-incremental-cache/0"
const MaxIndexKeyBytes = 16 << 20
const MaxIndexPostings = 1000000
Variables ¶
This section is empty.
Functions ¶
func BuildIncremental ¶
func BuildIncremental(ctx context.Context, root string, m Manifest, ids []ShardIdentity, priorRaw []byte, expected string) (*Artifact, *IncrementalCache, IncrementalStats, error)
BuildIncremental pins all original bytes and freshly preloads restrictions. The expected cache digest must come from an operator-pinned previous Result. Unsupported units use the ordinary import path; no speedup is asserted.
func BuildIncrementalVerified ¶
func BuildIncrementalVerified(ctx context.Context, root string, m Manifest, ids []ShardIdentity, priorRaw []byte, expected string) (VerifiedCorpus, *IncrementalCache, IncrementalStats, error)
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 EligibilityDigest ¶
func EligibilityDigest(ids []ShardIdentity) (string, error)
func EncodeIncrementalCache ¶
func EncodeIncrementalCache(cache IncrementalCache) ([]byte, error)
func Impact ¶
Impact connects exact path/symbol anchors to subjects and explicit directed relations. It does not infer a dependency from shared citations.
func NegativeStabilityThreshold ¶
func NegativeStabilityThreshold(t StabilityThreshold) bool
func OpenIncrementalVerified ¶
func OpenIncrementalVerified(ctx context.Context, root string, raw []byte, ids []ShardIdentity, priorRaw []byte, expected string) (VerifiedCorpus, IncrementalStats, error)
OpenIncrementalVerified rederives the complete prior corpus from pinned sources under the same provider/global predicates. Cache admission compares every retained record with its normalized original. Original canonical bytes must still match; ParseArtifact or a supplied cache digest alone never qualifies.
func OperationInput ¶
OperationInput is shared by CLI, MCP and indexed companions. The native Query function retains compatibility with older permissive pure callers.
func ReadCorpusFile ¶
ReadCorpusFile admits a bounded /2 manifest or artifact; its decoder still enforces the original limit for /1 and for independent receipt profiles.
func RetirementInputSchema ¶
func StabilityThresholdPassed ¶
func StabilityThresholdPassed(counts StabilityCounts, threshold StabilityThreshold) bool
func ValidateBehaviorProviderV2 ¶
func ValidateBehaviorProviderV2(p ProviderRecord) error
ValidateBehaviorProviderV2 checks a /2 provider record: a non-empty list of repositories sorted by unique root commit, no /1 revisions member, a source that is one of the listed repositories, and a contract digest that covers the declarations exactly as /1 does.
func ValidateEligibility ¶
func ValidateEligibility(ids []ShardIdentity) 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 {
// RuntimeIndex is derived resident state, never evidence or serialized authority.
RuntimeIndex *QueryIndex `json:"-"`
Details map[string]RecordDetails `json:"details,omitempty"`
ImportParity []ImportParity `json:"import_parity,omitempty"`
RestrictedSummaries []RestrictedSummary `json:"restricted_summaries,omitempty"`
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 ParseArtifact ¶
func (*Artifact) HasCapability ¶
type BehaviorAdapterArtifact ¶
type BehaviorAdapterClaimRecord ¶
type BehaviorAdapterClaimRecord struct {
TestID string `json:"test_id"`
Claim BehaviorAdapterTestClaim `json:"claim"`
}
type BehaviorAdapterCoverage ¶
type BehaviorAdapterDelta ¶
type BehaviorAdapterInput ¶
type BehaviorAdapterMapping ¶
type BehaviorAdapterOutcome ¶
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 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 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"`
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 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 BehaviorLegacyMapping ¶
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 BehaviorProviderRequestV2 ¶
type BehaviorProviderRequestV2 struct {
Schema string `json:"schema"`
ID string `json:"provider_id"`
Version string `json:"provider_version"`
Source Repository `json:"source"`
Registry BehaviorRegistry `json:"registry"`
}
type BehaviorRegistry ¶
type BehaviorRegistry struct {
Revisions BehaviorRevisions `json:"revisions,omitzero"`
Repositories []BehaviorRepository `json:"repositories,omitempty"`
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 {
ProviderSchema string `json:"provider_schema,omitempty"`
Discovery BehaviorDiscovery `json:"discovery,omitzero"`
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 BehaviorRepository ¶
type BehaviorRepository struct {
RootCommit string `json:"root_commit"`
Revision string `json:"revision"`
}
BehaviorRepository is one /2 participating repository: its root commit and the revision the registry was evaluated at.
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 BehaviorSource ¶
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 CachedShard ¶
type CachedShard struct {
Identity ShardIdentity `json:"identity"`
Fingerprint string `json:"fingerprint"`
Contribution ShardContribution `json:"contribution"`
}
type Capability ¶
type Capability struct {
RecordsOmitted int `json:"records_omitted,omitempty"`
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 CoverageDetails ¶
type DependencyEdge ¶
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 FlowDetails ¶
type FlowDetails struct {
Sections []FlowSection `json:"sections"`
Actors []string `json:"actors"`
Entrypoints []string `json:"entrypoints"`
Variations []string `json:"variations"`
}
type FlowSection ¶
type ImportParity ¶
type IncrementalCache ¶
type IncrementalCache struct {
Schema string `json:"schema"`
Builder Builder `json:"builder"`
EligibilitySHA256 string `json:"eligibility_sha256"`
Shards []CachedShard `json:"shards"`
}
type IncrementalStats ¶
type IncrementalStats struct {
Compiled []ShardIdentity `json:"compiled"`
Reused []ShardIdentity `json:"reused"`
Fallback []ShardIdentity `json:"fallback"`
FallbackReason string `json:"fallback_reason"`
}
type IntentComparisonDetails ¶
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"`
}
type MaintenanceFile ¶
MaintenanceFile binds an output to the bytes inspected by the caller. Nil Before means exclusive creation. Existing originals remain named, even after success.
type MaintenancePublication ¶
type MaintenancePublication struct {
Path string `json:"path"`
Recovery string `json:"recovery,omitempty"`
Published bool `json:"published"`
}
MaintenancePublication exposes partial progress; it is never a success receipt.
func PublishMaintenancePair ¶
func PublishMaintenancePair(ctx context.Context, root string, files [2]MaintenanceFile, verify func([]MaintenancePublication) error) ([]MaintenancePublication, error)
PublishMaintenancePair stages both files before any capture, then publishes each through no-clobber links. It deliberately offers no pair/crash atomicity. verify runs before staging and again before capture, with exact prospective publication metadata for receipt preflight; checkpoint is a package-private test seam.
type Manifest ¶
type Manifest struct {
BehaviorRepositories []BehaviorRepository `json:"behavior_repositories,omitempty"`
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 ParseManifest ¶
type NavigationSelector ¶
type NavigationSelector struct {
}
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 ¶
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 ParagraphDetails ¶
type ProviderRecord ¶
type ProviderRecord struct {
Details map[string]RecordDetails `json:"details,omitempty"`
RestrictedFindings []RestrictedFinding `json:"restricted_findings,omitempty"`
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"`
}
func BuildBehaviorProviderV2 ¶
func BuildBehaviorProviderV2(raw []byte) (ProviderRecord, error)
BuildBehaviorProviderV2 emits declarations only. Repository identities and anchors remain caller claims until the corpus boundary checks its inputs.
type QueryIndex ¶
type QueryIndex struct {
IDs map[string]RecordRef `json:"ids"`
Paths map[string][]RecordRef `json:"paths"`
Terms map[string][]int `json:"terms"`
Claims map[string][]int `json:"claims"`
Edges map[string][]int `json:"edges"`
}
QueryIndex contains only offsets into an immutable validated artifact. It is derived independently on admission; its bytes never establish source truth.
func BuildQueryIndex ¶
func BuildQueryIndex(ctx context.Context, a *Artifact) (*QueryIndex, error)
type Receipt ¶
type Receipt struct {
Envelope *TrustEnvelope `json:"trust_envelope,omitempty"`
Meaning string `json:"meaning,omitempty"`
Selection *TestRecommendation `json:"test_selection,omitempty"`
Offset int `json:"offset,omitempty"`
NextOffset *int `json:"next_offset,omitempty"`
Details map[string]RecordDetails `json:"details,omitempty"`
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 ¶
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 QueryContext ¶
type RecordDetails ¶
type RecordDetails struct {
ClaimKind string `json:"claim_kind,omitempty"`
Flow *FlowDetails `json:"flow,omitempty"`
Paragraph *ParagraphDetails `json:"paragraph,omitempty"`
TestLink *TestLinkDetails `json:"test_link,omitempty"`
Coverage *CoverageDetails `json:"coverage,omitempty"`
Ticket *TicketDetails `json:"ticket,omitempty"`
IntentComparison *IntentComparisonDetails `json:"intent_comparison,omitempty"`
}
RecordDetails preserves typed provider vocabulary beside normalized records. The normalized record's evidence axes govern every detail; none grants authority.
type Rendered ¶
type Repository ¶
type RestrictedFinding ¶
type RestrictedFinding struct {
ID string `json:"id"`
Severity string `json:"severity"`
LocalDetailPath string `json:"local_detail_path"`
Detail string `json:"detail"`
}
RestrictedFinding exists only in the local input. Its identity, original detail path and body are never admitted to an artifact or diagnostic.
type RestrictedSummary ¶
type RetirementPolicy ¶
type RetirementPolicy struct {
EvaluatedAt string `json:"evaluated_at"`
MaxAgeSeconds *int64 `json:"max_age_seconds,omitempty"`
MaxMergeDistance *int `json:"max_merge_distance,omitempty"`
SourceRevision string `json:"source_revision,omitempty"`
TargetRevision string `json:"target_revision,omitempty"`
MergeDistance *int `json:"merge_distance,omitempty"`
}
RetirementPolicy is an operator declaration, never an authenticated review. Distance names both revisions; absent measurements remain unknown.
func ParseRetirement ¶
func ParseRetirement(raw []byte) (*RetirementPolicy, error)
type RetirementStatus ¶
type ShardContribution ¶
type ShardContribution struct {
Subjects []Subject `json:"subjects"`
Claims []Claim `json:"claims"`
Relations []Relation `json:"relations"`
Journeys []Journey `json:"journeys"`
Details map[string]RecordDetails `json:"details"`
Declarations []CapabilityDeclaration `json:"declarations"`
AdoptionProvider bool `json:"adoption_provider"`
ImportParity []ImportParity `json:"import_parity"`
}
type ShardIdentity ¶
ShardIdentity is an explicit policy-admitted reuse unit, never inferred scope.
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 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 StepObservation ¶
type TestLinkDetails ¶
type TestRecommendation ¶
type TicketDetails ¶
type TicketDetails struct {
ExternalID string `json:"external_id"`
Status string `json:"status"`
History []TicketHistory `json:"history"`
}
type TicketHistory ¶
type TrustEnvelope ¶
type TrustEnvelope struct {
ContentStatus string `json:"content_status"`
SourceRevision string `json:"source_revision"`
CorpusRevision string `json:"corpus_revision"`
Builder Builder `json:"builder"`
Freshness string `json:"freshness"`
SourceValidation string `json:"source_validation"`
Retirement RetirementStatus `json:"retirement"`
Citations []Anchor `json:"citations"`
Limitations []string `json:"limitations"`
}
type VerifiedCorpus ¶
type VerifiedCorpus struct {
// contains filtered or unexported fields
}
VerifiedCorpus carries an immutable result of the complete source-pinned compiler boundary. It is local process evidence, never a wire certificate or producer authentication. Only this package can mint it; the zero value refuses.
func BuildVerified ¶
func OpenVerified ¶
func (VerifiedCorpus) Bytes ¶
func (v VerifiedCorpus) Bytes() ([]byte, error)
Bytes returns a private copy; caller writes cannot change the verified result.
func (VerifiedCorpus) Snapshot ¶
func (v VerifiedCorpus) Snapshot() (*Artifact, error)
Snapshot decodes a fresh copy for a consumer without exposing token storage. Parsing is safe here only because this token was minted at the compiler boundary.