Documentation
Table of Contents

Interface IGuardrailShadowSource

Namespace
IntentSharp.Guardrails
Assembly
IntentSharp.dll

The optional capability of an IGuardrailSource to read other versions of its rule documents, so a client can run them side by side with the running version (Shadows), and to keep the running tally of what they changed. Implement it beside IGuardrailSource on the same object; a client with shadows and a source without it is not built. The IntentSharp.Guardrails package's rule file source implements it.

[Experimental("INTENTSHARP002")]
public interface IGuardrailShadowSource
Extension Methods

Methods

ReadCandidateAsync(DocumentId, long, CancellationToken)

Reads the rule sets one version of a document defines, bound as the running version is, for a check to evaluate detect-only beside the running sets. The client caches the result until the source's snapshot revision changes.

RecordAsync(DocumentId, long, IReadOnlyList<ShadowDifference>, bool, CancellationToken)

Records what one check found for a version run side by side: the running tally a developer reads to decide on a promotion. Called once per check for each version that ReadCandidateAsync(DocumentId, long, CancellationToken) returned sets for. A failure is logged and never changes the check's decision.