EvidencePlan Plan { get; }
Source
Gets the nonnull plan resolved from the exact input set represented by this instance.
Coordinates deterministic EvidenceHost CLI file operations for the AppSurface command assembly.
Task<EvidenceInitializationResult> InitializeAsync(string rootPath, bool force, CancellationToken cancellationToken)
Writes the marked v1 starter files beneath rootPath
.
Existing unmarked files are never overwritten and fail with ASEVD201
; existing marked files require force
and otherwise fail with ASEVD202
.
Task<EvidenceDoctorReport> DoctorAsync(EvidencePlanningRequest request, CancellationToken cancellationToken)
Resolves an evidence plan and reports prerequisite readiness without provisioning resources or running producers.
Task<EvidencePlan> ExplainAsync(EvidencePlanningRequest request, CancellationToken cancellationToken)
Resolves the checked-in policy and explicit changed paths into a deterministic evidence plan.
Missing, malformed, or empty CLI inputs produce the stable ASEVD204
through ASEVD207
diagnostics. A hunked diff without Git file headers is rejected with ASEVD128
rather than planning from incomplete paths.
Task<EvidencePlanningResolution> ResolveAsync(EvidencePlanningRequest request, CancellationToken cancellationToken)
Resolves an Evidence plan and retains the bounded diff snapshot used for planning.
Only evidence run
retains the snapshot through producer execution. Explain and doctor resolve the same inputs through this method but discard it after planning because they never evaluate a patch gate.
Task WritePlanAsync(EvidencePlan plan, string outputDirectory, CancellationToken cancellationToken)
Writes the canonical plan and its human-readable summary to outputDirectory
.
Replaces evidence-plan.json
and evidence-summary.json
when they already exist.
Task WriteManifestAsync(EvidenceManifest manifest, string outputDirectory, CancellationToken cancellationToken)
Writes the canonical manifest and its human-readable summary to outputDirectory
.
Replaces evidence-manifest.json
and evidence-summary.json
when they already exist.
Task<(EvidencePlan Plan, EvidenceManifest Manifest)> VerifyAsync(string planPath, string manifestPath, CancellationToken cancellationToken)
Verifies that a manifest is canonical and is bound to the supplied plan without rerunning producers.
Missing files produce ASEVD208
, malformed canonical JSON produces ASEVD209
, and a missing, unresolvable, or non-binding policy snapshot produces ASEVD203
.
string FormatSummary(EvidencePlan plan)
Formats a deterministic, human-readable summary of a resolved plan.
string FormatSummary(EvidenceManifest manifest)
Formats a deterministic, human-readable summary of an evidence claim and any remaining obligations.
Describes a policy and explicit changed-path input for an EvidenceHost planning operation.
Binds a resolved plan to the immutable diff bytes used to derive its changed paths.
Keep this pair together from planning through coverage execution. Reopening the source path can observe a replaced diff and break the plan-to-gate integrity boundary; consumers must reuse DiffSnapshot
when present.
EvidencePlan Plan { get; }
Source
Gets the nonnull plan resolved from the exact input set represented by this instance.
EvidenceDiffSnapshot? DiffSnapshot { get; }
Source
Gets the optional immutable diff snapshot from which the plan's diff-derived paths were read.
Pass this same value to the coverage producer for patch gates. Do not reopen a source path to obtain a newer diff, because that would no longer be the diff on which Plan
was evaluated.
Holds the bounded unified diff input consumed by an Evidence planning operation.
The snapshot owns a defensive copy of the bytes supplied at construction. It is bounded by the planning reader to 20 MiB, and consumers must reuse Bytes
for planning-adjacent work such as patch coverage instead of reopening the source path. This preserves the SHA-256-integrity boundary when the original file is replaced later.
ReadOnlyMemory<byte> Bytes { get; }
Source
Gets a read-only view of the exact bytes defensively copied at construction.
This view avoids another copy for internal consumers, but it exposes no writable access. Reuse it for patch coverage and related planning work; reopening the original file can violate the plan-to-gate integrity rule.
string Label { get; }
Source
Gets the nonempty safe source label used in coverage artifacts and diagnostics.
string Sha256 { get; }
Source
Gets the nonempty 64-character hexadecimal SHA-256 digest of Bytes
at capture time.
string Text { get; }
Source
Gets the UTF-8 decoding of Bytes
used by the planner and coverage core.
This value is derived only from the captured bytes. It must not be replaced with a fresh read of the original diff path after planning.
Opens explicit unified diff files for Evidence planning.
This narrow internal boundary keeps the production reader file-backed while allowing tests to prove that the bounded stream reader evaluates the bytes available when a path is actually opened, not stale file metadata.
Stream OpenRead(string path)
Opens path
for sequential read access.
path
--diff-file
.A readable stream owned and disposed by the Evidence workflow.
Opens Evidence diff files through the local physical file system.
Describes starter files created by an EvidenceHost initialization operation.
Describes one environment or capability prerequisite observed by the evidence doctor.
Describes the plan and prerequisite checks produced by the evidence doctor.
Represents a stable, user-actionable EvidenceHost CLI failure.
string Code { get; }
Source
Gets the stable EvidenceHost diagnostic code.
string Fix { get; }
Source
Gets the recommended recovery action.
Runs the private AppSurface coverage engine for the first-party Evidence workflow.
This adapter owns Evidence-to-coverage translation and stable claim outcomes. The core owns the required collection-then-gate ordering, so this code neither recreates coverage execution nor invokes a second appsurface
process.
Task<EvidenceProducerResult> RunAsync(EvidenceProducerDeclaration producer, string? solutionPath, string outputDirectory, EvidenceDiffSnapshot? diffSnapshot, CoverageTextWriters writers, CancellationToken cancellationToken)
Runs one declared coverage producer through the private coverage core and returns its stable evidence outcome.
producer
coverage
declaration to execute. It must include coverage-gate requirements; unsupported kinds, missing gates, and patch gates without a captured diff return stable unavailable or invalid outcomes without starting the core. solutionPath
outputDirectory
coverage
child directory for the configured input-order collector run and its merged gate report. diffSnapshot
writers
cancellationToken
EvidenceProducerOutcome.TimedOut
. A passed result only when collection and the declared gate both pass; a failed result for collection, gate, or nonfatal core failures (including independently thrown cancellation exceptions); or an unavailable or invalid result for declaration inputs that cannot safely start coverage.
OperationCanceledException
cancellationToken
.The private core owns collection-before-gate ordering. This adapter forwards the declared configuration, parallelism, and managed test-result format while retaining input-order scheduling, collector coverage, fail-mode no-progress handling, clean output, and the established AppSurface test exclusion. Its monotonic producer budget limits the automatic no-dump VSTest timer without replacing deadline cancellation; it does not expose a general-purpose coverage configuration surface to Evidence consumers.