Class DecisionReceipt
Represents the framework-neutral decision receipt produced by an AsiBackbone operation.
public sealed class DecisionReceipt : IDecisionReceipt
- Inheritance
-
DecisionReceipt
- Implements
- Inherited Members
Properties
ActorDisplayName
Gets the optional display name or label associated with the actor.
public string? ActorDisplayName { get; }
Property Value
ActorId
Gets the stable actor identifier associated with the event.
public string ActorId { get; }
Property Value
ActorType
Gets the actor type associated with the event.
public GovernanceActorType ActorType { get; }
Property Value
ConstraintCount
Gets the number of constraints evaluated for the decision, when supplied by the host.
public int? ConstraintCount { get; }
Property Value
- int?
ConstraintSetHash
Gets the hash of the evaluated constraint set, when supplied by the host.
public string? ConstraintSetHash { get; }
Property Value
CorrelationId
Gets the correlation identifier associated with the event, when supplied by the host.
public string? CorrelationId { get; }
Property Value
DecisionLatencyMs
Gets the decision latency in milliseconds, when supplied by the host.
public long? DecisionLatencyMs { get; }
Property Value
- long?
DecisionReceiptId
Gets the stable decision receipt identifier when available.
public string DecisionReceiptId { get; }
Property Value
Remarks
Existing residue implementations may use EventId as the residue identifier.
DecisionStage
Gets the provider-neutral decision stage associated with the event, when supplied by the host.
public string? DecisionStage { get; }
Property Value
EmitterProvider
Gets the provider-neutral emitter provider name, when supplied by the host or outbox provider.
public string? EmitterProvider { get; }
Property Value
EmitterStatus
Gets the provider-neutral emitter status, when supplied by the host or outbox provider.
public string? EmitterStatus { get; }
Property Value
EventId
Gets the stable audit event identifier.
public string EventId { get; }
Property Value
GatewayExecutionId
Gets the gateway execution identifier associated with the event, when supplied by the host or gateway provider.
public string? GatewayExecutionId { get; }
Property Value
HasMetadata
Gets a value indicating whether this decision receipt contains metadata.
public bool HasMetadata { get; }
Property Value
HasReasonCodes
Gets a value indicating whether this decision receipt contains reason codes.
public bool HasReasonCodes { get; }
Property Value
Metadata
Gets additional framework-neutral audit metadata supplied by the host.
public IReadOnlyDictionary<string, string> Metadata { get; }
Property Value
OccurredUtc
Gets the UTC timestamp when the audited event occurred.
public DateTimeOffset OccurredUtc { get; }
Property Value
OperationName
Gets the operation name associated with the audited event.
public string OperationName { get; }
Property Value
OrganizationHash
Gets the privacy-preserving organization hash associated with the decision, when supplied by the host.
public string? OrganizationHash { get; }
Property Value
OutboxSequence
Gets the outbox sequence associated with the event, when supplied by the host or outbox provider.
public long? OutboxSequence { get; }
Property Value
- long?
Outcome
Gets the governance, constraint, or host-defined outcome associated with the event.
public string Outcome { get; }
Property Value
ParentSpanId
Gets the parent span identifier associated with the event, when supplied by the host or observability adapter.
public string? ParentSpanId { get; }
Property Value
PolicyHash
Gets the policy hash associated with the event, when supplied by the host.
public string? PolicyHash { get; }
Property Value
PolicyScope
Gets the policy scope associated with the decision, when supplied by the host.
public string? PolicyScope { get; }
Property Value
PolicyVersion
Gets the policy version associated with the event, when supplied by the host.
public string? PolicyVersion { get; }
Property Value
ReasonCodes
Gets machine-readable reason codes associated with the event.
public IReadOnlyList<string> ReasonCodes { get; }
Property Value
RiskScore
Gets the host-defined risk score associated with the decision, when supplied by the host.
public double? RiskScore { get; }
Property Value
SchemaVersion
Gets the serialized schema version for the decision receipt shape.
public string SchemaVersion { get; }
Property Value
SpanId
Gets the span identifier associated with the event, when supplied by the host or observability adapter.
public string? SpanId { get; }
Property Value
TenantHash
Gets the privacy-preserving tenant hash associated with the decision, when supplied by the host.
public string? TenantHash { get; }
Property Value
TraceId
Gets the trace identifier associated with the event, when supplied by the host.
public string? TraceId { get; }
Property Value
Methods
Create(IGovernanceActorContext, string, string, IEnumerable<string>?, string?, DateTimeOffset?, string?, string?, string?, string?, IReadOnlyDictionary<string, string>?, string?, string?, string?, long?, string?, int?, double?, string?, string?, string?, string?, string?, long?, string?, string?, string?)
Creates decision receipt from a host-defined operation outcome.
public static DecisionReceipt Create(IGovernanceActorContext actor, string operationName, string outcome, IEnumerable<string>? reasonCodes = null, string? eventId = null, DateTimeOffset? occurredUtc = null, string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null, IReadOnlyDictionary<string, string>? metadata = null, string? decisionReceiptId = null, string? spanId = null, string? parentSpanId = null, long? decisionLatencyMs = null, string? constraintSetHash = null, int? constraintCount = null, double? riskScore = null, string? policyScope = null, string? tenantHash = null, string? organizationHash = null, string? emitterStatus = null, string? emitterProvider = null, long? outboxSequence = null, string? gatewayExecutionId = null, string? decisionStage = null, string? schemaVersion = null)
Parameters
actorIGovernanceActorContextThe actor associated with the operation.
operationNamestringThe operation name.
outcomestringThe governance, constraint, or host-defined outcome.
reasonCodesIEnumerable<string>Optional machine-readable reason codes.
eventIdstringOptional audit event identifier. When omitted, a new identifier is generated.
occurredUtcDateTimeOffset?Optional event timestamp. When omitted, the current UTC timestamp is used.
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
metadataIReadOnlyDictionary<string, string>Optional host-provided audit metadata.
decisionReceiptIdstringOptional decision receipt identifier. When omitted, the normalized event identifier is used.
spanIdstringOptional span identifier.
parentSpanIdstringOptional parent span identifier.
decisionLatencyMslong?Optional decision latency in milliseconds.
constraintSetHashstringOptional evaluated constraint-set hash.
constraintCountint?Optional evaluated constraint count.
riskScoredouble?Optional host-defined risk score.
policyScopestringOptional host-defined policy scope.
tenantHashstringOptional privacy-preserving tenant hash.
organizationHashstringOptional privacy-preserving organization hash.
emitterStatusstringOptional provider-neutral emitter status.
emitterProviderstringOptional provider-neutral emitter provider name.
outboxSequencelong?Optional outbox sequence.
gatewayExecutionIdstringOptional gateway execution identifier.
decisionStagestringOptional provider-neutral decision stage.
schemaVersionstringOptional schema version. When omitted, the stable artifact schema version is used.
Returns
- DecisionReceipt
An decision receipt value.
FromConstraint(IGovernanceActorContext, string, ConstraintEvaluationResult, string?, DateTimeOffset?, string?, string?, string?, string?, IReadOnlyDictionary<string, string>?, string?, string?, string?, long?, string?, int?, double?, string?, string?, string?, string?, string?, long?, string?, string?, string?)
Creates decision receipt from a constraint evaluation result.
public static DecisionReceipt FromConstraint(IGovernanceActorContext actor, string operationName, ConstraintEvaluationResult constraintResult, string? eventId = null, DateTimeOffset? occurredUtc = null, string? correlationId = null, string? traceId = null, string? policyVersion = null, string? policyHash = null, IReadOnlyDictionary<string, string>? metadata = null, string? decisionReceiptId = null, string? spanId = null, string? parentSpanId = null, long? decisionLatencyMs = null, string? constraintSetHash = null, int? constraintCount = null, double? riskScore = null, string? policyScope = null, string? tenantHash = null, string? organizationHash = null, string? emitterStatus = null, string? emitterProvider = null, long? outboxSequence = null, string? gatewayExecutionId = null, string? decisionStage = null, string? schemaVersion = null)
Parameters
actorIGovernanceActorContextThe actor associated with the operation.
operationNamestringThe operation name.
constraintResultConstraintEvaluationResultThe constraint evaluation result to audit.
eventIdstringOptional audit event identifier. When omitted, a new identifier is generated.
occurredUtcDateTimeOffset?Optional event timestamp. When omitted, the current UTC timestamp is used.
correlationIdstringOptional correlation identifier.
traceIdstringOptional trace identifier.
policyVersionstringOptional policy version.
policyHashstringOptional policy hash.
metadataIReadOnlyDictionary<string, string>Optional host-provided audit metadata.
decisionReceiptIdstringOptional decision receipt identifier. When omitted, the normalized event identifier is used.
spanIdstringOptional span identifier.
parentSpanIdstringOptional parent span identifier.
decisionLatencyMslong?Optional decision latency in milliseconds.
constraintSetHashstringOptional evaluated constraint-set hash.
constraintCountint?Optional evaluated constraint count.
riskScoredouble?Optional host-defined risk score.
policyScopestringOptional host-defined policy scope.
tenantHashstringOptional privacy-preserving tenant hash.
organizationHashstringOptional privacy-preserving organization hash.
emitterStatusstringOptional provider-neutral emitter status.
emitterProviderstringOptional provider-neutral emitter provider name.
outboxSequencelong?Optional outbox sequence.
gatewayExecutionIdstringOptional gateway execution identifier.
decisionStagestringOptional provider-neutral decision stage.
schemaVersionstringOptional schema version. When omitted, the stable artifact schema version is used.
Returns
- DecisionReceipt
An decision receipt value.
FromDecision(IGovernanceActorContext, string, GovernanceDecision, string?, DateTimeOffset?, IReadOnlyDictionary<string, string>?, string?, string?, string?, long?, string?, int?, double?, string?, string?, string?, string?, string?, long?, string?, string?, string?)
Creates decision receipt from a governance decision.
public static DecisionReceipt FromDecision(IGovernanceActorContext actor, string operationName, GovernanceDecision decision, string? eventId = null, DateTimeOffset? occurredUtc = null, IReadOnlyDictionary<string, string>? metadata = null, string? decisionReceiptId = null, string? spanId = null, string? parentSpanId = null, long? decisionLatencyMs = null, string? constraintSetHash = null, int? constraintCount = null, double? riskScore = null, string? policyScope = null, string? tenantHash = null, string? organizationHash = null, string? emitterStatus = null, string? emitterProvider = null, long? outboxSequence = null, string? gatewayExecutionId = null, string? decisionStage = null, string? schemaVersion = null)
Parameters
actorIGovernanceActorContextThe actor associated with the operation.
operationNamestringThe operation name.
decisionGovernanceDecisionThe governance decision to audit.
eventIdstringOptional audit event identifier. When omitted, a new identifier is generated.
occurredUtcDateTimeOffset?Optional event timestamp. When omitted, the current UTC timestamp is used.
metadataIReadOnlyDictionary<string, string>Optional host-provided audit metadata.
decisionReceiptIdstringOptional decision receipt identifier. When omitted, the normalized event identifier is used.
spanIdstringOptional span identifier.
parentSpanIdstringOptional parent span identifier.
decisionLatencyMslong?Optional decision latency in milliseconds.
constraintSetHashstringOptional evaluated constraint-set hash.
constraintCountint?Optional evaluated constraint count.
riskScoredouble?Optional host-defined risk score.
policyScopestringOptional host-defined policy scope.
tenantHashstringOptional privacy-preserving tenant hash.
organizationHashstringOptional privacy-preserving organization hash.
emitterStatusstringOptional provider-neutral emitter status.
emitterProviderstringOptional provider-neutral emitter provider name.
outboxSequencelong?Optional outbox sequence.
gatewayExecutionIdstringOptional gateway execution identifier.
decisionStagestringOptional provider-neutral decision stage.
schemaVersionstringOptional schema version. When omitted, the stable artifact schema version is used.
Returns
- DecisionReceipt
An decision receipt value.