string Id { get; }
Source
Gets the stable declaration identifier handled by this producer.
Describes a normalized changed path used for deterministic policy resolution.
PathA repository-relative path with forward-slash separators.KindThe source-control change kind, such as added, modified, deleted, or renamed.PreviousPathThe previous normalized path for a rename; otherwise null.Declares one artifact slot that a producer is allowed to return.
LogicalNameStable logical artifact name.RelativeRootNormalized artifact-root-relative directory permitted for this slot.MediaTypeExpected media type.RequiredWhether a missing artifact invalidates the producer result.MaximumBytesMaximum allowed artifact length.Captures bounded metadata for one declared artifact without serializing its raw content.
LogicalNameDeclared artifact slot identifier.RelativePathNormalized path beneath the evidence artifact root.MediaTypeDeclared media type.LengthBytesWritten artifact length.Sha256Lower-case SHA-256 digest of the written bytes.Binds a coverage producer's declared assertion to the existing AppSurface coverage gate thresholds.
MinLinePercentMinimum overall line coverage percentage.MinBranchPercentMinimum overall branch coverage percentage.MinPatchLinePercentOptional minimum changed-line coverage percentage.MinPatchBranchPercentOptional minimum changed-branch coverage percentage.PatchLineModeChanged-line calculation mode: measurable or codecov.TolerancePercentConfigured coverage gate tolerance percentage.Declares a producer selected by an evidence profile.
IdStable producer identifier.KindRegistered producer kind, such as coverage or browser-e2e.VersionProducer implementation semantic version.RequiredResourcesResource identifiers that must be ready before execution.AssertionIdsAssertion identifiers that this producer may close.ArtifactSlotsClosed artifact declarations for this producer.TimeoutSecondsPositive producer deadline in seconds.CoverageGateExplicit coverage gate requirements when this producer closes a coverage assertion.Declares an evidence resource required by a profile.
IdStable resource identifier.ReadinessDeclared readiness mode, such as aspire_health or completion.DeadlineSecondsPositive readiness deadline in seconds.RequiresResource identifiers that must be ready first.Captures bounded terminal readiness metadata for one declared resource.
ResourceIdDeclared resource identifier.OutcomeTerminal readiness outcome.ElapsedMillisecondsTime spent waiting for the resource.DiagnosticSecret-safe readiness diagnostic.Defines a changed-risk requirement that must be closed before a claim is complete.
IdStable obligation identifier.RiskClassConsumer-defined risk class.RationaleHuman explanation for why the obligation was selected.RequiredProducerIdsEvery producer that must pass for closure.RequiredAssertionIdThe assertion that confirms closure.Defines a closed profile of resources, producers, and obligations.
IdStable profile identifier.ScopeTargeted or release evidence breadth.ResourcesResources required by the profile.ProducersRegistered producers selected by the profile.ObligationsRisk obligations selected by the profile.Defines the shared v1 limits for one EvidenceHost profile declaration.
Maps exact paths or segment globs to a single named evidence profile.
IdStable rule identifier.PatternExact repository path or segment glob.ProfileIdProfile selected when the rule matches.PrecedenceExplicit tie breaker for equal-specificity patterns.Represents a versioned, checked-in evidence policy.
IdStable policy identifier.VersionConsumer-controlled policy version.ConservativeProfileIdProfile selected when a changed path has no direct match.ProfilesClosed set of selectable profiles.RulesPath-selection rules.Captures the immutable result of policy resolution before resource or producer execution.
ContractVersionEvidence contract version.PolicyIdResolved policy identifier.PolicyDigestSHA-256 digest of canonical policy bytes.DiffDigestSHA-256 digest of canonical normalized diff bytes.ProfileSelected closed profile.ChangedPathsNormalized paths used during selection.MatchedRuleIdsRules that explain selection.PlanDigestSHA-256 digest of canonical plan bytes excluding this digest field.PolicySnapshotCanonical checked-in policy snapshot used for resolution and later verification.Captures a bounded producer result returned to the EvidenceHost.
ProducerIdProducer that emitted the result.OutcomeTerminal producer outcome.SatisfiedAssertionIdsAssertion identifiers returned by the producer.DiagnosticSecret-safe human diagnostic; never include raw logs or values.ArtifactsBounded metadata for artifacts written through the declared artifact writer.ElapsedMillisecondsMeasured producer execution time.Captures bounded, secret-free lifecycle timing and cleanup status for one evidence execution.
PlanningMillisecondsTime spent resolving the policy and plan.ResourceReadinessMillisecondsCumulative time spent awaiting declared resources.ProducerMillisecondsCumulative producer execution time.CleanupMillisecondsTime spent disposing evidence-owned registrations.TotalMillisecondsTotal measured execution duration.CleanupCompletedWhether owned cleanup completed without a terminal failure.CleanupDiagnosticSecret-safe cleanup diagnostic when cleanup did not complete.Captures the immutable claim and execution result of an evidence run.
ContractVersionEvidence contract version.PlanDigestDigest of the resolved plan.ExecutionVerdictWhether declared execution requirements completed.ClaimKindClaim emitted by this run.EligibilityDownstream consumers permitted to use the claim.EnvelopeStatusConstrained CI-envelope status; it is not an implied runtime sandbox attestation.ResourceResultsBounded readiness outcomes for selected resources.SelectedObligationIdsObligations selected by the plan.ClosedObligationIdsObligations closed by returned assertions.UnmediatedObligationIdsSelected obligations that remain open.ProducerResultsBounded producer terminal results.MetricsSecret-free lifecycle timing and cleanup state.ManifestDigestSHA-256 digest of canonical manifest bytes excluding this digest field.Supplies the immutable execution context exposed to a registered evidence producer.
PlanResolved evidence plan.ProducerThe producer declaration being executed.TimeProviderClock seam used for deadlines and deterministic tests.ArtifactsBounded writer for declared artifact slots. It exposes no raw host path.Represents an explicitly registered typed evidence producer.
ValueTask<EvidenceProducerResult> ProduceAsync(EvidenceProducerContext context, CancellationToken cancellationToken)
Source
Produces bounded assertions and diagnostics for one resolved declaration.
contextImmutable plan and producer context.cancellationTokenCancellation requested by the EvidenceHost lifecycle.A terminal producer result.
string Id { get; }
Source
Gets the stable declaration identifier handled by this producer.
Writes only declared producer artifacts beneath a consumer-selected evidence root.
ValueTask<EvidenceArtifactResult> WriteAsync(string logicalName, string relativePath, ReadOnlyMemory<byte> contents, CancellationToken cancellationToken = default)
Source
Writes one declared artifact and returns only its bounded metadata.
logicalNameDeclared artifact slot identifier.relativePathNormalized artifact-root-relative destination path.contentsArtifact bytes to write.cancellationTokenCancellation requested by the EvidenceHost lifecycle.Hash and metadata for the written artifact.
Task<bool> VerifyWrittenArtifactsAsync(CancellationToken cancellationToken = default)
Source
Revalidates the final on-disk bytes for every artifact written through this writer.
cancellationTokenCancellation requested by the EvidenceHost lifecycle.true when every artifact still has its declared length and digest.
IReadOnlyList<EvidenceArtifactResult> WrittenArtifacts { get; }
Source
Gets completed artifact metadata emitted through this writer in ordinal logical-name order.
Validates declared evidence artifact metadata and containment without reading raw artifact contents into manifests.
bool AreValid(EvidenceProducerDeclaration producer, IReadOnlyList<EvidenceArtifactResult>? artifacts)
Source
Validates producer artifact metadata against its closed declaration set.
producerProducer declaration that owns the slots.artifactsProducer-returned artifact metadata.true when every artifact is declared, bounded, and valid.
string NormalizeRelativePath(string relativePath)
Source
Normalizes an artifact-root-relative path or throws when it escapes the artifact boundary.
relativePathArtifact-root-relative candidate path.Normalized forward-slash path.
void ValidatePathForSlot(EvidenceArtifactSlot slot, string relativePath)
Source
Validates that an artifact path remains beneath the declared slot root.
slotDeclared artifact slot.relativePathArtifact-root-relative candidate path.string GetContainedPath(string rootPath, string relativePath)
Source
Returns an absolute path contained beneath a controlled artifact root.
rootPathControlled artifact root.relativePathValidated root-relative artifact path.Contained absolute destination path.
Serializes contract objects deterministically for evidence identity and verification.
byte[] Serialize<TValue>(TValue value)
Source
Serializes a value as canonical UTF-8 JSON with ordinal object-property order.
TValueValue type to serialize.valueValue to serialize.Canonical UTF-8 JSON bytes.
TValue Deserialize<TValue>(ReadOnlySpan<byte> utf8Json)
Source
Deserializes a JSON document using the contract serializer options.
TValueValue type to deserialize.utf8JsonJSON bytes.The deserialized value.
Builds and verifies manifest claims from a resolved plan and bounded producer results.
EvidenceManifest Build(EvidencePlan plan, IReadOnlyList<EvidenceProducerResult> producerResults, bool observationOnly = false, EvidenceEnvelopeStatus envelopeStatus = EvidenceEnvelopeStatus.NotRequired, IReadOnlyList<EvidenceResourceResult>? resourceResults = null, EvidenceExecutionMetrics? metrics = null)
Source
Produces a manifest and closes obligations only when every declared producer and assertion requirement passed.
planResolved plan.producerResultsTerminal results returned by selected producers.observationOnlyWhether the caller intentionally requested a non-gate observation.envelopeStatusConstrained CI-envelope status bound to the manifest.resourceResultsTerminal readiness results for selected resources.metricsSecret-free lifecycle timing and cleanup state.A digest-bound manifest.
bool Verify(EvidencePlan plan, EvidenceManifest manifest)
Source
Validates that a manifest still binds to a supplied plan and canonical manifest content. This detects inconsistent or edited claim fields, but does not authenticate the origin of a plan or manifest. Gates must obtain both values through a trusted CI channel.
planPlan expected by the verifier.manifestManifest to verify.true when the binding and digest are valid.
Computes SHA-256 evidence identities from canonical bytes.
string Sha256(ReadOnlySpan<byte> bytes)
Source
Computes a lower-case hexadecimal SHA-256 digest.
bytesBytes to digest.The digest.
string CanonicalSha256<TValue>(TValue value)
Source
Computes a canonical-object digest.
TValueValue type to digest.valueValue to serialize and digest.The canonical SHA-256 digest.
Defines the scope selected by a versioned evidence policy.
Describes whether a resolved evidence execution satisfied its declared contract.
Defines the machine-readable claim that a manifest may make.
Defines the allowed downstream consumers of an evidence claim.
Describes the constrained status of the CI execution envelope bound to an evidence run.
Defines a terminal producer outcome.
Defines the terminal readiness outcome for one declared evidence resource.