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)
Source
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)
Source
Resolves an evidence plan and reports prerequisite readiness without provisioning resources or running producers.
Task<EvidencePlan> ExplainAsync(EvidencePlanningRequest request, CancellationToken cancellationToken)
Source
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)
Source
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)
Source
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)
Source
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)
Source
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)
Source
Formats a deterministic, human-readable summary of a resolved plan.
string FormatSummary(EvidenceManifest manifest)
Source
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)
Source
Opens path for sequential read access.
pathThe explicit path supplied through --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)
Source
Runs one declared coverage producer through the private coverage core and returns its stable evidence outcome.
producerThe explicit 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.solutionPathThe nonempty solution path used for AppSurface coverage discovery. The producer does not infer this value, so a missing path returns an unavailable outcome rather than selecting a solution implicitly.outputDirectoryThe nonempty Evidence output directory. The producer creates and cleans its coverage child directory for the fixed Debug, serial, input-order collector run and its merged gate report.diffSnapshotThe optional bounded immutable diff captured during planning. Patch gates require this snapshot; callers must pass the planning snapshot instead of reopening its source file.writersThe nonnull ordered standard-output and standard-error writers owned by the caller for the shared core's diagnostics.cancellationTokenThe caller cancellation token. Caller cancellation is propagated; only expiration of the producer's linked deadline yields 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.
OperationCanceledExceptionThe caller cancels cancellationToken.The private core owns collection-before-gate ordering. This adapter fixes the coverage run defaults to Debug, serial input-order execution, collector coverage, clean output, and the established AppSurface test exclusion; it does not expose a general-purpose coverage configuration surface to Evidence consumers.